The right way to access red channel in Lena
Stéfan van der Walt
stefanv at berkeley.edu
Thu Mar 26 20:38:55 EDT 2015
Hi Adam
On Thu, Mar 26, 2015 at 4:31 PM, Adam Hughes <hughesadam87 at gmail.com> wrote:
> ax1.imshow(lena*(1,0,0))
> ax2.imshow(lena*(255,0,0))
>
The multiplication turns your image's dtype into uint64, which causes the
scaling problems.
I prefer with float images, always ensuring that they are in [0, 1] and
then specifying vmin=0 and vmax=1 to matplotlib.
Regards
Stéfan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150326/64e57c0d/attachment.html>
More information about the scikit-image
mailing list