mahmoudnafifi / WB_sRGB

White balance camera-rendered sRGB images (CVPR 2019) [Matlab & Python]
Other
344 stars 62 forks source link

Bug in Python version #9

Closed MortenHannemose closed 3 years ago

MortenHannemose commented 3 years ago

The Python version produces incorrect results for some images. This is due to line 104-105 in WBsRGB.py. These lines sort the distances, but not the already extracted mapping functions (line 101), thereby causing a mismatch between mapping matrix and distance/weight. If these two lines are commented out, the result is correct.

Should I open a pull request?

Additionally, I also have some misc. performance improvements. Should I open a separate PR for these?

mahmoudnafifi commented 3 years ago

Thanks!

yes please go ahead and open a PR for the bug, then if you don’t mind we can do the performance improvement in another PR. Many thanks!