首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >See3cam Ubuntu-14.04 EclipseC++库错误

See3cam Ubuntu-14.04 EclipseC++库错误
EN

Stack Overflow用户
提问于 2016-06-17 10:13:57
回答 1查看 333关注 0票数 0

我试着用Eclipse访问See3cam CU40相机,它的格式是Y16而不是RGB。我已经安装了制造商提供的所需的OpenCV库,但在使用libv4l2时遇到了问题。示例:

代码语言:javascript
复制
#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;
}

控制台出错:

代码语言:javascript
复制
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!

这是生成的窗口

期望的结果应该是包含摄像机捕获的边缘视频流的窗口,然而,帧是三重的,并且有些重叠。有人能帮上忙吗?谢谢。

EN

回答 1

Stack Overflow用户

发布于 2016-06-17 12:01:20

See3Cam_CU40的输出是Y16-拜耳10位RGB帧!您需要使用修改版本的opencv videoio模块作为described here!请访问此处

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37872067

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档