Why convolution in image processing




















Recommended blog: Applications and Functions of Opencv. Many effects could be achieved with the help of image kernels, these effects include blurring the image, sharpening of image, increasing or decreasing the contrast, and many more. These convolutional kernels are used in one deep learning algorithm as well, i.

There are majorly three steps to keep in mind in order to understand the working of an convolutional kernel, therefore, below is the image for the architecture of the whole working Working of convolutional kernel, Source.

So in the process of convolution, the image is manipulated by rolling kernels over convolutional, in the image we can see that the convolution is mapped over an source pixel, the kernel values are then multiplied with the corresponding value of pixel it is covering, at the end the sum of all the multiplied values are taken, which becomes the first value centre pixel value. The new pixel values are filled by taking another patch of source pixel, and at the end, all we are left with is a new transformed pixel values that have features of the original image but also with less dimensions and transformation.

Now we shall try to implement image manipulation using machine learning algorithms. In our first step, we are going to import some of the important libraries in order to implement convolution. These libraries include numpy for mathematical operation, matplotlib for data visualization , and cv2 for computer vision problems. Later on, we are implementing the kernel using numpy library, making use of numpy to create matrices for gaussian blur, vertical edge, and outline.

In our next step, we have to perform the working of transformation. All the steps we discussed above in the working of convolution is what we need to implement here, the multiplication of kernel values with pixel values and the sum is placed as a centre of a new pixel values.

We have successfully made the transformation on the original image, with the good knowledge of convolution, one can make any sort of changes and transformation to an image or a video, these techniques are mathematically understandable with easy implementation. We will completely discuss convolution. What is it? Why is it? What can we achieve with it? As we have discussed in the introduction to image processing tutorials and in the signal and system that image processing is more or less the study of signals and systems because an image is nothing but a two dimensional signal.

Also we have discussed, that in image processing , we are developing a system whose input is an image and output would be an image. This is pictorially represented as. Till now we have discussed two important methods to manipulate images. Or in other words we can say that, our black box works in two different ways till now. This method is known as histogram processing. We have discussed it in detail in previous tutorials for increase contrast, image enhancement, brightness e.

This method is known as transformations, in which we discussed different type of transformations and some gray level transformations. Here we are going to discuss another method of dealing with images. Add a comment. Active Oldest Votes. Improve this answer. Brian Brian 2 2 silver badges 4 4 bronze badges.

For example, let's say you are looking for a directional step in your 1d data. The kernel could be [-1 1] and let's apply that to the data [2 2 2 2 2 1 1 1 1 1] The result will be [0 0 0 0 0 1 0 0 0 0] Which detects the location of the step. A larger step would give a larger value. Edge detection or any other pattern detection works the same way, for example with the kernel [-1 2 -1] Extensions to higher dimensions can also be thought if this way.

Bitwise Bitwise 2 2 silver badges 4 4 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Featured on Meta. Now live: A fully responsive profile. Linked 3. Related 1. Hot Network Questions.



0コメント

  • 1000 / 1000