VisionSystemSetup
From Merlin Systems Wiki
This page gives some extra hints on Vision System Setup procedures. Please also refer to the [Robot Soccer installation manual]. This contains full detailed information on the software algorithms and control settings.
Contents |
General
As the camera is the major sensor in robot football ensuring good results is critical to performance.
- Setting up a vision system is an iterative process and requires careful intuition about the correct parameters to alter, there is normally more than one way to achieve a good result.
- Consistent, even lighting conditions are critical to the vision systems performance.
- It is essential that each stage of the recognition process operates correctly, before tuning subsequent phases. This can need re-checking at various times. The basic phases are :-
- blob detection (greylevel filtering, grid scan, blob scanning)
- color discrimination (hue settings to identify blobs)
- blob linking (to identify robots)
- It helps a great deal to know what results should look like on-screen. See the installation manual for some pictures.
- As a guide you should expect ~90% recognition on all players and the ball (over 100% is equally as bad particularly with the ball).
Camera Software Settings
For a room with no artificial light it is preferable to set all the camera settings to manual.
For cameras with aperture control, reduce the gain to 0 (electronic gain introduces noise and reduces picture quality) and then open the aperture on the camera as required. For electronic control of intensity, alter the shutter value in the camera properties dialog.
Typical settings in the system.cfg file for fire-i camera properties(read at startup):-
[camerasettings]
resolution=2
format=4
framerate=3
exposurecontrol=2
shuttervalue=450.0
gain=0.0
rawmode=0 ## 0 = Fire-i, 1 = Micropix C640
blacklevel=300
ub=125
vr=75
Typical settings for Micropix C640:-
[camerasettings]
resolution=2
format=4
framerate=3
exposurecontrol=2
shuttervalue=50.0
gain=0.0
rawmode=1
blacklevel=200
ub=125
vr=75
Camera Setup
Position the camera centrally above the pitch.
Use the fire-i software to ensure the pitch is as large as possible within the frame and is correctly focused (place some lids at the corner and in the center to assist with this).
You need to see all sides but the image should be clipped as close as possible behind the goals. If you do not achieve the best image at this stage, the effective resolution of the system will be reduced and you may experience detecting robots at the extreme corners.
Phase 1 - Vision Setup - Blob Detection
The first stage of the vision system is to detect the coloured patches, as being non-pitch areas. From the vision properties dialog within RSE turn on the 'Show Scanlines' checkbox (and press update to write to system.cfg). You should see white scan lines across the tops of coloured patches and not much scanning on the pitch itself. Use the camera properties dialog to alter the intensity and watch to ensure the scanning is good at the center of the pitch and in the corners.
Estimate the change in intensity value and edit the system.cfg file so that the values are correct with the next reboot.
Some Typical Problems
- Failed to add Fire-i Yuv to graph.
This error can occur if the camera is not connected or correctly installed. It can also happen following a crash if the program did not correctly clear the memory. However, the most common cause is probably because the Fire-i camera is not correctly licensed and stops after 30 minutes. - Lids on the wrong way round.
Team Colour (blue or yellow) is in the front right hand position. The switches are at the back of the robot. Having the lid on the wrong way round results in very erratic behaviour! - Robot recognised as another robot.
If the robot is not recognised as the correct id, similar behaviour to above results. Note that colour arrangement for the robots is in the config file, and may sometimes not match the lids! - Teleporting ball.
The ball should be recognised at 100%, not really above or below. False positives lead to spurious target coordinates and low recognition results in listless behaviour.
Interactive Assistance
If you are having persistent difficulties getting your vision system setup to work, please contact Merlin for direct assistance. A method we have successfully used several times is for the customer to install remote computer access software so that a support engineer at Merlin can control your system directly to see results and adjust tuning parameters - see Remote Access Setup
