Hi dear readers, I've worked on a simple RGB recognition algorithm which is nicely accurate.
Let me show you a little demonstration :
(原视频需翻墙)
RGB Wheel Tracker from didier.brun on Vimeo.
Algorithm
The algorithm is based on a paper I've read a few years a go, but I can not find the link. The idea is ready simple and require a simple pass on the image.
The first phase is to compare the proportional amount of red, green and blue from 3 relative points, and calculate a score for each pixel.
The second phase is then to blur the result, apply a threshold on the image.
The last phase is to find the blob with the biggest size.
This algorithm is applied for each orientation pattern according to this logic :
- Iterate the marker searching on each orientation, one by frame rendered (top red, top blue, top green, top red, top blue, ...)
- If a marker is found, keep the searching on the corresponding orientation only
- When the marker is lost, iterate on the 3 orientation (point 1) until a marker is found
A sample image :

The algorithm

The result illustrated with "hot" zone :

Download
The PDF marker : http://www.didierbrun.com/wheeltracker/rgb_wheel_model.pdf
Live demo : http://www.didierbrun.com/wheel_tracker.swf
Sources : http://www.didierbrun.com/wheeltracker/sources.zip