How to detect shift in static camera?
Hi folks :)
I'm looking for help in solving my problem. I have a static camera, which is focus on one place. I download current view at every 1 second.
I would like to write a program which detects when someone moves the camera in a different direction. After that I would like to generate image with the shift . I am currently come up with this solution: 1. Create a base frame, to which I compare all future frames. 2. Generate edge with Canny Edge algorithm. 3. Then I generate the corner points with Harris algorithm. 4. Then I want to compare the current frame with a base frame (picture, where are just corner points on black background) with calcOpticalFlowPyrLK (Lucas-Kanade method).
Unfortunately I have problems, because depending on the lighting, the number of people, etc., the edges and corners are change. Because of this I don't know if there was a shift or not.
Can somebody give me some advices any solution how to detect shift?
Thanks for your help :)