Ask Your Question

lefsky's profile - activity

2015-08-07 13:37:32 -0600 commented question Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Any progress on this? I have the same problem but with a LeopardImaging camera based on the AR-1820 chip.

The core of the program is:

    Mat frame;
    cap.set(CV_CAP_PROP_FRAME_WIDTH, 4912);
    cap.set(CV_CAP_PROP_FRAME_HEIGHT, 3684);
            cap.set(CV_CAP_PROP_CONVERT_RGB, 0);        
            for (;;) {
        cap >> frame;
        if (!frame.empty())
            break;
    }
    cout << frame.rows;
    cout << "\n";
    cout << frame.cols;
    cout << "\n";
    cout << frame.depth();
    cout << "\n";
    cout << frame.channels();
    cout << "\n";

i expected that frame.ptr() would point to a unsigned 16 bit image of size 4912 x 3684 , but when I run the program I get an image of 4912 x 3684, but with a depth of "0" and 3 channels. I thought that Mat >> frame ; would give me the image before any conversions.

2015-07-29 13:29:49 -0600 answered a question read camera image incorrect

Can you post more details (and code) on the solution to this problem?

2015-07-06 10:38:49 -0600 asked a question VideoCapture: Can I override the frame type given by my camera

I am working with a Leopard Imaging USB camera that indicates to any driver that it is delivering an 8-bit YUV format frame. However, the data is actually RAW bayer data. Apparently, due to the camera's high resolution (4912 x 3684) and 16 bit data, the images don't "fit" in a standard RAW image structure- at least that's what the vendor says.

I've tried to figure out a way to retrieve the RAW data from the frame that is returned using "read" or "retrieve" in VideoCapture but with no luck. Does anyone out there know the frame structures well enough to say how a RAW frame would be formatted if it were being read as if it were a 8-bit YUV frame? If so, how would one go about transforming the YUV image into a raw image? Is it possible that there is an undocumented keyword that allows one to specify the actual frame type?

My next thought would be to go to directly accessing the DLL that holds the videoio routines via ctypes (which has other advantages) but I haven't seen much in the way of documentation for that approach

Any help would be appreciated

M