-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Description
System Information
OpenCV version: 3.4.3
Operating System / Platform: Windows 111
Detailed description
The weights (calculated by triangleWeights()) used for merging the images using MergeDebevec should be 0 for input values of 0 and 255. The weights array should be [0,...,127,127,...,0] instead of [1,...,128,128,...,1].
This is also described in the article referenced in the documentation for the algorithm (https://www.pauldebevec.com/Research/HDR/debevec-siggraph97.pdf - paragraph: 2.1)
By not setting them to 0 (current value used is 1), image parts which are overexposed (and thus have values of 255) will have influence on the merged image although they should not.
Steps to reproduce
I used the code from the following example: https://github.com/opencv/opencv/blob/4.x/samples/cpp/tutorial_code/photo/hdr_imaging/hdr_imaging.cpp
The bugs is evident when input contains images with many pixel = 255.
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)