Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

ofxCv::FlowPyrLK tracking

$
0
0

@kylemcdonald
i am looking at your example-flow-keypoints that uses ofxCv::FlowPyrLK.
i was hoping to use it to track people.

right now i am trying to work out how to eliminate keyPoints that stop moving or hit the edge of the video and get stuck there.
i was able to use ofInRange to eliminate those points that for some reason moved outside the 640x480 pixel video images.
At some points some keyPoints get lost and attach themselves to non-moving parts of the image.
I was hooping to use getMotion() to check each points' motion vector.
But something like this doesn't seem to connect the right motion info to the right points after some keyPoints hit the edges of the video:

    for(int i=0; i<flow.getCurrent().size();i++){
       ofDrawLine(flow.getCurrent()[i],flow.getCurrent()[i]+ (flow.getMotion()[i+flow.getCurrent().size()]*20));
    }

any ideas?
here is the of 0.9.0 OS X 10.10 project:
https://www.dropbox.com/s/hkfr5lw6vc37i1l/ofxCv_keypoints_traccking_crop.zip?dl=0


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>