1

I`m new in OpenCV. I want to use optical flow method to stabilize Webcam Real-time video. Actually, I can stabilize video file but when I tried to apply Webcam it does not work.

Please help me!

Paradis
  • 21
  • 3

1 Answers1

3

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:

enter image description here

Stabilize the car:

enter image description here

Kinght 金
  • 17,681
  • 4
  • 60
  • 74