Hi Stefan, Thanks for reviewing. 2009/10/22 Stéfan van der Walt <stefan@sun.ac.za>
Hi Ralf
2009/10/21 Ralf Gommers <ralf.gommers@googlemail.com>:
The code I have so far lives here: http://github.com/rgommers/scikits.image/tree/color
Thanks for cleaning up the colour conversion routines! Here are some review comments:
- Add this contribution to CONTRIBUTORS.txt - Do not check types explicitly against ndarray. A safer route is to use "asanyarray". - "float32" is not a valid dtype descriptor -- use np.float32 instead
all done.
- Question: why are there NaN's in the output?
I assume you mean the two isnan checks? I removed the one in hsv2rgb, it was not necessary. The one in rgb2hsv should be there, because there are some divisions (see for example the S channel) that can be zero. Setting those NaN elements to zero is correct, and more efficient than doing a check for zeros beforehand. If you meant you see actual NaN's in the output that would be a bug. Cheers, Ralf
Regards Stéfan