Using a Webcam

Accessing a webcam is a native function to RoboRealm. Ensure that the Camera button is pressed in the main RoboRealm GUI and select which camera you want to view by selecting the camera from Options Button->Video Tab->Camera dropdown. You can then set additional properties using the format button, source button, etc. depending on the webcam you are using.

As mentioned before one of the strong capabilities of HD webcams is the ability for them to zoom in from a distance and still retain good quality images. This can be used to retain a large view of the target even at distance.

Original Image Optical Zoom Software Zoom

To demonstrate how this can work, access the following robofile (RoboRealm configuration file) and load it into RoboRealm.

  1. Double click on the Camera Properties module and ensure that your HD camera is selected.
  2. Also ensure that the 640x480 image size is selected.
  3. Then hold up a green object in front of the camera. If the object does not appear within the image or too many objects appear you may need to edit the RGB Filter module and increase/decrease the hue (color amount) that is being detected.
  4. If you do not have any green objects. you can also edit the RGB Filter module and switch it to another color using the checkboxes.
  5. Once detected you can move the object towards and away from the webcam. Note the sudden jump as the image zooms in and out?

The way this works is by increasing or decreasing the camera zoom based on the detected size of the object. If the object appears too large the webcam will zoom out, if it is too small it will zoom in. Test to see how far you can move away before the object becomes too small. Now imagine that the camera did not zoom. How far would you be able to move away in that case?