[英]cv has no member CAP_PROP_POS_FRAMES
I'm trying to run a bit of code to add trackbars onto some video, it's from the Learning OpenCV Second Edition book, but I can't compile my code and gives the error "namespace cv has no member CAP_PROP_POS_FRAMES" 我正在尝试运行一些代码以将轨迹栏添加到一些视频中,这是《 Learning OpenCV Second Edition》一书中的内容,但是我无法编译我的代码,并出现错误“命名空间cv没有成员CAP_PROP_POS_FRAMES”
Here's the first bit of the code 这是代码的第一位
#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;
}
It's CV_CAP_PROP_POS_FRAME S (note the S) and it should be brought in by highgui.hpp.
它是CV_CAP_PROP_POS_FRAME S (请注意S),应该由highgui.hpp引入。 It's an unnamed enum in the global namespace.
这是全局命名空间中的未命名枚举。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.