简体   繁体   English

用opencv分离两个立体摄像机图像

[英]Separating two Images of Stereo Camera with opencv

I'm using opencv with my stereo camera(LI-USB30-V024 STEREO). 我正在使用opencv和我的立体相机(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");
}

But my problem is that the 2 images of camera printed together in one window. 但我的问题是相机的2张图像一起打印在一个窗口中。 How can I separate each of this 2 images? 如何分离这2张图片?

User Interface , Especially imShow() and namedWindow() . 用户界面 ,尤其是imShow()namedWindow()

In case you are on an Android device as the tag indicates the answer is: No you cant without a huge affort. 如果你在Android设备上,因为标签表明答案是:没有你不能没有巨大的努力。

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

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