Hello.
Welcome back.
The mathematical definition of convolution is defined like this.
This equation G of X Y appear.
However in practice it is written like this one down here where the minus infinity to infinity is replaced
with an subscript two and m subscript 2 what m subscript to represent.
D have masks with and the N subscript to represent the half the masks height you can think of the mask
as a filter or a smaller matrix remember the image itself is a matrix and a mask is a smaller matrix
that we can evolve the image with and the basic mechanism used to understand one convolution can be
expanded to the 2D domain as well.
In this case the 2D array a is usually the input image and B is a small mask or matrix is a small matrix
usually 3 by 3.
The idea of mirroring and B and shifting it across it can also be adapted to that 2D case however mirror
iron will now take place in both X and Y dimensions and shift and will be done starting from the top
left points in the image.
Moving along each line on to the bottom right pixel in a has been processed let's see one example let's
say we have an image a represented by this matrix over here and a mask be represented by this three
by three matrix when we perform a convolution B.
This is where we get this other matrix here over here we must note that he has been flipped in both
X and Y dimensions before the sum of the product is calculated as we can see from this image here as
well as in the calculation to becomes minus 2 1 becomes minus 1.
And of course flipping so remains the same convolution that masks that's a very common image processing
technique and depending on the choice of mask coefficient entirely different result can be obtained.
For example we can achieve results such as blurring sharpening edge detection etc. Now about correlation
we express one dimensional correlation like this.
You will realize that the correlation equation is just exactly like the convolution except that over
here that minus sign is changed to a plus side.
Similarly we can express to the correlation like this just like we saw in convolution again or that
he had a minus sign he's changed to plus.
So in a nutshell correlation is the same as convolution without flip in the mask before the sum of products
are computed.
The difference between using correlation and convolution intuiting neighborhood process operations is
often irrelevant because many popular masks or floaters used an image process and are symmetrical around
the origin.
This diagram here shows the convolution process of an image and a candle in a much more generalized
form.
Over here we have come forward and a three by four image with a two by two candle.
And the outputs is produce the output produced is a two by three matrix or image.
We will see an equation later on for deriving the output size given the size of the image and the size
of the filter.
Kanno kind of post the video to see how you know what the calculation is performed here right.
We can also convert of a single input image with multiple filters.
Over here we see a single input image confused with Kana 1 the same image confused with filter Cano
2 and then the same image involved with filter can 0 3.
We find the output by adding the results from the 3 different filter can no convolutions.
And then we add out a bias which is 1 when we are working in deep learning.
We've got to admit bias as we can see demonstrated in this animation you can post the video or slow
the video down to see how the animation is showing how the calculation is performed.
We shall take a look at the reason why this animation is moving the way it is moving and why.
And yeah the reason why it's moving the way it is moving and why he's taken these number of steps.
When we start talking about what is known as strides
right.
So that's all there is in the next lesson we should describe the convolution layer.