diff options
author | Prabhu Ramachandran | 2018-05-15 22:05:02 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2018-05-15 22:05:02 +0530 |
commit | 67a937d9e41983c4cc39eddf4e2183125a8554c9 (patch) | |
tree | 0b98b7a3d928d2dd89c1f28d023e4da19be8a8f1 /scipy/basic/07_more_numpy.tex | |
parent | 9132e564c5f28f1b10d66d8323ad765f9d914231 (diff) | |
download | python-workshops-67a937d9e41983c4cc39eddf4e2183125a8554c9.tar.gz python-workshops-67a937d9e41983c4cc39eddf4e2183125a8554c9.tar.bz2 python-workshops-67a937d9e41983c4cc39eddf4e2183125a8554c9.zip |
Remove references to lena and use image of penguins.
Diffstat (limited to 'scipy/basic/07_more_numpy.tex')
-rw-r--r-- | scipy/basic/07_more_numpy.tex | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scipy/basic/07_more_numpy.tex b/scipy/basic/07_more_numpy.tex index c53cc41..3d4310d 100644 --- a/scipy/basic/07_more_numpy.tex +++ b/scipy/basic/07_more_numpy.tex @@ -302,13 +302,13 @@ Out[]: (3, 3) \frametitle{Elementary image processing} \begin{small} \begin{lstlisting} -In []: a = imread('lena.png') +In []: a = imread('penguins.png') In []: imshow(a) -Out[]: <matplotlib.image.AxesImage object at 0xa0384cc> +Out[]: <matplotlib.image.AxesImage object at ...> \end{lstlisting} \end{small} -\typ{imread} returns an array of shape (512, 512, 4) which represents an image of 512x512 pixels and 4 shades.\\ +\typ{imread} returns an array of shape (370, 370, 4) which represents an image of 370x370 pixels and 4 shades.\\ \typ{imshow} renders the array as an image. \end{frame} @@ -316,7 +316,7 @@ Out[]: <matplotlib.image.AxesImage object at 0xa0384cc> \frametitle{Slicing \& Striding Exercises} \begin{itemize} \item Crop the image to get the top-left quarter - \item Crop the image to get only the face + \item Crop the image to get only the face of the baby penguin \item Resize image to half by dropping alternate pixels \end{itemize} @@ -325,14 +325,14 @@ Out[]: <matplotlib.image.AxesImage object at 0xa0384cc> \frametitle{Solutions} \begin{small} \begin{lstlisting} -In []: imshow(a[:256,:256]) -Out[]: <matplotlib.image.AxesImage object at 0xb6f658c> +In []: imshow(a[:185,:185]) +Out[]: <matplotlib.image.AxesImage object at ...> -In []: imshow(a[200:400,200:400]) -Out[]: <matplotlib.image.AxesImage object at 0xb757c2c> +In []: imshow(a[225:300,150:250]) +Out[]: <matplotlib.image.AxesImage object at ...> In []: imshow(a[::2,::2]) -Out[]: <matplotlib.image.AxesImage object at 0xb765c8c> +Out[]: <matplotlib.image.AxesImage object at ...> \end{lstlisting} \end{small} \inctime{15} |