downscaling float32 image to uint12 via scikits.img_as_uint()

Sigmund siggin at gmail.com
Sat Feb 25 15:18:15 EST 2012



Am Samstag, 25. Februar 2012 17:46:33 UTC+1 schrieb Tony S Yu:
>
> Hi Siggi,
>
> It sounds like you may have a float32 image with values outside of the 
> assumed range of 0--1 (see user guide<http://scikits-image.org/docs/dev/user_guide/data_types.html>). 
>
>

correct!
 

> A couple of solutions; unfortunately, both require you to run skimage from 
> github (there's been a lot of activity since the last release):
>

no issues with the 0.5dev installation and use so fare on Mac OSX 10.6.8
 

> * Assuming you have float values outside the range, use 
> `rescale_intensity`<http://scikits-image.org/docs/dev/api/skimage.exposure.html#rescale-intensity> to 
> rescale your image to the correct range. (You can also do this manually 
> too, of course).
>
 
kept the float values since conversion is not needed anymore
 

> * Use `threshold_otsu`<http://scikits-image.org/docs/dev/api/skimage.filter.html#threshold-otsu> from 
> skimage instead of mahotas.
>

works great!
 

> Also, all conversion functions should now (i.e. github master) raise an 
> error when given a float image outside of the 0--1 range, so this shouldn't 
> happen in the future.
>

in my case they  raise the error


> Best,
> -Tony
>
>
Thanks! Great job!

Siggi
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20120225/fd23da7f/attachment.html>


More information about the scikit-image mailing list