I've got a basic page detection to work. It keeps taking snaps from a camera and detects where the page开发者_JAVA技巧 is. There's a person who keeps replacing the page with new ones. How do I detect this?
If you are already properly detect the page your next step is to align the pages and make them the same size (in pixels). After that, compute the sum of square difference of just the page area, and threshold that to determine if the page has changed.
To decide whether the person is in view or not you just check if the detected page is rectangular (you can do this from the relative positions of the corners of the page) and within a certain area of the image.
Search the computer vision literature for "video scene change detection" or "video shot boundary detection" approaches. Here is good survey paper:
Video Shot Detection and Condensed Representation, A Review
Off the top of my head, you could use OpenCV to take a shot every x seconds, convert image to B&W and then take the sum of the pixels in it. If the sum has changed, a new paper has been placed. This method is pretty sensitive to noise though.
精彩评论