Dip Unit-2
Dip Unit-2
Blurr image
Sharp image
Edges
Medical field
The common applications of DIP in the field of medical is
Gamma ray imaging
PET scan
X Ray Imaging
Medical CT
UV imaging
UV imaging
In the field of remote sensing , the area of the earth is scanned by a satellite or from a very high
ground and then it is analyzed to obtain information about it. One particular application of digital
image processing in the field of remote sensing is to detect infrastructure damages caused by an
earthquake.
As it takes longer time to grasp damage, even if serious damages are focused on. Since the area
effected by the earthquake is sometimes so wide , that it not possible to examine it with human
eye in order to estimate damages. Even if it is , then it is very hectic and time consuming
procedure. So a solution to this is found in digital image processing. An image of the effected
area is captured from the above ground and then it is analyzed to detect the various types of
damage done by the earthquake.
The key steps include in the analysis are
The extraction of edges
Analysis and enhancement of various types of edges
Transmission and encoding
The very first image that has been transmitted over the wire was from London to New York via a
submarine cable. The picture that was sent is shown below.
The picture that was sent took three hours to reach from one place to another.
Now just imagine , that today we are able to see live video feed , or live cctv footage from one
continent to another with just a delay of seconds. It means that a lot of work has been done in
this field too. This field doesnot only focus on transmission , but also on encoding. Many
different formats have been developed for high or low bandwith to encode photos and then
stream it over the internet or e.t.c.
Machine/Robot vision
Apart from the many challenges that a robot face today , one of the biggest challenge still is to
increase the vision of the robot. Make robot able to see things , identify them , identify the
hurdles e.t.c. Much work has been contributed by this field and a complete other field of
computer vision has been introduced to work on it.
Hurdle detection
Hurdle detection is one of the common task that has been done through image processing, by
identifying different type of objects in the image and then calculating the distance between robot
and hurdles.
Line follower robot
Most of the robots today work by following the line and thus are called line follower robots. This
help a robot to move on its path and perform some tasks. This has also been achieved through
image processing.
Color processing
Color processing includes processing of colored images and different color spaces that are used.
For example RGB color model , YCbCr, HSV. It also involves studying transmission , storage ,
and encoding of these color images.
Pattern recognition
Pattern recognition involves study from image processing and from various other fields that
includes machine learning ( a branch of artificial intelligence). In pattern recognition , image
processing is used for identifying the objects in an images and then machine learning is used to
train the system for the change in pattern. Pattern recognition is used in computer aided diagnosis
, recognition of handwriting , recognition of images e.t.c
Video processing
A video is nothing but just the very fast movement of pictures. The quality of the video depends
on the number of frames/pictures per minute and the quality of each frame being used. Video
processing involves noise reduction , detail enhancement , motion detection , frame rate
conversion , aspect ratio conversion , color space conversion e.t.c.
Fundamental steps in digital image processing:
Image acquisition is the processing of acquiring an image; it deals with the origin of the image
and different preprocessing steps, like scaling.
Image filtering and enhancement is when the captured image is being enhanced (improving
quality) using different methods like filtering an image or any other enhancement operations.
Image enhancement is subjective as it depends on the specific type of task and specific data. For
the X-ray image, you may need image filtering but on a satellite image, you may not need it.
Image restoration is again the step of improving the quality of an image but unlike image
enhancement which is task-specific and depends on the owner or person who is the decision
maker here the decision is based on mathematical relations and probabilities. Image restoration is
objective.
Color image processing is the most popular subfield of DIP nowadays because of the amount
of quality of color images produced each day by humans and consumed by humans before bow
we have worked with grey images but now onward we will work on color where we have three
channels instead of just one and we will know how to apply a different operation on color images.
Wavelets transform based on the concept of representing images in different resolutions to
perform different kinds of tasks which is not possible in the original form.
Compression is the technique of reducing the size of digital images nowadays this technique may
not be helpful for storing images as we have no issues with space but it may be helpful on the
internet to transfer the data where the bandwidth matters.
Morphological processing deals with the tools used to extract image components that are
useful in describing and representing the shape of the object in the image
Segmentation is the task of separating the region of interest in the given image; it can be done
using different classical algorithms and advanced deep-learning architectures.
Feature extraction follows the output of the segmentation where the boundary or the edges of
the object are extracted. Feature extraction consists of two parts feature detection and feature
description. Feature detection refers to the detection of the boundary of the object in the image
and feature description refers to the quantitative description of the detected features.
Image classification follows the output of the feature extraction step where the label is given
to the extracted feature of the object in the image. E.g. car, bike etc.
Component required for DIP system
To perform DIP on images or even videos we need a special type of system that has all the
capabilities to handle the task of DIP because here we work with images and it could be costly or
even impossible for most of the systems that we have it requires specialized hardware software
and computers to perform DIP operation so we need to have that system before going into the
DIP. The components of a DIP system are Image sensors, Specialized image process hardware,
Specialized software, computer, Mass storage, Image display, Hardcopy, and Network
communication.
To sense or capture an image the sensors must have two components these are the physical device
which is used to read or sense the radiation emitted by the object and the second component is the
digitizer which is used to quantize and digitize the continuous signals into discrete values.
To process the image we need specialized processing hardware that has to have two components
that is the digitizer and ALU to perform arithmetic and logical operations on the image.
To interact with this hardware we need special software for image processing where we can write
high-level instructions to be performed by the hardware on the image.
After processing we will be required to store the process image somewhere for that we need a
Mass storage device because these images require more space to be stored but today it is not an
issue.
For storing 1024*1024 resolution pixel each pixel need 8 byte space require 1MB space for the
image.
To view the image we need a high-level display to look at the effect on an image after
preprocessing and before preprocessing and the image affects our required task.
And also we need sometime a hard copy in the form of a CD player to store the image. But
nowadays we have the internet to transfer data/images usually we do not need the hard copy.
The below image shows the Components of the DIP system
Sampling
Sampling is done only on an independent variable. For example, if we digitize x-axis in
sampling.
y=sinx (it is done on variable x)
Sampling is divided into two parts:
upsampling
downsampling
There are variations in the sampled signal which is due to noise. To reduce the noise more
samples are taken which means more data or pixel which result in a better image with less noise
present in it.
In an image, pixel is the smallest element which is represented in the form of a matrix.
In sampling, the number of samples taken in X-axis is continuous and refers to a number of
pixels in that image.
Oversampling:
As we have seen above, there are two types of sampling, up-sampling, and down-sampling.
Up-sampling is also known as oversampling.
In an image, oversampling means using a high-resolution image sensor as compare to camera
output image resolution.
One of the oversampling applications in image processing is known as zooming.
Zooming:
Increasing pixel quantity is known as Zooming. When we zoom in an image, more detail can be
seen.
Increasing the number of pixels is done using oversampling.
Zooming has two steps:
1. In a new location, new pixels are created.
2. And assignment of the gray level to a new location.
Another, way to zoom an image is by zooming optically using the motor movement of the lens,
and then the image is captured.
Optical Zoom vs. digital Zoom:
Optical zoom is used by Photographer to capture an image Digital zoom is a part of digital cameras. It can crop
without moving physically closer to that object. the entire image, and the portion of an image which is
zoomed can be digitally enlarged.
In a digital camera, the optical zoom ratio is used to measure Digital zoom crops the image from the center with the
lens, that how much it can be zoomed to make the object same ratio from all the sides. And the image results in
appear closer. Optical zoom enlarges an image, and it keeps the original dimension of the pixel. As this method
the resolution and sharpness of the image high. involves cropping, so the image quality and resolution
are reduced.
There is no relation between the optical zoom and the As the digital camera can crop a portion of an image
resolution of an image. Because the optical zoom is used to and enlarge it to its original size. Due to this, the
enlarge the image and its quality depends on the megapixel of quality of the image is reduced as compared to the
the camera. original image.
Optical zoom is useful when an image is taken in landscape or Digital zoom is used to take images from closer to the
if we want a closer view of an object without reducing the object when the photographer wants to take pictures of
quality of the image. a particular object
For example, taking a picture of the rainbow in the sky. For example, clicking pictures at the birthday party of
the birthday boy.
Zooming methods
There are three types of methods used in zooming; they are as follows:
1. Pixel replication or (Nearest neighbor interpolation)
2. Zero-order hold method
3. Zooming K times
Pixel replication
Pixel replication is also known as Nearest neighbor interpolation. In this method, a copy is
produced of the neighboring pixels. This algorithm works the same as zooming.
Working:
In this method, new pixels are generated from the originally given pixel. Each pixel is copied
from its neighboring pixel n time row and column-wise, and we get a zoomed image.
For example, we have 2 row and 2 columns of an image. And we zoom the image twice.
ROW WISE ZOOMING:
When an image is zooming row-wise, it copies the pixels from row to the new cell
As we can see that the original image was having2 rows and 2 columns, but after zooming the
image, it is converted into 4 rows and 4 columns.
Advantages:
It is very simple, and we have to copy the pixels.
Disadvantages
When we zoom an image, the output is very blurry. As a result, we have a full blurred image.
Zero order hold
It is another method of zooming. Zero order hold is also known as zoom in twice, as it can only
be zoomed twice.
Working
In this method, two adjacent elements are taken from the row, then elements are added, and the
result is divided by two. The result is placed in between the elements.
For example:
We have 2 rows and 2 columns of an image and we zoom in the image twice.
Row Wise Zooming
When an image is zooming in row-wise, then rows are added (5+6) =11 and then it is divided by
2. We will get 5.5 approximate to 5 and the operation is performed in the second row.
Column Wise Zooming
When an image is zoomed column-wise, then columns are added (5+7) = 12 and then it is
divided by 2. We will get 6, and this operation is performed in all the columns.
As we can see that the original image was having 2 rows and 2 columns but after zooming, the
image it is converted into 3 rows and 3 columns.
As, we can see that the original image was having 2 rows and 3 columns but after zooming, the
image it is converted into 4 rows and 7 columns.
Advantages
It can be zoomed to any factor, thrice or four times or even more.
Disadvantages
Cost of computation is increased due to the additional step in the end.
What is Quantization?
Quantization is a lossy compression technique which is achieved by compressing a range of values to
single quantum. In other words, we can also say that it is a process of converting a continuous range of
values into a finite range of discrete values. In a given stream when discrete symbols are reduced then, the
stream becomes more compressible.
For example, when we reduce the number of colors in a digital image the file size is also reduced.
Applications such as DCT data quantization in JPEG and DWT data quantization in JPEG 2000 are used.
As we know that bits are used to represent a pixel intensity, which is limited that is why quantization is
needed.
If 8 bit is used for a pixel which is in the range from 0 to 255 where 0 is used for pure black and
255 is used for pure white and the intermediate values are used for gray color.
In the above images, the original image is of quantization level 257, and the quantized image is
of quantization level 16.
Contouring
As we have seen in quantization that when the number of gray levels in an image is decreased,
some false colors and edges start appearing on the image.
Let's consider an image of 8 bpp which have following gray level:
256 shade of gray.
128 shade of gray.
64 shade of gray.
32 shade of gray.
We can see in the above images when the level of gray decreases lines starts appearing on the
image.
As compared to 64 shade of gray, we can see more lines in 32 shade of gray. This is known as
contouring.
ISO preference curves
We have seen the effect of gray level and contouring. These results can be shown in the form of
curves which is known as ISO preference curve.
An ISO preference curve shows that the effect of contouring does not depend on decreasing of
the gray level resolution, but it also depends on the image detail.
In other words, we can say that if an image is more detail, then the effect of contouring appears
in the image later as compared to a less detail image in which gray level is quantized.
See the following three images to understand Gray level resolution clearly:
Image 1
Image 2
Image 3
In image 1, we can see the crowd which is very less detailed
In image 2, only one face is more detailed as compared to another.
And image 3 is more detailed as compared to image 1 and image 2.
You see these variations in the above images because of the gray level resolution. We can plot a
graph according to the results.
In the below graph each curve represents one image.
Here, x-axis represents gray levels and the y-axis represents bits per pixel (k).
According to the above graph, in image 1 faces cannot be seen due to contouring. In image 2, the
face of the girl was more detailed as compared to the face of a boy due to contouring. And in
image 3, the boy in the image can be seen more clearly due is less contouring effect because this
image is more detailed.
We can say that when an image is more detailed the ISO preference curve is more vertical and
also if an image is more detailed then very less gray level resolution is required.
Image acquisition:
Image acquisition is the first step in image processing. This step is also known as preprocessing
in image processing. It involves retrieving the image from a source, usually a hardware-based
source.
Color images representation
Color images are three band monochrome images in which, each band contains a different color
and the actual information is stored in the digital image. The color images contain gray level
information in each spectral band.
The images are represented as red, green and blue (RGB images). And each color image has 24
bits/pixel means 8 bits for each of the three color band(RGB).
Fig:
Single image sensor