繁体   English   中英

See3cam Ubuntu-14.04 EclipseC ++库错误

[英]See3cam Ubuntu-14.04 EclipseC++ library error

我尝试使用Eclipse C ++访问See3cam CU40摄像机,该摄像机的格式为Y16,而不是RGB。 我已经安装了制造商提供的必需的OpenCV库,但是遇到libv4l2问题。 例:

#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"

#include <iostream>
#include <ctype.h>


using namespace cv;
using namespace std;

int main(int, char**)
{
VideoCapture cap(0);
if(!cap.isOpened()){  // check if default camera is opened
    cout << "***Could not initialize capturing...***\n";
    return -1;
}

Mat edges;
namedWindow("edges",1);
for(;;)
{
    Mat frame;
    cap >> frame; // get a new frame from camera
    cvtColor(frame, edges, CV_BGR2GRAY);
    GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
    Canny(edges, edges, 0, 30, 3);
    imshow("edges", edges);
    if(waitKey(30) >= 0) break;
}
// the camera will be deinitialized automatically in VideoCapture destructor
return 0;
}

控制台错误:

libv4l2: error set_fmt gave us a different result then try_fmt!
HIGHGUI ERROR: libv4l unable convert to requested pixfmt
libv4l2: error set_fmt gave us a different result then try_fmt!

在此处输入图片说明 这是结果窗口

期望的结果应该是一个窗口,其中包含摄像机捕获的边缘视频流,但是,该帧是三重的,并且有些重叠。 有人可以帮忙吗? 谢谢。

See3Cam_CU40的输出是Y16-拜耳10位RGB红外帧! 您需要按照此处所述使用opencv videoio模块的修改版本! 请访问这里! https://www.e-consystems.com/blog/camera/?p=1317

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM