Tracking implementation based on red-green square color bars
Tracking is a basic problem in computer vision. There are also many algorithms, such as meanshift, camshift,
And so on, but there are not many really robust, and the tracking has a lot to do with the characteristics of the target,
In the study, I found that, based on color segmentation, certain features are added to the tracking target, such as red-green matching,
Then, based on this feature search, the red-green square feature is identified in space, so it is easy to obtain good robustness.
The procedure is as follows:
1. Use the HSV space to separate the red space and the Green space
2. Measure the color block distribution of the red space and the green space.
3. Record a red block and the adjacent green block as a couple to recursively obtain all the couples
4. Analyze all the couples and calculate the neighboring couple weights.
5. Set the Domain value to clear the lower couple of the neighbor counter.
6. The mean value for couples with high similarity is the position of the Tracking target. :)
However, the disadvantage is that the tracing Based on the red or green background cannot be achieved, because the division fails completely.
The effect is as follows: