-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

IPython Interactive Computing and Visualization Cookbook
By :

The exposure of an image tells us whether the image is too dark, too light, or balanced. It can be measured with a histogram of the intensity values of all pixels. Improving the exposure of an image is a basic image-editing operation. As we will see in this recipe, that can be done easily with scikit-image.
You need scikit-image for this recipe. You will find the installation instructions at http://scikit-image.org/download.html. With Anaconda, you can just type conda install scikit-image
in a terminal.
You also need to download the Beach dataset from the book's GitHub repository at https://github.com/ipython-books/cookbook-data.
Let's import the packages:
In [1]: import numpy as np import matplotlib.pyplot as plt import skimage.exposure as skie %matplotlib inline
We open an image with matplotlib. We only take a single RGB component to have a grayscale image (there are better ways to convert a colored image...
Change the font size
Change margin width
Change background colour