I have a webcam mounted ~12 inches off a table facing down. I have a sheet of paper under it that can move in any direction, but only in a 2D plan on the table. I want to use the webcam to figure out in which direction the sheet of paper is moving. Is there an algorithm to do this? What is it called?
Share
I suggest optical flow. From Wikipedia:
Or, to quote a presentation from the Stanford Artificial Intelligence Lab:
It means you can compute the displacement of a set of points belonging to the object you want to track from one image to another -> resulting in a set of vectors describing the direction of your object.
cvGoodFeaturesToTrack()— you should get good results as long as your sheet of paper is distinct from the tablecvFindCornerSubPix()andcvCalcOpticalFlowPyrLK()— “LK” means “Lucas-Kanade”, the name of the algorithmSee OpenCV’s Motion Analysis and Object Tracking documentation for details.