Computer Vision in FIRST. Sam Carlberg Brad Miller

Similar documents
Building and Contributing to WPILib ( Edition) Brad Miller Sam Carlberg

Off Board Vision Processing in Java

FRC Driver Station LabVIEW Dashboard

2015 FRC Software Component Overview

ROBOT NETWORKING: USING NETWORKTABLES

For Beta, these installers are found in the File Releases section of the Teamforge Beta project.

Using the Axis Camera at Single Network Events

Last Updated: BETA TESTING

FRC LABVIEW PROGRAMMING

pynetworktables2js Documentation

Getting Started with the SmartDashboard

Last Updated: SHUFFLEBOARD

FRC Driver Station Powered by NI LabVIEW

Last Updated: FRC 2019 BETA

Cooking with Team 279

Last Updated: FRC 2019 BETA

Vineon. Technology. Features:

FRC C++ PROGRAMMING Last Updated:

C++/Java Code. For C++ teams, the example can be found by selecting File >> New >> Example. Then select

FRC Driver Station Powered by NI LabVIEW

An overview of mobile and embedded platforms

Choosing a Base Class

FRC C++ PROGRAMMING Last Updated:

Installing Java 8 on the roborio using the FRC

Fun Low-power Observer-interactive Waterfall Sponsored by Orlando Utility Commision

FRC C++ PROGRAMMING Last Updated:

The Basler Embedded Ecosystem

WHAT S NEW WITH FLASH PLAYER 11.2 & ADOBE AIR 3.2. Joseph Labrecque. Hawaii Flash User Group May 10 th 2012

Cisco Video Surveillance 6500PD IP Camera

RASPBERRY PI EXAMPLES WITH CLICK BOARDS

Technical Q&A. Questions & Answers. Last updated: February 28th, 2003 Rev: 1.1

Basler Ace - Compact USB 3.0 Cameras

C++\Java Plugin Changelog

Basler. New: 1 Megapixel Camera. Innovative, Slim Design, Extremely 60 Frames

ArduCAM-M-5MP Camera Shield

Full HD 20M IR Vari-Focal Dome IP Camera ICA-4200V

Installing Eclipse (C++/Java)

ArduCAM-M-2MP ESP8266 Nano V2 Evaluation Kit User Guide

Introduction to the Raspberry Pi AND LINUX FOR DUMMIES

The roborio web dashboard is a webpage built into the roborio that can be used for checking status and updating settings of the roborio.

Internal Vehicle Cameras

Zoom Network camera, PoE 802.3af, IR LEDs, 2-Megapixel, Day & Night, Outdoor, 10x

Basler. Area Scan Cameras

StreamingChurch.tv Equipment Recommendations

POE-5010HD. POE 5 Mega-Pixel Box Type IP Camera with ICR. 5 Mega-Pixel Video Resolution

Basler. CMOSIS models with Camera Link and up to 340 fps

Megapixel Resolution for Excellent Video Quality. Multi-Streaming: Simultaneous H MPEG4 + 3GPP + Motion-JPEG

2-/4-Channel Cam Viewer E-series for Automatic License Plate Recognition. CV7-LP Series

SA-BC820v2H3-TC620 D series SS316L dual head PTZ camera station

BUILDING A GPU-FOCUSED CI SOLUTION

Basler IP Cameras. The Most Powerful IP Camera Concept. Megapixel. Day/Night H.264

Cisco Video Surveillance 2421 IP Dome

AXIS P9106-V Network Camera. User Manual

Basler. CMOSIS models with Camera Link and up to 340 fps

Technical Application Note

Cisco Video Surveillance 6000P IP Camera

FRC JAVA PROGRAMMING Last Updated:

Basler aviator AREA SCAN CAMERAS

What s New in MATLAB and Simulink Young Joon Lee Principal Application Engineer

Sophisticated Design with the Power to Express Your Photographic Imagination. Olympus PEN E-PL9. A Compact, Lightweight Interchangeable Lens Camera

Datasheet. High-Definition IP Surveillance Cameras. Models: UVC-G3, UVC-G3-DOME. Scalable Day and Night Surveillance

Last Updated: FRC DRIVER STATION

Karmin2 Stereo Camera

Product Evaluation Guide. for CMOS Megapixel IP Cameras. Version 1.0

Last Updated: FRC DRIVER STATION

Last Updated: FRC DRIVER STATION

Phantom v7.3. Phantom v7.3. Datasheet. Mechanical Drawing. Sensor Spectral Response 1 / 10

2 Mega-pixel PoE Plus Speed Dome IP Camera with Extended Support ICA-E6260

NODE-RED An event based toolkit for devices and robots

Datasheet. High-Definition IP Surveillance Cameras. Camera Models: UVC-G3, UVC-G3-AF, UVC-G3-DOME NVR Model: UVC-NVR

Datasheet. High-Definition IP Video Surveillance System. Scalable Day and Night Surveillance. Advanced Hardware and Optics for 1080p Full HD Video

HotChips An innovative HD video and digital image processor for low-cost digital entertainment products. Deepu Talla.

Nerf-Battlebot Red Team Group 9

5 Mega-pixel Vandalproof IR PoE IP Camera with Extended Support

Cisco Video Surveillance 6400 IP Camera

UPnP POE. POE-FSH804 PoE Status Link/ACT SPEED 1. POWER PoE Max. 8-Port Fast Ethernet POE Switch. POE Switch

MS Diploma and Semester Projects offered at the Microelectronic Systems Laboratory during the Spring 2015

Artec Leo. A smart professional 3D scanner for a next-generation user experience

Overview. Excellent Image Quality and Attractively Priced. Your benefits include:

Kevin Meehan Stephen Moskal Computer Architecture Winter 2012 Dr. Shaaban

Datasheet Giganetix Board Camera GC2591M-BL GC2591C-BL

INTEGRATING COMPUTER VISION SENSOR INNOVATIONS INTO MOBILE DEVICES. Eli Savransky Principal Architect - CTO Office Mobile BU NVIDIA corp.

Beginner s Guide to Cordova and Mobile Application Development

CMOS USORIA. Features

SoMA Product Description

Wireless Cube Fish-Eye IP Camera Wireless Fish-Eye Cloud IP Camera ICA-W8100 ICA-W8100-CLD

Product overview Product segmentation Key functions Applications. Agenda

Basler ace AREA SCAN CAMERAS. Broadest selection in the industry Best price/performance ratio Latest sensor technology High value-add features

IFD822V2IR Network indoor fixed dome, mm varifocal, 2 MP, H.264/MJPEG, IR, WDR

FRC LABVIEW PROGRAMMING

<Insert Picture Here> JavaFX 2.0

SSL Encryption Secure network connections using data encryption between the camera and the network

Cisco Video Surveillance 2800 Series Standard Definition PTZ IP Camera

Camera integration with UPnP to openhab Blanc Antoine, Law Christopher RICM4

Datasheet. Unified Video Surveillance Management. Camera Models: UVC, UVC-Dome, UVC-Micro, UVC-Pro NVR Model: UVC-NVR

Building a Next Generation Data Logging System

Basler IP Fixed Box Cameras

THE LEADER IN VISUAL COMPUTING

AsTeRICS Introduction Demos, Model creation, Packaging (APE)

Smart Enterprise IP Camera Series

Transcription:

Computer Vision in FIRST Sam Carlberg Brad Miller

!2 Agenda Overview What was new in 2018 Camera hardware options cscore CameraServer (NetworkTable integration) GRIP Code generation WPILib - VisionThread/VisionRunner End-to-end Demo with Raspberry Pi 3

!3 Overview What is computer vision? Photography + Computer Processing Start with good photos Exposure & lighting Composition & focal length Then process digitized values to measure, compare, and rate

!4 Overview Math... not magic Example What makes the target unique? Describe it to a friend on the phone/email Quantify that info by measuring Color, size, area/ch-area, Aspect Ratio, Moment of Inertia Limit Tests

!5 FRC Workflow Goals on the field have often been marked with retro-reflective tape Make use of provided images on first day to design vision algorithms Create a vision program based on the design Use robot control loops based on gyros or other fast sensors usually not on camera frames

!6 The 2018 tools OpenCV included with Eclipse plugins NIVision removed CameraServer rewrite WPILib VisionThread

!7 OpenCV Popular computer vision library C, C#, C++, Java, Python, and LabVIEW interfaces Runs on Linux, Windows, Mac, ios, and Android Libraries included with WPILib for the roborio Designed for computational efficiency and can take advantage of accelerated hardware (GPUs) User community of 47,000 people and over 9M downloads

LimeLight $$$!8 Cameras IP $$ USB Webcam $ Cell phone $$$ USB 3.0 industrial $$$ Pixy Cam $

!9 IP Cameras Typically used for security Axis has low latency and good API Support multiple clients Easiest to stream to web page or other viewers Fixed lens, basic configuration

!10 USB Web Cameras Typically used for chat/video conference Price and quality range is HUGE HD? 4K? $30 to $40 seems sufficient With CameraServer, can make any USB camera into an IP camera Mounting issues Fixed lens

!11 Cell Phone Cameras Used for selfies,..., and robots Write an app Integrated image processor SW support and documentation are good How to mount on robot Lens adapters available

!12 PixyCam Camera with built-in processor Limited capabilities, but has been used successfully by some teams (blob and color code tracking) Lots of output types (SPI, I2C, UART, analog/digital) Includes a cable to connect directly to an Arduino along with some libraries Very fast 50 updates/sec

!13 USB3 Industrial Cameras Used for machine vision visual inspection Basler Dart and Point Grey Chameleon3 have recently become FRC-priced Operate at USB2 speeds on roborio SW support and documentation are excellent GenICam 12mm S or CS lens/filter system Rich configuration, high performance

!14 Basler Dart Sensitive sensor & Global Shutter 54fps color, 120 BW (USB3 full frame) Area scan lower bw, even higher fps Hundreds of properties Digital lines for exposure control Lenses from companies like Edmunds

!15 Hardware processing roborio in an independent thread Driver station computer Onboard coprocessor Raspberry PI Kangaroo NVIDIA TK1 Cell phone LimeLight (Pi Compute Module 3).

CameraServer!16

!17 cscore Makes cameras easy to use Source sink model Can switch sinks between sources Support for USB and IP cameras Multiplatform, except USB camera support is Linux only USB camera support for Windows and Mac planned for 2019 Set camera properties (if supported by the camera) Brightness Exposure Frame rate Frame size MJPEG streaming webserver (looks like an IP camera) Webpage access to camera properties for easy experimentation

!18 CameraServer Wrapper around cscore Automatically creates MJPEG server when camera is created Publishes information about created cameras to NetworkTables Restreams IP cameras via roborio USB port

!19 Code examples Single USB camera CameraServer.getInstance().startAutomaticCapture(); Multiple USB cameras CameraServer.getInstance().startAutomaticCapture( Front, 0); CameraServer.getInstance().startAutomaticCapture( Back, 1); Absolute USB camera path CameraServer.getInstance().startAutomaticCapture( Front, / dev/v4l/by-path/platform-3f980000.usb-usb-0:1.2:1.0-videoindex0 ); Axis camera CameraServer.getInstance().addAxisCamera( 10.2.94.11 );

!20 Code examples Camera Settings UsbCamera frontcamera = CameraServer.getInstance().startAutomaticCapture( Front", /.dev/v4l/by-path/platform-3f980000.usb-usb-0:1.2:1.0-videoindex0"); frontcamera.setvideomode(pixelformat.kmjpeg, 320, 240, 30); frontcamera.setbrightness(50); frontcamera.setwhitebalanceholdcurrent(); frontcamera.setexposuremanual(15);

!21 roborio CameraServer Demo Hook up a USB camera Add one line of code View camera in Shuffleboard and SmartDashboard View camera details in Outline Viewer View camera and camera settings in browser

GRIP!22

!23 GRIP Developed as a WPI RBE/CS senior capstone project Designed to make vision processing easier FRC teams and researchers Based on OpenCV Works equally well with any robot programming language

GRIP User Interface!24

GRIP!25

GRIP!26

!27 GRIP Workflows Select a source camera, video, or saved images Create the processing pipeline while viewing intermediate results Set outputs via network tables variables Robot program gets values and drives/turns/aims at target Three workflows: 1. GRIP on DS laptop 2. GRIP generated code on roborio 3. GRIP generated code on co-processor

!28 GRIP Results What happened in 2017 16,000 downloads! Code generation HTTP REST API Many teams running on roborio, driver station and co-processors Future features GPU acceleration Improved FRC usage Limelight will support Grip in 2019

GRIP Demo

!30 LimeLight camera Simple to start Designed for FRC camera system that works with Java, C++, LabVIEW and Python Includes camera, LED lights, microprocessor with network tables, and a web server Easy to mount, easy to power, built in vision-pipeline Tune the pipeline parameters using web-browser Robot reads data from the LimeLight NetworkTables table NetworkTable table = NetworkTable.getTable("limelight"); double targetoffsetx = table.getnumber("tx", 0); double targetoffsety = table.getnumber("ty", 0);

!31 LimeLight camera 2 Has built-in Fixed Function OpenCV vision pipeline Threshold Erode Dilate Filter contours Targeting logic Up to 10 pipeline configs Second USB camera can be added to the feed Soon: Upload your custom GRIP pipeline to LimeLight!

LimeLight Camera Demo

Raspberry Pi 3 Demo

!34 Raspberry Pi 3 Demo 2 cameras hooked up to Pi3 (both USB) Pi Camera also supported but not demo ed Pi configured with read only file system For demo purposes, building with Eclipse project Could use gradle, etc Deploy GRIP pipeline with generated code Uses Raspberry Pi 3 libraries from here: https://www.chiefdelphi.com/forums/ showthread.php?t=161767

!35 WPILib C++/Java Vision Future Plans Easier deployment mechanisms for vision code to coprocessors Prepackaged image for Raspberry Pi 3 CameraServer USB camera support for Windows and Mac CameraServer web dashboard improvements Set video mode Change visible stream resolution / compression / FPS Display stats on active streams CameraServer support for changing JPEG compression level without also changing resolution (with MJPEG source) CameraServer persistent settings (save/load from web and software)

!36 Ultimate Simplicity Like Jeff Goldblum said in Jurassic Park, life finds a way No camera just a flashlight for aiming with the vision sensor being the drivers at the driver station