Log in

View Full Version : Crash corse in image tracking!!


techkid86
11-02-2012, 10:00
Our programer who delt with image tracking has disapeared off the face of the earth. this close to the end of build season, i dont have time to tinker with things, and spend a week figuring out how to make it work. we are using the Axis camera provided, and we are going to be making it track the retroflective tape, reflecting a bright green LED illumination. Help please?
(thank you all in advance)
just tell me if you need more info.
i would just like, as the title says, a crash course, so i can understand it.

(i mistyped course)

dcreed@epic.com
11-02-2012, 11:41
Did you get help with this... we are having the same problem... the examples given are using a RED LED ring and we have green as well.. plus we aren't sure how to make sure this is working (e.g. how do we know it's seeing the targets... and how do we then make the robot turn the camera to face the target.)

Patrick Chiang
11-02-2012, 13:14
Well, the first thing you want to do is look into the sample camera project provided. (Ignore this if your vision guy already has some code done.)

In there, there is a line like so:
BinaryImage thresholdImage = image.thresholdRGB(25, 255, 0, 45, 0, 47);

What this does is to implement a threshold for colors (specifically, keeping the color red and ignoring everything else).

The parameters are:
1. Min R = 25
2. Max R = 255
3. Min G = 0
4. Max G = 45
5. Min B = 0
6. Max B = 47

These are standard RGB values. If you want to use a pure green LED instead of pure red, you would switch parameters 1~2 with 3~4.

For more information, I would suggest trying to read into and understanding the sample camera test file. Another place you should look into is the Javadoc files, particularly the entries concerning BinaryImage and ParticleAnalysisReport.

jesusrambo
11-02-2012, 13:46
http://www.scribd.com/jin_jiah/d/81260909-FRC-2012-Image-Processing-Tutorial

http://firstforge.wpi.edu/sf/docman/do/downloadDocument/projects.wpilib/docman.root/doc1302