Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Opencv Timeout error in windows

Hi, I am streaming from a customized camera device using Opencv c++, I got timeout error when grabbing a frame. Actual Camera setup is like FPGA -> Cypress controller -> host. Currently no Sensor is connected. The FPGA is programmed like that, it will work for 640 x 480 resolution raw data(YUY2). I can able to view the packets received at the host side with the help of Device Monitoring Studio. But in OpenCv It is throwing timeout error. Can anyone help me to resolve this issue.

Opencv Timeout error in windows

Hi, I am streaming from a customized camera device using Opencv c++, I got timeout error when grabbing a frame. Actual Camera setup is like FPGA -> Cypress controller -> host. Currently no Sensor is connected. The FPGA is programmed like that, it will work for 640 x 480 resolution raw data(YUY2). I can able to view the packets received at the host side with the help of Device Monitoring Studio. But in OpenCv It is throwing timeout error. Can anyone help me to resolve this issue.

My code for capturing

int main()
{
    VideoCapture cap;
    char keypressed;

    cap.open(0);

   if (!cap.isOpened())
    {
        cout << "***Could not initialize capturing...***\n";
        return -1;
    }

    for (;;)
    {

        cap.read(InputFrame);
        if (InputFrame.empty()){
            cout << "\n***Frame Empty error***";
        }
        else
        {

            //resizeWindow(" Output Window ", 640, 480);
            imshow(" Output Window ", InputFrame);
        }


        keypressed = (char)waitKey(1);

        //Break when user presses ESC key
        if (keypressed == 27)
            break;

    }

If you need more clarification please feel free to ask.