Switching between Multiple Cameras using Marker Module
eJMO from United States  [3 posts]
3 years
There is a basic routine posted several years back on a way to switch between multiple cameras using Marker modules.  The code is below.

Set camera_num = 2
if camera_num =1 then
  Marker [Switch to camera 1]
if camera_num=2 then
  Marker [Switch to camera 2]

I attempted to use this code and found Roborealm would not switch between cameras.  I made sure that each of the Marker modules were linked to the proper camera.  I tried cycling Run ON and OFF and I tried modifying the camera_num variable between 1 and 2.  I tried rebooting the computer, and reloading the .robo file.  I tried using two USB cameras, and I tried using an internal webcam and one USB camera.  None of the combinations worked.  The code doesn't do anything.  Is there something else that has to be set to allow this code to work?
Steven Gentner from United States  [1370 posts] 3 years

No, that seems about right. I've included what you have above and it appears to be working as would be expected. Ensuring that nothing in the pipeline is selected ensures that the entire pipeline is processed. If any module is selected the image only up to that module will be shown. The run button should be pressed too. Also, be sure to have the most recent version.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index