Image data type ranges

Thouis Jones thouis at gmail.com
Wed Oct 26 09:40:26 EDT 2011


On Wed, Oct 26, 2011 at 11:19, Andreas Mueller <amueller at ais.uni-bonn.de> wrote:
> You're right. Maybe there is no way to avoid having the user create
> arrays with unexpected types.
> I think if we check the ranges and throw errors, the users
> should get the idea.

Where, besides file input and output, does the scikit have algorithmic
assumptions about images having a particular data format or range?
How many of these can be wrapped in such a way that there are no
assumptions about input range (i.e., by prescaling min/max to [0,1]
and postscaling back to the original range)?

This has been an ongoing problem for us in CellProfiler.  We usually
assume that images are [0,1], but try to avoid making it a hard
assumption.  There are times when images are completely ouside this
range, such as when we compute an illumination correction image, which
we put into the range [1,X] so that when a [0,1] image is divided by
the illumination correction, it remains in [0,1].

Ray Jones



More information about the scikit-image mailing list