DisentangledColorization icon indicating copy to clipboard operation
DisentangledColorization copied to clipboard

Why AB channel in CIE Lab space scaled by 110

Open yyang181 opened this issue 3 years ago • 1 comments

Hi, Wonderful work! As stated on L.35 in ./utils/dataset_lab.py, the ab channels are scaled by 110. instead of 128. Would you please explane the reason? In OPENCV, LAB space should be defined as L -> 0~100, a -> -128~+128, b-> -128~+128. Thanks again for your wonderful work.

yyang181 avatar Feb 20 '23 07:02 yyang181

In theory, Lab space can represent more colors than RGB space, namely there are some <L,a,b> samples that have no sample correspondences in RGB. So, if you traverse the 256x256x256 RGB grid space and convert them into corresponding Lab samples, you will find that all the a, b values will fall within the range of -110~110 (specifically, -86.187<a<98.234 and -107.859<b<94.469).

MenghanXia avatar Feb 20 '23 09:02 MenghanXia