Histogram Calculation and Image Filtering

Artificial Intelligence & Information Analysis

Topic: OpenCV is a very powerful tool for computer vision and image processing tasks. It provides various functions that allow us to perform easily useful simple or more advanced tasks.

Exercise: Create the image shown Figure 1 using OpenCV and numpy. The dimensions of the image are:

  1. The whole image has dimensions of 288 Χ 288,
  2. Each tile has dimensions of 32 Χ 32.

Display the image to the user and calculate the image histogram. After that, calculate the histogram of the convoluted image with the kernel:

[latex] f= \begin{bmatrix} 0.25& 0.25\\ 0.25& 0.25 \end{bmatrix} [/latex]

Figure 1: Image for exercise.


For the solutions to the exercises, please contact Ioanna Koroni: koroniioanna@csd.auth.gr