如何稳定网络摄像头视频? [英] How to stabilize Webcam video?
本文介绍了如何稳定网络摄像头视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是OpenCV的新手.我想使用光流方法来稳定网络摄像头实时视频.实际上,我可以稳定视频文件,但是当我尝试应用网络摄像头时却无法正常工作.
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.
请帮助我!
推荐答案
昨天我刚刚在该主题上做了一些工作(在Python
中),主要步骤是:
Yesterday I just did some works (in Python
) on this subject, main steps are:
- 使用
cv2.goodFeaturesToTrack
查找好的角落. - 使用
cv2.calcOpticalFlowPyrLK
跟踪角点. - 使用
cv2.findHomography
计算单应性矩阵. - 使用
cv2.warpPerspective
转换视频帧.
- use
cv2.goodFeaturesToTrack
to find good corners. - use
cv2.calcOpticalFlowPyrLK
to track the corners. - use
cv2.findHomography
to compute the homography matrix. - use
cv2.warpPerspective
to transform video frame.
但是结果不是那么理想,可能是我应该选择goodFeatures
以外的其他SIFT keypoints
.
But the result is not that ideal now, may be I should choose SIFT keypoints
other than goodFeatures
.
来源:
稳定汽车:
这篇关于如何稳定网络摄像头视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文