Application of convolution in computer vision
Application of convolution in
computer vision(like image processing)
-, Vinish
Soni, Sarvesh Wadi , Kaustubh Wakodkar ,
Yash Shamnani , Sameeran zingre
In general when we are studying about image processing
we must know some basic definition like kernel,convolution etc.which is used in
image processing. Starting with kernel.
Kernel : A convolution lets you do many things, like
calculate derivatives, detect edges, apply blurs, etc. A very wide variety of
things. And all of this is done with a "convolution kernel".
The convolution kernel is a small matrix. This matrix
has numbers in each cell and has an anchor point
This
kernel slides over an image and does its thing. The "anchor" point is
used to determine the position of the kernel with respect to the image. The anchor point is generally the center point.
Different image processing has
different kernels for ex:
Convolution in image processing : In image processing convolution of matrix involves laying a matrix over
another and then calculate weighted sum
of all pixel values. So considering below example we have a image
convoluted with kernel getting an output
image.all values in image are the vibrance values of image.when we are
convoluting this image at center (3,3).what we do is placing a kernel at(3,3)
then we map the cells of image with the corresponding weights in the kernel so
40 maps to 0 42 to 1, 46 to 0 in similar fashion we map all the cells of the
image with their weights on the kernel and then we calculate sum in this case
it is 42 so what this kernel does is move the image down by one pixel this is a
shift kernel in action.
Problematic corners and edges : The kernel is two
dimensional. So you have problems when the kernel is near the edges or corners. Do something about the edges Usually
people choose to do something about it. They create extra pixels near the
edges. There are a few ways to create extra pixels:
- · Set
a constant value for these pixels
- · Duplicate
edge pixels
- · Reflect
edges (like a mirror effect)
- This usually fixes the problem that might arise.
IMAGE PROCESSING
Image processing in spatial domain is a visually rich
area of study dealing with pixel-manipulation techniques. Different operations
are performed over the images, which are treated simply as two-dimensional
arrays.
So images are just
data and data can be manipulated easily and so can images. In simple terms image
processing is simply a method to extract some information from an image or
insert some information in it. A common reason to process images is to make them
more appealing.
Examples of
image processing:
MONOCHROMATIC GAUSSIAN
BLUR :
Every kernel is
made for specific operation like gaussian blur kernel will make whole image blur except center you
can see in below ex.
→
→
We are seeing here
monochromatic gaussian blur we have taken sample of image having 5 cross 5 grid
of white pixels and 3 cross 3 grid of blacks these values are vibrance values
zero for black and hundred for white when we pass this image from gaussian blur
kernel we get output image seen on right and the vibrance values of image are
shown in grid at bottom as you can see the vibrance value of no pixel is
hundred because the black from the center has creeped out and affected all
white surrounding pixels because the black grid which was earlier focussed has
now defocussed by blurring we can see that only the central pixel is unaffected
it remains zero as before so the convolution does not affect it as it affect
the surrounding pixels.which is the work of gaussian blur kernel.
Similarly these procedure
is followed in all processes depending on kernel functionality like-
Simple box blur :
This
convolution kernel has an averaging effect. So you end up with a slight blur.
The image convolution kernel is
Note that the sum of all elements of this matrix is
1.0. This is important. If the sum is not exactly one, the resultant image will
be brighter or darker.
Here's a blur that I got on an image:
Edge detection :
The
above kernels are in a way edge detectors. Only thing is that they have
separate components for horizontal and vertical lines. A way to
"combine" the results is to merge the convolution kernels. The new
image convolution kernel looks like this:
Below
result I got with edge detection:
Thus conclusion is convolution is very helpful in image
processing And image processing has many real world application like camera app
on mobile phones nowadays we use this in our Instagram filters,snapchats,face
recognition etc.








its great to understand
ReplyDelete