File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ cv::Mat* apply_hdr_to_sdr_tone_mapping(
2323 }
2424
2525 // Load ICC profile
26+ // NOTE: it may not be reliable to use just the icc profile for detecting HDR. some formats contain
27+ // flags and not profiles, but going to go with this for a first pass
2628 cmsHPROFILE src_profile = cmsOpenProfileFromMem (icc_data, icc_len);
2729 if (!src_profile) {
2830 return nullptr ;
@@ -65,6 +67,8 @@ cv::Mat* apply_hdr_to_sdr_tone_mapping(
6567 }
6668
6769 // Apply Reinhard tone mapping
70+ // Tried to use OpenCV's built in tone mapping, but ran into issues with
71+ // dimming blown out/deep fried images. Using this as a first pass
6872 std::unique_ptr<cv::Mat> dst_bgr = std::make_unique<cv::Mat>(src_for_transform->rows , src_for_transform->cols , CV_8UC3);
6973
7074 // Apply luminance-based tone mapping to preserve color relationships
You can’t perform that action at this time.
0 commit comments