
Prenil
Hi,
@Dj_Sures
First, I've been playing around with my JD revolution and I've really enjoyed the camera tracking functions (thank you !).
Out of an interest in understanding how these things actually work, I was wondering how exactly the color recognition is done? Is it a clustering algorithm or is a different method used? Would be able to recommend any source from which I could learn more about robot perception and color recognition?
Thank you,
Prenil
http://opencv.org/
Alan
With the first one, i loop through the data of an image starting at the memory address pointer. I loop for the number of pixels based on image size (width x height), and the pixel width - which is the number of colors. For example, we use argb32 format. Meaning each pixel is 32 bits (4 bytes) and the first byte is alpha channel, red, green and finally blue, respectively.
If red is selected to look for, I scan and extract only the red pixels within the range. I know if its red because the red value is higher than green and blue - also there's a slider to specify "how much greater".
Once I have a collection of only the red pixels, I now use the aforge blob function - which is the reason aforge library is used. I would have written my own blob, but theirs is great and why not give them some props for their great work.
The blob function looks through a data set and extracts information about blobs within it. A slider lets you choose the minimum size of a blob
I then sort the blobs by size of largest to smallest
Now I have a list of locations where there are chunks of red on the image.
@thetechguru this website is really good, I can't believe I hadn't stumbled upon it already, thank you
P.S. my user name has changed a little because I was having problems with my email
d.cochran uses it in his EZ-AI and other projects because it can communicate to ARC and gives more accurate recognition of complex objects.
This thread gives a good description of how he is using it without getting into all the complex details of the EZ-AI thread: http://www.ez-robot.com/Community/Forum/Thread?threadId=7220
Alan
@DJ_Sures: Do you, by any chance, know if AForge uses differential methods or extrema to detect their blobs?