Re: [scikit-image] image type issue and failed conversion

2016-12-29 Thread Egor Panfilov
Hi Yuanyuan, In your example the image data range is not being rescaled as it already has dtype float. `img_as_float` will rescale from [0:255] to [0:1] only if the dtype of input ndarray is of integer family (and, in your case, uint8). Take a look: In [3]: nd_int = np.random.randint(0, 255, (3,

Re: [scikit-image] image type issue and failed conversion

2016-12-29 Thread wine lover
Hi Egor, Hi Juan, Thank you very much for the help! Yuanyuan On Thu, Dec 29, 2016 at 4:16 AM, Egor Panfilov wrote: > Hi Yuanyuan, > > In your example the image data range is not being rescaled as it already > has dtype float. `img_as_float` will rescale from [0:255] to [0:1] only > if the dtyp