Image Convolution Examples

download Image Convolution Examples

of 7

Transcript of Image Convolution Examples

  • 7/22/2019 Image Convolution Examples

    1/7

    Image convolution examplesByUtkarsh| Published: August 16, 2010

    A convolution is very useful for signal processing in general. There is a lot of complex mathematical

    theory available for convolutions. For digital image processing, you dont have to understand all of

    that. You can use asimple matrix as an image convolution kerneland do some interesting things!

    Simple box blurHeres a first and simplest. 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.

    Heres a blur that I got on an image:

    A simple blur done with convolutions

    Gaussian blur

    Gaussian blur has certain mathematical properties that makes it important for computer vision. And

    you can approximate it with an image convolution. The image convolution kernel for a Gaussian blur

    is:

    http://www.aishack.in/2010/08/image-convolution-examples/http://www.aishack.in/author/admin/http://www.aishack.in/author/admin/http://www.aishack.in/author/admin/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/author/admin/http://www.aishack.in/2010/08/image-convolution-examples/
  • 7/22/2019 Image Convolution Examples

    2/7

    Heres a result that I got:

    Line detection with image convolutions

    With image convolutions, you can easily detect lines. Here are four convolutions to detect horizontal,

    vertical and lines at 45 degrees:

    I looked for horizontal lines on the house image. The

    result I got for this image convolution was:

  • 7/22/2019 Image Convolution Examples

    3/7

    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:

    The Sobel Edge Operator

    The above operators are very prone to noise. The Sobel edge operators have a smoothing effect, so

    theyre less affected to noise. Again, theres a horizontal component and a vertical component.

    On applying this image convolution, the result was:

  • 7/22/2019 Image Convolution Examples

    4/7

    The laplacian operator

    The laplacian is the second derivative of the image. It is extremely sensitive to noise, so it isnt used

    as much as other operators. Unless, of course you have specific requirements.

    Heres the result with the convolution kernel without diagonals:

    The Laplacian of Gaussian

    The laplacian alone has the disadvantage of being extremely sensitive to noise. So, smoothing the

    image before a laplacian improves the results we get. This is done with a 55 image convolution

    kernel.

  • 7/22/2019 Image Convolution Examples

    5/7

    The result on applying this image convolution was:

    Summary

    You got to know about some important operations that can be approximated using an image

    convolution. You learned the exact convolution kernels used and also saw an example of how each

    operator modifies an image. I hope this helped!

    Issues? Suggestions? Visit theGithub issue tracker for AI Shack

    Back to top

    Related Posts

    1. Image Convolutions in OpenCV

    2. Convolutions

    3. The Sobel and Laplacian Edge Detectors

    https://github.com/liquidmetal/aishack/issues/new?body=Related+page%3A+http%3A%2F%2Fwww.aishack.in%2F2010%2F08%2Fimage-convolution-examples%2Fhttps://github.com/liquidmetal/aishack/issues/new?body=Related+page%3A+http%3A%2F%2Fwww.aishack.in%2F2010%2F08%2Fimage-convolution-examples%2Fhttps://github.com/liquidmetal/aishack/issues/new?body=Related+page%3A+http%3A%2F%2Fwww.aishack.in%2F2010%2F08%2Fimage-convolution-examples%2Fhttp://www.aishack.in/2010/08/image-convolutions-in-opencv/http://www.aishack.in/2010/08/image-convolutions-in-opencv/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/image-convolutions-in-opencv/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/image-convolutions-in-opencv/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/image-convolutions-in-opencv/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/image-convolutions-in-opencv/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/image-convolutions-in-opencv/http://www.aishack.in/2011/04/the-sobel-and-laplacian-edge-detectors/http://www.aishack.in/2010/08/convolutions/http://www.aishack.in/2010/08/image-convolutions-in-opencv/https://github.com/liquidmetal/aishack/issues/new?body=Related+page%3A+http%3A%2F%2Fwww.aishack.in%2F2010%2F08%2Fimage-convolution-examples%2F
  • 7/22/2019 Image Convolution Examples

    6/7

  • 7/22/2019 Image Convolution Examples

    7/7

    Reply

    2 Trackbacks

    ByTubes UAS Grafcit | Grafika Citraon December 11, 2011 at 9:16 pm[...] Untuk image konvolutor, harapannya user bisa melakukan tersting terhadap inputan

    matrix konvolusi seperti dicontohkan di situs ini :http://www.aishack.in/2010/08/image-

    convolution-examples/[...] ByReaaliaikaista kuvanksittely OpenGL ES 2.0:lla | Mobiilikehityson March 12, 2012 at

    7:48 pm

    [...] Sample Convolution Kernels for Image Processing [...]

    Post a Comment

    Your email is neverpublished nor shared. Required fields are marked *

    Name *

    Email *

    Website

    Comment

    You may use these HTML tags and attributes

    http://www.aishack.in/2010/08/image-convolution-examples/?replytocom=3473#respondhttp://www.aishack.in/2010/08/image-convolution-examples/?replytocom=3473#respondhttp://grafcit.ittelkom.ac.id/?p=125http://grafcit.ittelkom.ac.id/?p=125http://grafcit.ittelkom.ac.id/?p=125http://www.aishack.in/2010/08/image-convolution-examples/http://www.aishack.in/2010/08/image-convolution-examples/http://www.aishack.in/2010/08/image-convolution-examples/http://www.aishack.in/2010/08/image-convolution-examples/http://mobiilikehitys.fi/reaaliaikaista-kuvankasittelya-opengl-es-2-0lla/http://mobiilikehitys.fi/reaaliaikaista-kuvankasittelya-opengl-es-2-0lla/http://mobiilikehitys.fi/reaaliaikaista-kuvankasittelya-opengl-es-2-0lla/http://mobiilikehitys.fi/reaaliaikaista-kuvankasittelya-opengl-es-2-0lla/http://www.aishack.in/2010/08/image-convolution-examples/http://www.aishack.in/2010/08/image-convolution-examples/http://grafcit.ittelkom.ac.id/?p=125http://www.aishack.in/2010/08/image-convolution-examples/?replytocom=3473#respond