jorge-pessoa / pytorch-colors

Small utility for color space conversions of PyTorch Tensors and Variables
MIT License
188 stars 15 forks source link

the value range of lab space #3

Closed qivigor closed 4 years ago

qivigor commented 5 years ago

I want to know the value range of lab space. when I use the 'colors.lab_to_rgb' , I got a UserWarning: Color data out of range: Z < 0 in 42194 pixels.

jorge-pessoa commented 4 years ago

Hello,

I apologize for the delay in answering. The underlying implementation by scikit-image uses the following value ranges for LAB: L (0-100), a (-128-127), b (-128-127). For a proper conversion you will need to scale your image for these ranges.