movement detection with openCV
What I'm trying to do, a few people in the forums say its easy but I haven't actually seen an example yet.
What I want to do is track movement from a video feed (as in x,y coordinates, amount, direction).
How I tried to do this is
From this I hoped to be able to use the points positions as where movement is. Amount of points in an area to determine amount of movement and the average of the points direction for the direction of the movement.
However the 'OpenCV Good Points To Track' patch doesn't behave how I thought it would. I assumed if i had a grey scale image it would work like an edge detection.
But when the entire screen is black it still seems to find points (all_black.jpg). To me this doesn't make sense, how can a black point on a black screen be easy to track. I assumed it would of found no points.
When I make some movement with my hand and click (to auto find points). The points are all on my hand moving (as that is the only non-black part) but after a few seconds they move all over the screen (with_some_movement.jpg). I was expecting them to stay on my fingers.
I'm not 'dissing' the patch here when I say what I thought it would do. The patch is awesome, I'm just thinking i'm using it wrong.
Can anyone please explain what I'm doing wrong? Or perhaps a better way to achieve what I want?
I've attached an image of how my patches are connected (qc_movment_detection_1.gif) as well as the quartz file itself. There is also a zip with everything in it to save some clicks :)
Any guidance would be greatly appreciated !