loading

Using the Axis Camera

The Axis IP Camera provided with the Kit of Parts allows you to capture images and stream them over a network connection. This Internet streaming allows the image to be processed off-robot on on-robot. The Axis Camera provides resolutions up to 640x480 but you may find that using 320x240 is more accomidating due to the bandwidth limitations imposed on the competition field.

The provided Axis camera can also be used to detect visual targets. Ideally, you would use this camera along with a high powered led ring light that will help to increase the intensity of the retro-reflective targets. Again, the goal is to isolate just the targets from the rest of the image such that identification is easier and quicker.

Note that while camera's are typically more sensitive to green light, the JPEG encoding performed within the Axis camera will cause precision problems as color is heavily compressed within JPEG and can lead to inaccurate artifacts. The recommended light color is white as that is best preserved by JPEG compression and will provide the best results.

Good Quality JPG Yellow Processed
Low Quality JPG Yellow Processed
Note the color processing from the lower quality JPG is less defined and can lead to bad recognition if color is part of your processing pipeline.

If you are unable to acquire a sufficient LED light for the camera, you can still use the RGB image as is and process that for the target. This will work but may be slow and more prone to invalid detections as compared to an IR or LED enhanced technique.

To use the Axis camera on your robot you will need to power it using the 5V power connector on the power bus. You will also need an Ethernet cable to connect the Axis camera to the onboard router. If you plan to use RoboRealm to process the Axis images you should plug this into the router instead of the CRio connector. This avoids the CRio from spending any resources in routing the image.

Since the Axis Camera is not a webcam, you need to use the Axis Camera module in order to access the video from within RoboRealm. Once you add this module to the RoboRealm pipeline you will need to configure the IP address of the Axis Camera. This will be in the form of 10.X.Y.20 where X and Y are based on your team number.

Type in the username and password for the Axis camera that you first typed in when you accessed the Axis camera via a browser. The username and password is required for controlling any of the parameters and to avoid having to allow for anonymous access to the camera.

Once the Start button is pressed, RoboRealm will access the video stream at the provided IP address and start streaming the live video. You can then add modules after the Axis module in order to process the video for specific qualities. For example, once you have the Axis video working add in the RGB Filter module in order to isolate specific colors within the image.

If you are unable to access the image check the connection via a webbrowser and verify that the Axis Camera interface appears at the specific IP address. If you are still unable to see the camera interface you may need to reset the camera and use the default IP address.

While the image quality of the Axis camera is sufficient for the purposes of tracking targets it is not a calibrated camera. Because of this the values created from the tracking can be incorrect due to lens distortion. For example, the following image shows the Axis looking at a checkerboard grid.


To correct for this distortion, you can use the Radial Distortion module. This will correct the lens distortion and ensure that straight lines are straight.

Move Mouse Over


To try this out yourself:

  1. Download RoboRealm
  2. Install and Run RoboRealm
  3. Load and Run the following  robofile which will activate the Axis module along with the radial correction.
  4. Note that the Axis module is configured to its default IP address as if connected to your laptop. You may need to change the Axis modules IP address to your correct address before you see an image.
  5. If you directly click on the Axis module you will see how the image looks without lens correction. When you click again to unselect the module RoboRealm shows the image with all modules activated. Using this you can see what difference the Radial Distortion makes.

If you have any problems and can't figure things out, let us know and post it in the forum.