Image data types and conversions
Andreas Mueller
amueller at ais.uni-bonn.de
Mon Sep 26 14:07:34 EDT 2011
Hi Stefan.
> Accuracy is definitely #1. That's why the suggestion is that
> algorithms choose for themselves. Sometimes it makes sense to return
> the same type as the input, sometimes it doesn't. What is important
> is that images remain scaled, and can again be interpreted by the next
> function in the pipeline. Where possible, we do not want to make
> copies in memory. So, in rgb2gray's case, e.g., the conversion gives
> floating point numbers by default. We do not need to convert those
> numbers to uint for the user and, actually, we shouldn't--because that
> would destroy accuracy.
>
Thanks. That definitely answers my question.
> I'll whip up the conversion functions and offer them as a PR. This is
> probably important, since it will influence the code written for 0.4 a
> lot.
>
Thanks for tanking my concern seriously. Sounds great :)
Cheers,
Andy
More information about the scikit-image
mailing list