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.