IP bug for rgb_to_hsl: returns NaNs
Created by: csmccool
The floating point implementations of "rgb_to_hsl" return NaNs if you pass an RGB array of ones (1.,1.,1.), however, the integer based methods don't seem to have this issue. Below are some examples of the problem using the python interface:
import bob;
import scipy;
bob.ip.rgb_to_hsl(scipy.array([[[1.]],[[1.]],[[1.]]])) # Using a scipy array or numpy array
RETURNS
array([[[ nan]],
[[ nan]],
[[ 1.]]])
While
bob.ip.rgb_to_hsl_f(1.,1.,1.)
RETURNS
(nan, nan, 1.0)
The integer based methods seem to be ok as can be seen below:
bob.ip.rgb_to_hsl_u8(255,255,255)
RETURNS
(0, 0, 255)
bob.ip.rgb_to_hsl_u16(65535,65535,65535)
RETURNS
(0, 0, 65535)
Cheers, Chris.