View Single Post
  #6   Spotlight this post!  
Unread 06-02-2016, 22:53
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 20
Justin Buist is an unknown quantity at this point
Re: [Snippet] Using 2+ Cameras with minimal bandwidth usage

Quote:
Originally Posted by fovea1959 View Post
kmodos: thank you very much. works perfectly for us.

has anyone figured out how to open both cameras at once? we would like to open both camera, grab a frame from each, lay them down side by side in a double size frame, and send *that* to the DS. The problem is that IMAQdxConfigureGrab throws an exception if you already have called it with*out* an intervening MAQdxStopAcquisition.
It's possible, but you'd have to roll your own version of CameraServer. It's not terribly hard. I put one together last week so we can publish OpenCV Mat images back to the dashboard. The protocol for getting stuff back to the dashboard is pretty simple. Just take a peek at the GRIP code for doing it (https://github.com/WPIRoboticsProjec...Operation.java) ... basically everything in that main while() loop is the important stuff. CameraServer from WPIlibj works much the same way but utilizes NIVision.Image objects instead.

How you mash the two images together I don't know as I have basically zero experience with the NIVision libs. But, roll your own CameraServer, solve the issue of mashing images together into a single JPEG and there you go.
Reply With Quote