Using Optical flow to track colour markers

asked 2014-03-21 07:51:25 -0500

zaaa gravatar image

The reason I wish to do this is I have a program tracking them using RGB to HSV with findContours, and for my project I need another method of tracking to compare.

I've compiled the OpenCV example of KL using



I know this converts to grayscale so the fact they are coloured for KL tracking is not important.

I tried setting the thresholds for goodFeaturesToTrack, and select all the features above a certain level of 'goodness', but thats for the entire frame.

Im aware that KL prefers high contrast corners over a plain background, but for the purposes of comparison, I need to use a plain white background.

I looked at the tutorials, the Harris Corner detect and Shi Tomasi examples require the accuracy to be set very low with a plain background to pick up my markers.

Is there a way of filtering out what corners I want? Or initially selecting the Harris corners I wish to track? Could clustering be used?

edit retag flag offensive close merge delete


Since you are using both goodFeaturesToTrack and calcOpticalFlowPyrLK you should have a look at this :

Abhishek Kumar Annamraju gravatar imageAbhishek Kumar Annamraju ( 2014-07-05 00:57:00 -0500 )edit