与罗技C270(OpenCV的2.4.2/C++)在Ubuntu运行简单的照相机捕获出现此erorr消息:opencv的错误 - > HIGHGUI ERROR:V4L/V4L2:VIDIOC_S_CROP
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
和进一步:
Corrupt JPEG data: 2 extraneous bytes before marker 0xd1 Corrupt JPEG data: 1 extraneous bytes before marker 0xd6 Corrupt JPEG data: 1 extraneous bytes before marker 0xd0 Corrupt JPEG data: 1 extraneous bytes before marker 0xd0
我得到帧,但帧的宽度和高度写入垫对象时见下文交换的值:
Mat frame;
videoCapture = new VideoCapture(camId);
if(!videoCapture->isOpened()) throw Exception();
cout << "Frame width: " << videoCapture->get(CV_CAP_PROP_FRAME_WIDTH) << endl;
cout << "Frame height: " << videoCapture->get(CV_CAP_PROP_FRAME_HEIGHT) << endl;
(*videoCapture) >> frame;
cout << "Mat width: " << frame.rows << endl;
cout << "Mat height: " << frame.cols << endl;
输出:
Frame width: 640
Frame height: 480
Mat width: 480
Mat height: 640
对不起,我的错-.- – user2192424 2013-03-21 18:39:50
但我不知道如何摆脱你得到的错误信息。我也在我的机器上获得它们。 – carlito 2013-03-21 22:02:37