-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downsampling of images in hdr_debvec( ) is not as good as sampling individual pixels from them #1
Comments
Thanks for your research! 💯 If you have time, let's create a merge request so that you can contribute to the project. |
Cool, done. |
Is there a bug in |
@ssdutHB I think you may be right. I guess it should be |
Thank you for your kind and quick reply. |
cool, i'll fix it. |
Greetings!
Thanks for this implementation, I find that it successfully achieved what the OpenCV version currently does not, specifically with respect to proper weighting of saturated pixels.
To support, after some research, I have found an improvement.
Basically, for the current hdr_debvec( ) function, I kept on getting nasty response functions like this:
![response-curve_1](https://user-images.githubusercontent.com/1915466/82567060-21e38e80-9b7d-11ea-9995-1521ec1a9bee.png)
I realized that what is technically happening is downsampling of the pixel values, such that the pixels are averaged / interpolated across each other. This is very problematic in the case where the user has many, many saturated pixels: averaging these values will make them unsaturated, and create a false color in between.
I figured a more robust approach would be to instead just uniformly sample individual pixels across a grid of the image.
Here is how that changed my camera response function (3600 samples):
![response_curve_3600samples](https://user-images.githubusercontent.com/1915466/82567446-acc48900-9b7d-11ea-8dff-f0ad97710432.png)
Here is the new implementation (not my best code but it works):
Thanks again and great work.
The text was updated successfully, but these errors were encountered: