Go to Post While we all look back and appreciate the shoulders of the giants of the past upon which we are standing, let us not forget that we are the giants of today. Ours are the shoulders on which others will be standing in the future. - Mike Rush [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   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
  #2   Spotlight this post!  
Unread 07-02-2016, 15:46
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: [Snippet] Using 2+ Cameras with minimal bandwidth usage

Awesome code, this snippet will surely be helpful in the future. Thanks for sharing.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2016, 17:30
RamTech 59 RamTech 59 is offline
RamTech 59
FRC #0059 (RamTech 59)
Team Role: Coach
 
Join Date: Jan 2016
Rookie Year: 1997
Location: Miami, FL
Posts: 9
RamTech 59 is an unknown quantity at this point
Re: [Snippet] Using 2+ Cameras with minimal bandwidth usage

When I use this code my cameras seem to lag, does anyone have complete code that I can use as reference?
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2016, 19:06
kmodos kmodos is offline
Registered User
AKA: Alex
FRC #1126 (SparX)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: New York
Posts: 57
kmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to behold
Re: [Snippet] Using 2+ Cameras with minimal bandwidth usage

Quote:
Originally Posted by RamTech 59 View Post
When I use this code my cameras seem to lag, does anyone have complete code that I can use as reference?
Does the lag occur when you switch between the two? Switching will always lag a bit as well as all feeds will lag a tiny bit. Try to lower the quality of the returned image or lower the resolution.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi