You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To obtain sRGB images of ground truth,I processed the images in two ways with your scripts. For detail:
1st: run '1_make_mixture_map.py' with 'VISUALIZE=True'. And I got GT sRGB image, e.g. 'Placexxx_wb12.png'.
2nd: run '2_preprocess_data.py' with full resolution(i.e. SQUARE_CROP = False, SIZE = None, TEST_SIZE = None), and got GT tiff image, e.g. 'Placexxx_12_gt.tiff'. Then processed it with 'visualize.py' and got GT sRGB image, e.g. 'Placexxx_12_gt.png'.
HOWEVER, I compared these two sRGB images, and they are different.
What causes this and what should I do to fix it?
Looking forward to your reply.
The text was updated successfully, but these errors were encountered:
Hi, @0Error0Warning, thank you for your interest about my work.
I saw that issue in my repo, but I’ve been quite busy these days to have time to answer the issue.
I am sorry about that :(
I think that there is a slight difference between two visualization process.
In 1_make_mixture_map.py, the white balance process is done by following steps.
Open raw image using rawpy (Directly open RAW file, not using DCRAW or Tiff)
Apply WB using illumination map, directly accessing to raw_image_array in RawPy instance (apply_wb_raw function, line 194)
Visualize sRGB image using postprocess function
So [open RAW → direct WB application → postprocess]
In visualize.py,
GT tiff file is generated through [ Tiff conversion using DCRAW → WB application → saved as Tiff ]
To visualize tiff file into sRGB, we utilize fake raw file and copy pixels into RAW instance
Visualize sRGB image using postprocess function
So [Tiff conversion using DCRAW → WB application in Tiff → overwrite pixels into fake RAW instance → postprocess]
You can compare the differences in these processes and explore where the differences in values occur.
You can compare the value of raw_image after opening the RAW image with Rawpy with the value saved as a TIFF file using DCRAW.
However, sRGB images are images that have undergone a lot of post-processing, so if you use images that are visualized according to one criterion, there should be no problem.
For white balance research, the sRGB image is for reference only. If you want to compare the correct values, please use the values in the RAW domain.
The pixel values in the dataset I provide are all provided in TIFF format using DCRAW, so they will have consistent values.
To obtain sRGB images of ground truth,I processed the images in two ways with your scripts. For detail:
1st: run '1_make_mixture_map.py' with 'VISUALIZE=True'. And I got GT sRGB image, e.g. 'Placexxx_wb12.png'.
2nd: run '2_preprocess_data.py' with full resolution(i.e. SQUARE_CROP = False, SIZE = None, TEST_SIZE = None), and got GT tiff image, e.g. 'Placexxx_12_gt.tiff'. Then processed it with 'visualize.py' and got GT sRGB image, e.g. 'Placexxx_12_gt.png'.
HOWEVER, I compared these two sRGB images, and they are different.
What causes this and what should I do to fix it?
Looking forward to your reply.
The text was updated successfully, but these errors were encountered: