We have already discussed the importance of pixel intensity and pixel layout (also known as spatial orientation) to the process of image analysis. This activity continues the discussion of pixels and pixel intensities, and incorporates statistical analysis. You will be creating pixel frequency plots of each color plane, and we will discuss how this can be analyzed and applied to the image analysis process
Understand the use and creation of pixel intensity histogram plots.
Explain the importance of histogram plots in image processing applications.
Create histogram plots for all color planes of a colored image.
Understand how histogram plots can be used toward understanding and learning about an image’s contents.
Access to a computer and large screen (if you want share with others)
A Google account to access Google Colab
A pen or pencil
Frequency - Refers to the number of occurrences within an image or color plane that have a particular intensity value.
Histogram - A histogram is the graphical representation of frequency values of all of the pixel intensity values within an image. In more general terms, a histogram is generally used to represent the distribution of numerical values within a set of data.
A histogram is a graphical representation of data. In the context of image processing, histograms are primarily used to visualize pixel color distribution of an image. The x-axis of a histogram will show the variety of pixel intensities. The y-axis is the count of each pixel intensity.
By visualizing the data of an image’s color planes in a histogram, we can associate a specific distribution of colors with a given category. For example we would expect an image of a red apple to have more pixels in the red channel than pixels in the blue channel, so if we have a histogram with a larger red intensity then we know our image is more likely to be an apple.
We use histograms to understand how a machine learning model might work. Similar to histograms, a machine learning model can use a dataset of a specific category with many different images and then compare the histograms of these images to find patterns or similarities. These comparisons can be used to more accurately predict a given input.
Ensure that the Image Processing Image Dataset folder (from Module 1 Introduction) is uploaded to your Google Drive as detailed in the Google Colab Interaction Guide.
Activity
Read and work through the Pixel Intensity Plots - Handout and the corresponding Pixel Intensity Plots - Colab Notebook.
Work through the Pixel Intensity Plots - Knowledge Assessment, you will need the Pixel Intensity Plots - Colab Notebook.
There are multitudes of available resources to assist in furthering your understanding of the concepts presented in this activity. The resources listed below are here to help you get started.