0% found this document useful (0 votes)
59 views

Unit 4

Computer vision enables computers and systems to derive meaningful information from digital images and videos by enabling them to see and understand visual inputs. The basic concepts of computer vision involve image formation through analog to digital conversion via sampling and quantization. This allows for the mapping of 3D real world objects into 2D digital images through the process of imaging, where factors like lenses and spatial resolution determine image quality. Pixels and color are formed through sampling light reflected from objects, and digital images are represented through various bit color formats. Image processing techniques are then used to enhance, restore, analyze and extract features from digital images.

Uploaded by

Manish Sontakke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Unit 4

Computer vision enables computers and systems to derive meaningful information from digital images and videos by enabling them to see and understand visual inputs. The basic concepts of computer vision involve image formation through analog to digital conversion via sampling and quantization. This allows for the mapping of 3D real world objects into 2D digital images through the process of imaging, where factors like lenses and spatial resolution determine image quality. Pixels and color are formed through sampling light reflected from objects, and digital images are represented through various bit color formats. Image processing techniques are then used to enhance, restore, analyze and extract features from digital images.

Uploaded by

Manish Sontakke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Unit 4

The basic concept of Computer Vision: -


Computer vision is a field of artificial intelligence (AI) that enables computers and systems

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

Image formation is an analog to digital conversion of an image with the help of 2D


Sampling and Quantization techniques that is done by the capturing devices like cameras.
In general, we see a 2D view of the 3D world.
In the same way, the formation of the analog image took place. It is basically a conversion
of the 3D world that is our analog image to a 2D world that is our Digital image.
Generally, a frame grabber or a digitizer is used for sampling and quantizing the analog
signals.

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.

Forming a Digital Image:

In order to form or create an image that is digital in nature, we need to have


a continuous conversion of data into a digital form. Thus, we require two
main steps to do so:
 Sampling (2D): Sampling is a spatial resolution of the digital
image. And the rate of sampling determines the quality of the
digitized image. The magnitude of the sampled image is determined
as a value in image processing. It is related to the coordinates
values of the image.
 Quantization: Quantization is the number of grey levels in the
digital image. The transition of the continuous values from the
image function to its digital equivalent is called quantization. It is
related to the intensity values of the image.
 The normal human being acquires a high level of quantization
levels to get the fine shading details of the image. The more
quantization levels will result in the more clear image.
Image Representation
BINARY IMAGE– The binary image as its name suggests, contains only two-pixel
elements i.e. 0 & 1, where 0 refers to black and 1 refers to white. This image is also
known as Monochrome.

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

What are Filters?

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

In the frequency domain, a digital image is converted from spatial domain


to frequency domain. In the frequency domain, image filtering is used for
image enhancement for a specific application. A Fast Fourier transformation
is a tool of the frequency domain used to convert the spatial domain to the
frequency domain.

For smoothing an image, low filter is implemented and for sharpening an


image, high pass filter is implemented. When both the filters are
implemented, it is analyzed for the ideal filter, Butterworth filter and
Gaussian filter.

The frequency domain is a space which is defined by Fourier transform.


Fourier transform has a very wide application in image processing.
Frequency domain analysis is used to indicate how signal energy can be
distributed in a range of frequency.
Fourier Series and Transform

Fourier Series

Fourier series is a state in which periodic signals are represented by


summing up sines and cosines and multiplied with a certain weight. The
periodic signals are further broken down into more signals with some
properties which are listed below:

 Broken signals are sines and cosines.


 New signals are harmonics of each other.

Fourier series analysis of a step edge:

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

Since an analogue image is continuous not just in its co-ordinates (x axis),


but also in its amplitude (y axis), so the part that deals with the digitizing of
co-ordinates is known as sampling. In digitizing sampling is done on
independent variable. In case of equation y = sin(x), it is done on x variable.

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.

The basic steps involved in digital image processing are:

1. Image acquisition: This involves capturing an image using a digital


camera or scanner, or importing an existing image into a computer.

2. Image enhancement: This involves improving the visual quality of an


image, such as increasing contrast, reducing noise, and removing
artifacts.

3. Image restoration: This involves removing degradation from an image,


such as blurring, noise, and distortion.

4. Image segmentation: This involves dividing an image into regions or


segments, each of which corresponds to a specific object or feature in
the image.

5. Image representation and description: This involves representing an


image in a way that can be analyzed and manipulated by a computer,
and describing the features of an image in a compact and meaningful
way.

6. Image analysis: This involves using algorithms and mathematical models


to extract information from an image, such as recognizing objects,
detecting patterns, and quantifying features.

7. Image synthesis and compression: This involves generating new images


or compressing existing images to reduce storage and transmission
requirements.

8. Digital image processing is widely used in a variety of applications,


including medical imaging, remote sensing, computer vision, and
multimedia.
Image Feature Extraction:

Feature Extraction is an important technique in Computer Vision widely


used for tasks like:

 Object recognition
 Image alignment and stitching (to create a panorama)
 3D stereo reconstruction
 Navigation for robots/self-driving cars

What are features?

Features are parts or patterns of an object in an image that help to identify


it. For example — a square has 4 corners and 4 edges, they can be called
features of the square, and they help us humans identify it’s a square.
Features include properties like corners, edges, regions of interest points,
ridges, etc.

As shown in the image below the yellow points show the features
detected using a technique called Harris Detection.

A glimpse of Traditional feature detection techniques


Traditional Computer Vision techniques for feature detection include:

Harris Corner Detection — Uses a Gaussian window function to detect corners.

Binary Robust Independent Elementary Features (BRIEF) — This is only a


feature descriptor that can be used with any other feature detector. This
technique reduces memory usage by converting descriptors in floating-point
numbers to binary strings.

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.

2. Correlation, a statistical technique that determines how one variablemove/changes


inrelation to the other 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.

5. For example No of testing vs no of positive cases in Corona.

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

In image processing, edge detection is a very important task. Edge detection is


the main tool in pattern recognition, image segmentation and scene analysis. It
is a type of filter which is applied to extract the edge points in an image.
Sudden changes in an image occurs when the edge of an image contour across
the brightness of the image

Canny edge detector

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.

1. Removal of noise in input image using a Gaussian filter.

2. Computing the derivative of Gaussian filter to calculate the gradient of


image pixels to obtain magnitude along x and y dimension.

3. Considering a group of neighbors for any curve in a direction perpendicular


to the given edge, suppress the non-max edge contributor pixel points.

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.

You might also like