Token detection with OpenCV

I am trying to detect various objects containing colored markers, so the red blue green marker identifies object A and the red blue red marker identifies object B. My problem is that I cannot use a template that causes the objects to rotate, currently I think of checking for each color, and then I find the object, checking the distance between the colors, but it seems inefficient, so my question is the best way to do this?

+3
source share
3 answers

Here is a short article I wrote about tracking colored objects . This may be what you are looking for.

+5
source

You might want to try local color histograms and use color ratios as identifiers.

0
source

cv:: transform, , . ,

     b   g   r   bias
r' [ -1  -1  1   -15 ]
b' [ 1   -1  -1  -15 ]

- , , - .

cv:: findContours , . , , 3- .. (, , , , "" , , ) .

, , CAMShift MeanShift cv:: transform. CAMShifting, , , , - , .

The values ​​of the initial position (and, possibly, rotation) from tracking, as a rule, will be somewhat noisy. For example, if you have fluorescent lights in your room and use a red and blue marker, tracking may flicker a bit. To compensate, the Kalman filter or the advanced Kalman filter is useful, but introduces many parameters that need to be adjusted / evaluated.

0
source

Source: https://habr.com/ru/post/1782212/


All Articles