The right way to access red channel in Lena

Adam Hughes hughesadam87 at gmail.com
Thu Mar 26 19:31:58 EDT 2015


I don't think the image came through.  Let me attach it

On Thursday, March 26, 2015 at 7:16:12 PM UTC-4, Adam Hughes wrote:
>
> I'm trying to build a filter to show only the red channel in the lena 
> image.  I defined two masks:
>
> (1,0,0)
> (255,0,0)
>
> Oddly, the (255,0,0) gives me the correct plot when doing imshow(), but 
> (1,0,0) doesn't.  Why does the (1,0,0) mask lead to light regions being 
> dark and dark regions being light?  Here's a working example:
>
> %pylab inline
> from skimage.data import lena
>
> lena = lena()
>
> f, (ax1, ax2) = plt.subplots(1,2, figsize=(8,6))
>
> ax1.imshow(lena*(1,0,0))
> ax2.imshow(lena*(255,0,0))
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150326/412fb08d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: red_lena.png
Type: image/png
Size: 99444 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150326/412fb08d/attachment.png>


More information about the scikit-image mailing list