topLead.getUId.toString()
当我通过默认摄像头(0)时出现错误。如果我尝试视频字符串,例如“ test.mp4”,则不会。我正在使用Linux Mint和 我的cmake就是这样 /
#include <sstream>
#include <string>
#include <iostream>
#include <opencv2/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
//#include <opencv2/cv.hpp>
//#include <opencv\highgui.h>
//#include <opencv\cv.h>
using namespace std;
using namespace cv;
int main(int argc, char* argv[])
Mat image;
cv::VideoCapture capture(0); // open the default camera
if(!capture.isOpened()) // check if it succeeded
{
//...
cout << "error error is may ";
}
return 0;
}
错误消息
opt/opencv/release$ cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=OFF -D WITH_OPENCL=OFF -D WITH_IPP=OFF -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_EIGEN=OFF -D WITH_V4L=OFF -D WITH_VTK=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib/modules /opt/opencv/