better camera stablization method?

asked 2019-01-15 21:16:19 -0600

gino0717 gravatar image

hi there, I make a toy project to use a camera watching my monitor.If any person use my computer and my monitor scene change then the program would send message.

first I consider using the HOGDescriptor. I set the first image of videocapture as template, if the current frame's HOG feature is much different to the first image, the program would treat it as " someone use my computer", However, it is really sensitive to camera-shaking.

now I add a MOSSE tracker into it. I set window center as ROI and do some tracking. Then I caculate the HOG difference. If the MOSSE tracker loss tracking and HOG feature has large difference then report "someone use my computer"

To summary: I use TrackerMOSSE to stablize the camera and monitor the monitor(?). Then use HOG feature to do double check.

the output looks like:

shaking camera:

image description

image description

image description

use computer:

image description

It is really good but when I google for some toturial it seems the camera stablization is not worked like this. I found opencv has videostab lib but it seems not for camera and not really time. What could I do to make this toy program more like a "professional" toy ? ( I only care about the mat in ROI since I only need the output message, not output image)

edit retag flag offensive close merge delete

Comments