Unit 4
Unit 4
to derive meaningful information from digital images, videos, and other visual inputs — and
takeactions or make recommendations based on that information. If AI enables computers
to think,computer vision enables them to see, observe and understand.
1. Image formation
Imaging:
The mapping of a 3D world object into a 2D digital image plane is called imaging. In order
to do so, each point on the 3D object must correspond to the image plane. We all know
that light reflects from every object that we see thus enabling us to capture all those light-
reflecting points in our image plane.
Various factors determine the quality of the image like spatial factors or the lens of the
capturing device.
Various factors determine the quality of the image like spatial factors or the lens of
the capturing device.
Color and Pixelation:
In digital imaging, a frame grabber is placed at the image plane which is like
a sensor. It aims to focus the light on it and the continuous image is pixelated
via the reflected light by the 3D object. The light that is focused on the
sensor generates an electronic signal.
Each pixel that is formed may be colored or grey depending on the intensity
of the sampling and quantization of the light that is reflected and the
electronic signal that is generated via them.
All these pixels form a digital image. The density of these pixels determines
the image quality. The more the density the more the clear and high-
resolution image we will get.
BLACK AND WHITE IMAGE– The image which consists of only black and white color is
called a BLACK AND WHITE IMAGE.
8-bit COLOR FORMAT– It is the most famous image format. It has 256 different shades
of colors in it and is commonly known as Grayscale Image. In this format, 0 stands for
Black, 255 stands for white, and 127 stands for gray.
16-bit COLOR FORMAT– It is a color image format. It has 65,536 different colors in it.It is
also known as High Color Format. In this format, the distribution of color is not as same
as the Grayscale image.A 16-bit format is actually divided into three further formats
which are Red, Green and Blue. That famous RGB format.
linear filtering
Applying filters to the image is another way to modify the image. And the
difference compared to point operation is the filter uses more than one
pixel to generate a new pixel value. For example, a smoothing filter replaces
a pixel value withthe average of its neighboring pixel value. Filters can be
divided into 2 types, linear filters, and non-linear filters.
Linear filter
Linear filter is a filter which operate the pixel value in the support region in
linear manner (i.e.,as weighted summation). The support region is specified
by the ‘filter matrix’ and be represent as H(i,j). The size of H is call ‘filter
region’ and filter matrix has its own coordinate system, i is column index
and j is row index. The center of it is the origin location and it is called the
‘hot spot’.
Image in frequency domain
Fourier Series
Example:
In Digital Image Processing, signals captured from the physical
world need to be translated into digital form by “Digitization”
Process. In order to become suitable for digital processing, an
image function f(x,y) must be digitized both spatially and in
amplitude
Sampling: Digitizing the coordinate value is called sampling.
Sampling
When looking at this image, we can see there are some random variations
in the signal caused by noise. In sampling we reduce this noise by taking
samples. It is obvious that more samples we take, the quality of the image
would be more better, the noise would be more removed and same
happens vice versa. However, if you take sampling on the x axis, the signal
is not converted to digital format, unless you take sampling of the y-axis too
which is known as quantization.
Sampling has a relationship with image pixels. The total number of pixels in
an image can be calculated as Pixels = total no of rows * total no of
columns. For example, let’s say we have total of 36 pixels, that means we
have a square image of 6X 6. As we know in sampling, that more samples
eventually result in more pixels. So it means that of our continuous signal,
we have taken 36 samples on x axis. That refers to 36 pixels of this image.
Also the number sample is directly equal to the number of sensors on CCD
array.
Here is an example for image sampling and how it can be represented using
a graph.
Image Processing
We can say that it is a use of computer algorithms, in order to get enhanced
imagesor to extract some useful information.
Object recognition
Image alignment and stitching (to create a panorama)
3D stereo reconstruction
Navigation for robots/self-driving cars
As shown in the image below the yellow points show the features
detected using a technique called Harris Detection.
Correlation
1. Correlation explains how one or more variables are related to each other. These
variablescan be input data features that have been used to forecast our target
variable.
3. It gives us an idea about the degree of the relationship between the two variables. It’s a
bivariate analysis measure that describes the association between different variables.
4. In most businesses it’s useful to express one subject in terms of its relationship
withothers.
Positive Correlation: -Two features (variables) can be positively correlated with each other.
Itmeans that when the value of one variable increase then the value of the other variable(s)
alsoincreases.
Negative Correlation: -Two features (variables) can be negatively correlated with each
other. It means that when the value of one variable increase then the value of the other
variable(s) decreases.
No Correlation:- Two features (variables) are not correlated with each other. It
means that when the value of one variable increase or decrease then the value
of the other variable(s) doesn’t increase or decreases.
Convolution
Convolution is used for many things like calculating derivatives, detect edges,
apply blurs etc. and all this is done using a "convolution kernel". A convolution
kernel is a very small matrix and, in this matrix, each cell has a number and also
an anchor point.The anchor point is used to know the position of the kernel
with respect to the image. It starts at the top left corner of the image and
moves on each pixel sequentially. Kernel overlaps few pixels at each position
on the image. Each pixel which is overlapped is multiplied and then added. And
the sum is set as the value of the current position.
Convolution is the process in which each element of the image is added to its
local neighbors, and then it is weighted by the kernel. It is related to a form of
mathematical convolution.
Edge detection
A Canny edge detector is a multi-step algorithm to detect the edges for any
input image. It involves the below-mentioned steps to be followed while
detecting edges of an image.
4. Lastly, use the Hysteresis Thresholding method to preserve the pixels higher
than the gradient magnitude and neglect the ones lower than the low
threshold value.