作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试运行一些代码以在某些视频上添加轨迹栏,它来自 Learning OpenCV Second Edition 一书,但我无法编译我的代码并给出错误“namespace cv has no member CAP_PROP_POS_FRAMES”
这是代码的第一部分
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\imgproc\imgproc.hpp>
#include <iostream>
#include <fstream>
using namespace std;
int g_slider_position = 0;
int g_run = 1, g_dontset = 0; //start out in a single step mode
cv::VideoCapture g_cap;
void onTrackbarSlide(int pos, void *) {
g_cap.set(cv::CAP_PROP_POS_FRAMES, pos);
if(!g_dontset)
g_run = 1;
g_dontset = 0;
}
最佳答案
是CV_CAP_PROP_POS_FRAMES(注意S)应该是highgui.hpp带进来的。它是全局命名空间中的未命名枚举。
关于c++ - cv 没有成员 CAP_PROP_POS_FRAMES,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26744549/
我正在尝试运行一些代码以在某些视频上添加轨迹栏,它来自 Learning OpenCV Second Edition 一书,但我无法编译我的代码并给出错误“namespace cv has no me
我是一名优秀的程序员,十分优秀!