The right way to access red channel in Lena
Adam Hughes
hughesadam87 at gmail.com
Thu Mar 26 19:16:12 EDT 2015
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/adb61915/attachment.html>
More information about the scikit-image
mailing list