Ask Your Question

Revision history [back]

12 bits RAW data output camera sensor, how to get raw stream by opencv?

I bought a RAW data output camera sensor, it's data sheet on this website.

https://www.leopardimaging.com/uploads/LI-USB30-IMX225C_datasheet.pdf

Then i prepare to get raw stream by opencv,

simple code like this:

int main() { 
    VideoCapture cap(0);
    int Key;
    Mat src;
    if (cap.isOpened()) {
    while(1){
        cap.read(src);
        namedWindow("capture", 0);
        imshow("capture", src);
        waitKey(10);
    }
  }
}

But a problem occurred, the raw data resolution should be 1312x992, however, the imshow image's resolution is 320x240! And color is abnormal. The screensaver blow:

image description

I don't know how to fix the resolution problem and color problem.

So if anybody can help me. Thanks.