TCL-AILab / Abandon_Bayer-Filter_See_in_the_Dark

Source code for CVPR2022 paper "Abandoning the Bayer-Filter to See in the Dark"
95 stars 12 forks source link

MCR color raw images are missing color #5

Closed igor-morawski closed 1 year ago

igor-morawski commented 1 year ago

It seems that MCR raw color images are missing colors. I downloaded the MCR dataset from the Google Drive link in the repo, and noticed that images in Color_RAW_Input (C*.tif) are in grayscale. I downloaded the dataset on two computers (MAC and Fedora) to make sure that it's not an error in the OS preview. I also confirmed that issue persists when loading the files in Python with OpenCV - the images have three channel colors that are identical.

The issue us only with tifs in Color_RAW_Input directory, jpg images in RGB_GT are in color.

igor-morawski commented 1 year ago

Oh, I realized that this is RGGB Bayer pattern image, the fact that cv2 reads it as a 3-channel image by default misled me a bit!

igor-morawski commented 1 year ago

In that case, could you tell me what's the color space used in raw color images? Is that linear RGB or a device-specific color space? And if it's device specific, are color matrices available to convert raw-RGB to XYZ?

xingbod commented 1 year ago

The raw image is in Bayer Array with a RGGB pattern. You may check RawPy (or any other ISP software) to convert the raw image into RGB image. After that you can convert RGB to any other color space.