1: Digital Images as Numbers
To start off my blog posts, we will quickly look at digital images with a different perspective for image processing using Python. At the surface, images come in different filetypes such as png, jpeg, jpg, bitmap, etc. However, like all things digital or computer related, they need to have a numerical representation. The libraries used in this series of blog posts include skimage, opencv, pillow, numpy, etc.
Images need to be read by specific functions such as the imread and can be shown via the imshow function. Additional functions and libraries will be imported when needed.
A sample image and its numerical representation can be seen below.
Here, the image can be seen as an array. The numbers are the decimal values of the colors; 0 for black and 255 for white. The values in between our how dark or light the shade is. To represent colors however, additional layers are necessary, 3 to be specific. These are the Red, Green, and Blue (RGB) channels.
To show how the color channels work, I have created an array with 3 channels and an image shape of 3x3 or 9 pixels. In the array shape of (3, 3, 3), the 1st 3 stands for the number of rows (height/length), 2nd 3 stands for the number of columns (width), and the last 3 stands for the 3 color channels.
For example, looking at the red channel alone shows that the 1st pixel of each row is red while other pixels are lack of red and therefore white. Since the other columns in the original image are pure G and B, they have no influence on this channel.
However, when the channels interact, a variety of colors is created. The different channels now have overlapping values. The bottom right pixel as 150 R, 0 G, and 255 B, which creates the shade of purple.
There are various methods to show these images but take note of how they are represented along the axes.
Image Processing Operations, henceforth, involves calculations and manipulations/functions to those numerical values.
Please check out my other posts in this series.
2: Introduction to Basic Operations
A light introduction to Sampling and Quantization for Image Processing
3: Fourier Transformations
A light introduction to Fourier Transformation and its application in Image Processing
8: Blob Detection and Connected Components
A light introduction to Blobs and Regionprops
10: Image (Chromaticity) Segmentation
A light introduction to Image Chromaticity Segmentation
11: Additional Topics: Homography, Template Matching, Texture, Image Differencing
A light introduction to Homography, Template Matching, Texture Metrics, and Image Differencing