![]() |
Switching Camera Views
I would like to know if it is possible to change the current camera display programmatically. What I would like to achieve as the end result is having two cameras, one forward, one backward, that switch based on the direction the robot is currently moving (with a manual override).
I currently am able to manually change the view by selecting the desired view from the drop-down menu on the dashboard, and may display both simultaneously if I wish. |
Re: Switching Camera Views
You can do something like this (edited from the screensteps page):
Code:
public void robotInit() { |
Re: Switching Camera Views
The above code gets you about 90% of the way their, but still runs into USB bandwidth issues. I modified the code slightly and now have switching cameras working very well, with the occasional error message, but nothing fatal.
Code:
public void robotInit() { |
Re: Switching Camera Views
When I attempt to add the switcher, I get a large number of errors and warnings. Something like unable to set FPS or unable to set resolution. It's really irritating, the errors go away when I comment out the switching code, but the dashboard still shows >30 FPS for both cameras, and higher resolution (even though my code sets the resolution and FPS lower).
I am using two Lifecam 3000s if it matters. |
Re: Switching Camera Views
On the dashboard are you streaming the Switcher? If you try to stream just the default USB cameras, you will get errors.
|
| All times are GMT -5. The time now is 21:47. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi