分离立体摄像头与OpenCV的两个图像 [英] Separating two Images of Stereo Camera with opencv

查看:209
本文介绍了分离立体摄像头与OpenCV的两个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用OpenCV的我的立体摄像机(LI-USB30-V024立体声)。 我想在两个窗口打印我的立体相机的两个图像。 所以首先我打印窗口中的图片。

I'm using opencv with my stereo camera(LI-USB30-V024 STEREO). I want to print the two images of my stereo camera in two windows. So first I printed the images in window like this.

void main(){

    IplImage* frame1;

    IplImage* frame2;
    CvCapture* cam1;
    CvCapture* cam2;
    cam1 = cvCaptureFromCAM(0);
    cam2 = cvCaptureFromCAM(1);

    cvNamedWindow("sample1", CV_WINDOW_AUTOSIZE);
    cvNamedWindow("sample2", CV_WINDOW_AUTOSIZE);

    while (1){
        cvGrabFrame(cam1);
        frame1 = cvRetrieveFrame(cam1);

        cvGrabFrame(cam2);
        frame2 = cvRetrieveFrame(cam2);

        if (!frame1)
            break;
        cvShowImage("sample1", frame1);
        cvShowImage("sample2", frame2);

        if (cvWaitKey(10) >= 0)
            break;
    }

    cvReleaseCapture(&cam1);
    cvReleaseCapture(&cam2);
    cvDestroyWindow("sample1");
    cvDestroyWindow("sample2");
}

但我的问题是,摄像头的2个图像一起打印在一个窗口。 我怎样才能将每个这种2图像?

But my problem is that the 2 images of camera printed together in one window. How can I separate each of this 2 images?

推荐答案

用户界面, 特别是 imShow() namedWindow()

如果你是在Android设备上的标签指示的回答是:不,你不能没有庞大的affort

In case you are on an Android device as the tag indicates the answer is: No you cant without a huge affort.

这篇关于分离立体摄像头与OpenCV的两个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆