Fix line wrapping from #625

Strip trailing whitespace

(cherry picked from commit 932a66a78bac5b41f723758ba6dd6489c1346215)
This commit is contained in:
Ian Cordasco
2015-10-31 10:55:15 -05:00
parent b02a66ae98
commit de12022fc3
+28 -26
View File
@@ -2,11 +2,9 @@
Image Manipulation Image Manipulation
================== ==================
.. todo:: Most image processing and manipulation techniques can be carried out
Add introduction about image manipulation and its Python libraries. effectively using two libraries: Python Imaging Library (PIL) and OpenSource
Computer Vision (OpenCV).
Most image processing and manipulation techniques can be carried out effectively using
two libraries: Python Imaging Library (PIL) and OpenSource Computer Vision (OpenCV).
A brief description of both is given below. A brief description of both is given below.
@@ -39,24 +37,24 @@ Example
.. code-block:: python .. code-block:: python
from PIL import Image, ImageFilter from PIL import Image, ImageFilter
#Read image #Read image
im = Image.open( 'image.jpg' ) im = Image.open( 'image.jpg' )
#Display image #Display image
im.show() im.show()
#Applying a filter to the image #Applying a filter to the image
im_sharp = im.filter( ImageFilter.SHARPEN ) im_sharp = im.filter( ImageFilter.SHARPEN )
#Saving the filtered image to a new file #Saving the filtered image to a new file
im_sharp.save( 'image_sharpened.jpg', 'JPEG' ) im_sharp.save( 'image_sharpened.jpg', 'JPEG' )
#Splitting the image into its respective bands, i.e. Red, Green, #Splitting the image into its respective bands, i.e. Red, Green,
#and Blue for RGB #and Blue for RGB
r,g,b = im_sharp.split() r,g,b = im_sharp.split()
#Viewing EXIF data embedded in image #Viewing EXIF data embedded in image
exif_data = im._getexif() exif_data = im._getexif()
exif_data exif_data
There are more examples of the Pillow library in the There are more examples of the Pillow library in the
`Pillow tutorial <http://pillow.readthedocs.org/en/3.0.x/handbook/tutorial.html>`_. `Pillow tutorial <http://pillow.readthedocs.org/en/3.0.x/handbook/tutorial.html>`_.
@@ -65,14 +63,17 @@ There are more examples of the Pillow library in the
OpenSource Computer Vision OpenSource Computer Vision
-------------------------- --------------------------
OpenSource Computer Vision, more commonly known as OpenCV, is a more advanced image manipulation and processing software than PIL. It has been implemented in several OpenSource Computer Vision, more commonly known as OpenCV, is a more advanced
languages and is widely used. image manipulation and processing software than PIL. It has been implemented
in several languages and is widely used.
Installation Installation
~~~~~~~~~~~~ ~~~~~~~~~~~~
In Python, image processing using OpenCV is implemented using the ``cv2`` and ``NumPy`` modules. In Python, image processing using OpenCV is implemented using the ``cv2`` and
The `installation instructions for OpenCV <http://docs.opencv.org/2.4/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction>`_ should guide you through configuring the project for yourself. ``NumPy`` modules. The `installation instructions for OpenCV
<http://docs.opencv.org/2.4/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction>`_
should guide you through configuring the project for yourself.
NumPy can be downloaded from the Python Package Index(PyPI): NumPy can be downloaded from the Python Package Index(PyPI):
@@ -101,5 +102,6 @@ Example
#Saving filtered image to new file #Saving filtered image to new file
cv2.imwrite('graytest.jpg',gray) cv2.imwrite('graytest.jpg',gray)
There are more Python-implemented examples of OpenCV in this `collection of tutorials <http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_tutorials.html>`_. There are more Python-implemented examples of OpenCV in this `collection of
tutorials
<http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_tutorials.html>`_.