img_as_float

Stéfan van der Walt stefanv at berkeley.edu
Wed Feb 17 20:06:52 EST 2016


On 17 February 2016 at 15:36, Michael Aye <kmichael.aye at gmail.com> wrote:
> I agree with Robin that changing the range of values silently (if that's
> still the case) is a problem for users like us where the pixel values are
> actually some kind of physical measures and not just a RGB value of a
> photograph.
> One quick fix would be to be 'quite loud' about it and provide user feedback
> when it happens.
> I would welcome an effort to remove this where possible.

I am not opposed to supporting range preservation, but we do have to
think a bit about the implications:

- what do you do when the data-type of values change?
- what do you do when your operation due to, e.g., rounding issues
push values outside the input range?
- what do you do when you need to know the full potential range of the data?

The ``preserve_range`` flag has allowed us to do whatever we do
normally, unless the user gave explicit permission to change data
types, ranges, etc.  It also serves as a nice tag for "I, the
developer, thought about this issue".

Stéfan



More information about the scikit-image mailing list