At the forefront of Artificial Intelligence
  Home Articles Reviews Interviews JDK Glossary Features Discussion Search
Home » Articles » Robotics » LEGO Mindstorms

Creating Your Own Vision Command Regions

Vision Command is an excellent product (see the Generation5 review) but it only gives you 20 present regions to work with. What happens if you want to create your own? It is relatively simple to make create custom regions, but it is a tedious process if you want to do it correctly, so settle down.

Creating the Basic Region Map

Regions are stored in this default directory:
...\Vision Command\data\hdData\VCSData\Regions
This directory has 20 directories labelled 01 to 20 which correspond to the regions in Vision Command. To add your own, create a directory called "21". Tip: If you want to base your custom region on an existing region, then just copy the directory and rename it - it will save a lot of time.

Next you have to create your regions file. Now, VC allows up to 8 different regions which are colour-coded in a bitmap file called "XX.bmp". Open up one of the existing region files and you'll see. To the right is a list of the regions and their colours. You can use this image to retrieve the colours, or you can use these colour values (R,G,B):

Region 1: 255,0,0
Region 2: 0,255,0
Region 3: 0,0,255
Region 4: 255,0,255
Region 5: 255,255,0
Region 6: 255,115,0
Region 7: 180,0,255
Region 8: 0,255,255
Region files do not have to have all 8 regions, you can mix and match as you wish. Once you have created your region file in your new directory as "XX.bmp" you now have to create all the other files that are displayed and overlayed in VC itself.

Finishing the Product

All the other work that has to be done is making sure it all looks nice in the Vision Command interface. The directories have the following additional files:
00.bmp to 0X.bmp : These are the region icons. (80x60)
00.rle to 0X.rle : These are the overlayed images. (320x240)
X stands for the number of regions in your image. So you can see for a 8 region setup, you have 19 files!

Region Icons

These little guys are displayed in VC to specify which region is being programmed (look in VC if you don't understand). Each file is called 0X.bmp, where X denotes the region. Note that there is a 00.bmp which is the icon displayed when programming the Autopilot. To the right is the icon I created when region 1 of my custom region setup is selected.

Overlay Images

The overlay images are the simple files that are overlayed on the live camera. These are RLE files - which can be saved as bitmaps and renamed with the *.rle format. They are the same as the icon images: 0X.rle is the overlay image that is displayed when that region is triggered, and 00.rle is the Autopilot image. My Autopilot overlay image looks like this:

Conclusion

It is very easy but very tedious to create your own regions for VC. Nevertheless, being able to do this expands your image recognition possibilities a lot more. A few tips and ideas before finishing:
  • Basing your regions on existing ones can save a lot of time.
  • Use Windows Paint, it seems to work best with the file format VC expects.
  • Create 8 region files that simply say "Region 1", "Region 2" etc., that you can reuse instead of following the LEGO format.
  • Regions do not have to be connected: this means you can try pattern recognition and other neat tricks.

Submitted: 17/02/2001

Article content copyright © James Matthews, 2001.
 Article Toolbar
Print
BibTeX entry

Search

Latest News
- Generation5 10-year Anniversary (03/09/2008)
- New Generation5 Design! (09/04/2007)
- Happy New Year 2007 (02/01/2007)
- Where has Generation5 Gone?! (04/11/2005)
- NeuroEvolving Robotic Operatives (NERO) (25/06/2005)

What's New?
- Back-propagation using the Generation5 JDK (07/04/2008)
- Hough Transforms (02/01/2008)
- Kohonen-based Image Analysis using the Generation5 JDK (11/12/2007)
- Modelling Bacterium using the JDK (19/03/2007)
- Modelling Bacterium using the JDK (19/03/2007)


All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -