Video Stabilization with OpenCV

后端 未结 8 2118
遇见更好的自我
遇见更好的自我 2020-11-30 19:44

I have a video feed which is taken with a moving camera and contains moving objects. I would like to stabilize the video, so that all stationary objects will remain stationa

8条回答
  •  佛祖请我去吃肉
    2020-11-30 20:24

    I past my answer from this one. How to stabilize Webcam video?


    Yesterday I just did some works (in Python) on this subject, main steps are:

    1. use cv2.goodFeaturesToTrack to find good corners.
    2. use cv2.calcOpticalFlowPyrLK to track the corners.
    3. use cv2.findHomography to compute the homography matrix.
    4. use cv2.warpPerspective to transform video frame.

    But the result is not that ideal now, may be I should choose SIFT keypoints other than goodFeatures.


    Source:

    Stabilize the car:

提交回复
热议问题