CMVEdit

= Description = We have taken the CMVEdit from the small size lab code, modified it to take images from NaoImageCapture instead of the old_nao code. However, new packages like FLTK and other linux packages have to be installed.

Required Libaries

 * libglew1.5-dev
 * libjpeg62-dev
 * libpng12-dev
 * libfltk1.1-dev

Issues

 * CMVEdit takes in only ip addresses in numerical forms, and not hostnames.
 * Right now, on some comps, when drawn with colors, CMVEdit does not refresh the image shown, hence you will either need to scroll using the mouse button or use the space bar.

Running

 * CMVEdit reads a few files from its config directory (./config/ where it's being run from).
 * config.txt - camera parameters
 * colors.txt - definitions of colors
 * thresh0.tmap.gz - threshold to load from/save to
 * To run CMVEdit, run ./cmveditbroker &lt;ip_address&gt;
 * e.g., ./cmveditbroker 192.168.1.1

Getting CMVEdit to run
If you run CMVEdit and see a completely white box on the left, there may be an issue with OpenGL.

You can try to do the following: Section "Screen" Identifier	"Default Screen" Monitor		"Configured Monitor" Device		"Configured Video Device" # This is the new line to be added Option		"UseFBDev"		"true" EndSection
 * Edit /etc/X11/xorg.conf
 * Under Section "Screen", add Option "UseFBDev" "true"
 * It should look something like this:

Using CMVEdit
After CMVEdit loads, hit the spacebar (while the mouse cursor is over the white area on the left) in order to load an image from the robot. You can hit the spacebar whenever you want a new image to load. However, the images are cached so you may have to hit the spacebar multiple times to get the latest image.

To color a pixel, first choose the color (e.g. orange, white, red etc) from the drop-down list on the right, and click on the relevant pixel on the image. You can toggle the transparency of the image vs segmented color using the slider on the right. Also, you can hit the 'c' and 'v' keys to switch between full image and full segmented image.

The figure on the top right of the screen shows the YUV color space, and how segmentation is done. You can click directly in that space to label pixels too, although this is generally not recommended.

Important points

 * Hit save often. CMVEdit has some bugs and will crash from time to time. Saving often will prevent headaches from occurring.
 * The order in which you color pixels can smoothen the thresholding process.
 * Generally, working on green, white, background, yellow & blue, red, and then orange is a good order. Always check that orange pixels do not appear in the red areas (this happens rather often), as well as orange pixels in the yellow goal post when the robot is very close.
 * After you're done creating a threshold, remember to copy thresh0.tmap.gz into your project's config directory and rename it to threshold.tmap.gz.