@@ -40,7 +40,8 @@ examples, if you use the -pylab method, you can skip the "mpimg." and
40
40
Importing image data into Numpy arrays
41
41
===============================================
42
42
43
- Plotting image data is supported by the Python Image Library (`PIL <http://www.pythonware.com/products/pil/ >`_), . Natively, matplotlib
43
+ Plotting image data is supported by the Python Image Library (`PIL
44
+ <http://www.pythonware.com/products/pil/> `_). Natively, matplotlib
44
45
only supports PNG images. The commands shown below fall back on PIL
45
46
if the native read fails.
46
47
@@ -121,7 +122,8 @@ reading/writing for any format other than PNG is limited to uint8
121
122
data. Why 8 bits? Most displays can only render 8 bits per channel
122
123
worth of color gradation. Why can they only render 8 bits/channel?
123
124
Because that's about all the human eye can see. More here (from a
124
- photography standpoint): `Luminous Landscape bit depth tutorial <http://www.luminous-landscape.com/tutorials/bit-depth.shtml >`_.
125
+ photography standpoint): `Luminous Landscape bit depth tutorial
126
+ <http://www.luminous-landscape.com/tutorials/bit-depth.shtml> `_.
125
127
126
128
Each inner list represents a pixel. Here, with an RGB image, there
127
129
are 3 values. Since it's a black and white image, R, G, and B are all
@@ -170,14 +172,15 @@ typically quite poor.
170
172
171
173
Pseudocolor is only relevant to single-channel, grayscale, luminosity
172
174
images. We currently have an RGB image. Since R, G, and B are all
173
- similar (see for yourself above or in your data), we can just pick on
175
+ similar (see for yourself above or in your data), we can just pick one
174
176
channel of our data:
175
177
176
178
.. sourcecode :: ipython
177
179
178
180
In [6]: lum_img = img[:,:,0]
179
181
180
- This is array slicing. You can read more in the `Numpy tutorial <http://www.scipy.org/Tentative_NumPy_Tutorial >`_.
182
+ This is array slicing. You can read more in the `Numpy tutorial
183
+ <http://www.scipy.org/Tentative_NumPy_Tutorial> `_.
181
184
182
185
.. sourcecode :: ipython
183
186
@@ -226,8 +229,10 @@ object:
226
229
imgplot = plt.imshow(lum_img)
227
230
imgplot.set_cmap('spectral')
228
231
229
- There are many other colormap schemes available. See the `list and
230
- images of the colormaps
232
+ There are many other colormap schemes available. See the `list of
233
+ colormaps
234
+ <http://matplotlib.org/api/pyplot_summary.html#matplotlib.pyplot.colormaps> `_
235
+ and `images of the colormaps
231
236
<http://matplotlib.org/examples/pylab_examples/show_colormaps.html> `_.
232
237
233
238
.. _`Color Bars` :
0 commit comments