ImageConvolve[image, ker]
gives the convolution of image with kernel ker.

Details and OptionsDetails and Options

  • ImageConvolve[image, ker] by default gives an image of the same dimensions as image.
  • ImageConvolve works with 2D and 3D binary, grayscale, or multichannel images, operating separately on each channel.
  • The convolution kernel is given as a numerical matrix or as an image.
  • ImageConvolve takes a Padding option. The default setting is Padding->"Fixed".
  • With a setting Padding->None, ImageConvolve[image, ker] normally gives an image smaller than image.
  • ImageConvolve operates separately on each channel in an image.
  • ImageConvolve gives an image of a real type.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Smooth an image by convolving with a square kernel:

Click for copyable input

Convolve a grayscale image with a Sobel mask to detect vertical edges:

Click for copyable input
New in 7 | Last modified in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »