Cameras

We would like to use 2 cameras with only one being active a a time. How can we switch between the two from the control computer? On the Robot the cameras are plugged into the two USB ports .

The default Dashboard camera window allows you to pick the camera you want to watch.

You need to add code to your robot code to send the second camera stream.
Something like this added to Vision Processing.vi-really a copy/paste duplication of code that’s already in that vi with the USB and name changes.

Wouldn’t you want the two cameras to get their image size from the same place?

Doesn’t have to be.
It will depend, too on what each camera is used for.
A camera looking at the gear lift peg can be low resolution, while you might want more resolution for a camera looking at the top of the Boiler.
And any processing of the image might require different resolutions.

Fair point. I probably got a little centered on my current VR dashboard project.

We have added a second USB camera as described above and are able to switch between the cameras using the down arrow selector on the Dashboard, but we wanted to try to use a button to toggle between the cameras because we only need one at a time and I don’t want to use extra bandwidth for a camera we only need in the last 20 seconds of a match. One will be the default camera and the other will only turn on when the winch motor is on.

I setup a select function to send either “Front Camera” or “Rear Camera” to a Dashboard Write vi (named camera swap) depending if the winch button is pressed. My problem is that when I make a custom Dashboard and edit the camera selection code in loop 2, it breaks a wire in loop 5. I’ve searched CD all over for a solution, but have found more “use the CD search function” than actual help. See attached for my dashboard code

Any help would be greatly appreciated!







Something you may want to try is switching in code with a free joystick button. This way its easy access.

The easiest way but probably not the best is switching in vision VI which camera is being sent to the dashboard that way.

like this?

We have an axis camera and I don’t mind using it if it makes this camera swap thing easier.