Log in

View Full Version : SmartDashboard dynamic images


jalozinski
09-02-2014, 15:10
hey hey hey. i know you can do live camera feeds with SmartDashboard, but I want to apply some filters (on green, then particles) and display those as a live camera feed. any ideas? if worst comes to worst, what would be the best way to send a signal back to the driver station to open the images repeatedly with java graphics or something ghetto like that?

irvingc
11-02-2014, 01:49
If you only wish to display a filtered camera image, you can extend the WPICameraExtension SmartDashboard widget and override the processImage() method to apply some filters to the raw image*; you will need to install the SmartDashboard with Vision extensions (http://wpilib.screenstepslive.com/s/3120/m/7932/l/93058-smart-dashboard-standalone-vision-installer).

If you wish to display the filtered camera image side-by-side with the original image, it's a bit more difficult; you'll probably need to copy the WPICameraExtension sources into a new class and modify the paintComponent() method to draw both images to the screen (using "ghetto" Java graphics).

* To be clear--you will need to apply these filters using an image processing library such as JavaCV (WPIJavaCV provides some nice bindings for this). I don't think there's an easy way to access the NIVision libraries in a desktop environment.

Greg McKaskle
11-02-2014, 06:48
The NI Vision libraries are provided on the desktop and they have bindings from C and form LabVIEW. If you choose to use them, the manuals are installed in the Program Files/National Instruments/Vision folder. The manual for the C bindings will contain the name CVI.

Greg McKaskle