#include #include #include #include
当前位置:   article > 正文

opencv4.2.0 视频去抖动算法代码_opencv视频稳像算法

opencv视频稳像算法
  1. // videostabDemo.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
  2. //
  3. #include <iostream>
  4. #include <opencv2/opencv.hpp>
  5. #include <opencv2/videostab.hpp>
  6. #include <string>
  7. #include <iostream>
  8. #pragma comment(lib, "opencv_core420.lib")
  9. #pragma comment(lib, "opencv_videoio420.lib")
  10. #pragma comment(lib, "opencv_highgui420.lib")
  11. #pragma comment(lib, "opencv_features2d420.lib")
  12. #pragma comment(lib, "opencv_videostab420.lib")
  13. using namespace std;
  14. using namespace cv;
  15. using namespace cv::videostab;
  16. string inputPath = "video_seq_2.avi";
  17. string outputPath = "outputstab001.avi";//001 must
  18. // 视频稳定输出
  19. void videoOutput(Ptr<IFrameSource> stabFrames, string outputPath)
  20. {
  21. VideoWriter writer;
  22. cv::Mat stabFrame;
  23. int nframes = 0;
  24. // 设置输出帧率
  25. double outputFps = 10;
  26. // 遍历搜索视频帧
  27. while (!(stabFrame = stabFrames->nextFrame()).empty())
  28. {
  29. nframes++;
  30. /
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/732523
推荐阅读
相关标签