1

I am using open-CV to take a live stream from a webcam.

Is there a way to show an IplImage in a picturebox?

I'm using opencv 2.3.1 in C++. I'm working with Visual Studio 2010 in window form application. Thank you

int main()
{
    CvCapture* capture=cvCreateCameraCapture(0);
    cvNamedWindow("Live",CV_WINDOW_AUTOSIZE);
    IplImage *frame=cvCreateImage(cvSize(w,h),8,3);   //Original Image

    while(1)
    {
        IplImage *fram=cvQueryFrame(capture);

        if(!fram)
        break;

        cvShowImage("Live",frame);

        char c=cvWaitKey(33);
        if(c==27)
        break;
    }

    cvReleaseCapture(&capture);
    cvDestroyAllWindows();
}

I know this was discussed at how to put an Iplimage on a picturebox?

but I am not understand how to write in window form.

Community
  • 1
  • 1
  • [This answer](http://stackoverflow.com/a/12628861/1231073) is relevant. – sgarizvi Feb 01 '13 at 09:44
  • possible duplicate of [how to put an Iplimage on a picturebox?](http://stackoverflow.com/questions/8805386/how-to-put-an-iplimage-on-a-picturebox) – karlphillip Feb 01 '13 at 16:35
  • Place a comment below the other answer asking for further details, but don't ask the same question again or it will get closed. – karlphillip Feb 01 '13 at 16:36

0 Answers0