Professional Documents
Culture Documents
Most images that you view over the internet or in your books
are in the RGB space. In a typical RGB image, each pixel is a c
ombination of three values, each representing a color in red,
green, and blue channels. White color in RGB space is writ
ten as (255, 255, 255) and black is written as (0, 0, 0). Red
, green, and blue are represented by (255, 0, 0), (0, 255,
0), and (0, 0, 255) respectively.
4. low level DIP
Until now, we may already how to read and save an im
age from the chosen route. And we also have learned t
wo packages for reading the image in, there are pillow
and skimage.
The following will give the materials for low level DIP.
Low-level processes involve primitive operations suc
h as image processing to reduce noise, contrast en
hancement, and image sharpening.
A low-level process is characterized by the fact th
at both its inputs and outputs are images.
After having understood the basics of image processin
g and their libraries (pillow and skimage), from now o
n, we will extend our understanding by looking at som
e fundamental concepts such as kernels, convolution,
filters, and basic image features.
Kernels
As you saw in the previous section, we used a derivative mask to an c
alculate image derivative. Before going further , let's formally define
what these masks are. A lot of times in texts/research papers/books
related to image processing, we use the terms mask, kernel, and filte
r interchangeably. What these essentially mean is a square matrix of
numbers that is used to compute various properties or characteristic
s in an image. You have already seen an example of an image derivati
ve. Some other common examples of such kernels/filters/masks are
edge
detection, image blurring, and more. As you read through this chapt
er, you will see various examples of kernels that will help you unders
tand this better.
Enhancing an image by applying some function on the
pixel values is called filtering. The process of filtering fo
cuses on the values of the neighborhood of a pixel and u
ses some to modify the value of the pixel. This is done b
y convolving the image matrix with a kernel. Therefore,
for different filters, you can create different types of ker
nels. By convolving the image matrix with the kernel, yo
u are basically taking a weighted average of the neighbo
ring values. This method can be used to reduce noise in
an image, create effects, and so on. . Types of filtering a
re as follows:
4-1image filters
The process of filtering f Types of filtering are as f
ocuses on the values of t ollows:
he neighborhood of a pix Gaussian blur
el and uses some to modi Median filter
fy the value of the pixel. Dilation and erosion
Customs filters
Image thresholding
4-2 Gaussian blur