opencv/doc/tutorials
Abhishek Gola aef6ae4872
Merge pull request #27396 from abhishek-gola:hdr_bug_fix
Fix NaNs in HDR Triangle Weights and Tonemapping and Update LDR Ground Truth in tutorial #27396

The PR closes #27392 

Updated the triangle weights to use a small epsilon value instead of zero to prevent NaN issues in HDR processing.
Also fixed a float-to-double division issue by explicitly casting double values to float, which was previously producing garbage values and leading to NaNs in tonemapping.

The current LDR ground truth image used in the tutorial [ldr.png](https://github.com/opencv/opencv/blob/4.x/doc/tutorials/others/images/ldr.png) was originally generated using TonemapDurand (check this commit 833f8d16fa), which was moved to opencv_contrib a long time ago in this commit: 742f22c09b. However, the current Tonemap implementation in OpenCV main only performs normalization and gamma correction, which produces noticeably different results. This PR updates the LDR grouth truth image in tutorial with the result of TonemapDrago, and tutorials to use TonemapDrago as Tonemap gives a darker image.

Tonemap output:
![ldr2](https://github.com/user-attachments/assets/e4f0cb97-ee4f-47b9-8962-2020ff211fd5)

TonemapDrago output:
![ldr](https://github.com/user-attachments/assets/4a898101-22bd-49e5-8db0-9e1062974ba3)


### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2025-06-05 09:02:58 +03:00
..
app Merge pull request #27230 from sirudoi:4.x 2025-04-25 11:04:19 +03:00
calib3d Merge pull request #27221 from shyama7004:docChanges 2025-04-21 21:15:37 +03:00
core Merge pull request #26441 from sturkmen72:upd_tutorials 2025-03-11 16:17:21 +03:00
dnn Merge pull request #27363 from MRo47:openvino-npu-support 2025-05-27 14:13:49 +03:00
features2d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-10-15 16:44:47 +00:00
gapi Typos and formating fixes. 2022-10-04 15:52:38 +03:00
gpu fix 4.x links 2021-12-22 13:24:30 +00:00
imgproc Merge pull request #26441 from sturkmen72:upd_tutorials 2025-03-11 16:17:21 +03:00
introduction Updating doc markdown to include API in FastCV gemm HAL 2025-05-30 17:01:07 +05:30
ios Fix typos in tutorials within docs/ 2022-03-17 16:06:54 -04:00
objdetect fix the not working link 2025-03-07 17:39:49 +05:30
others Merge pull request #27396 from abhishek-gola:hdr_bug_fix 2025-06-05 09:02:58 +03:00
tutorials.markdown Merge pull request #23018 from stopmosk:move-aruco-tutorial 2024-02-26 14:57:46 +03:00