LSMI-dataset
LSMI-dataset copied to clipboard
illum_map becomes ZERO in 2_preprocess_data.py due to alpha and chormacities
Hello,
in preprocessing_data.py code, there is a LINE /
img_wb = img / illum_map
This is given in the paper as
Iab(WB) = Iab / Lab
where Lab
is illum_map. [equation 1]
Illum map is calculated as alpha* La + (1-alpha)*Lb = Lab
In this case, if alpha = 0, then Lb = Lab
Lb
is an RGB vector. In the case there is "zero" chromacity in even one channel of RGB, then Lb
would have an element of "0", causing a zero division in [equation 1].
This issue is arising, for example, in galaxy dataset on illum_map[1143,376,2] pixel value which is the blue one,
How to overcome this issue? Should there be a workaround in calculating alpha, say, alpha cannot become 0, or should there be a minimum chromacity value in illuminant RGB vectors other than simply "0"?
Thanks!