ImageConvolve

ImageConvolve[image,ker]
给出 image 与内核 ker 的卷积.

更多信息和选项更多信息和选项

  • ImageConvolve[image,ker] 缺省下给出和 image 相同维数的图像.
  • ImageConvolve 可用于二维和三维二进制、灰度级或者多通道图像,分别作用于每个通道.
  • 卷积核以数值矩阵或者图像给出.
  • ImageConvolve 采用一个 Padding 选项. 缺省设置是 Padding->"Fixed".
  • 在设置 Padding->None 下,ImageConvolve[image,ker] 通常给出小于 image 的图像.
  • ImageConvolve 分别作用于图像的每个通道上.
  • ImageConvolve 给出具有实类型的图像.

背景
背景

  • ImageConvolve performs the convolution operation on an image. Convolution is an integral (or its discrete analog) that expresses the amount of overlap of one function as it is shifted over another. Convolution therefore blends one function or image with another and can be used to perform many useful operations on images such as smoothing, feature extraction, and differentiation.
  • The smoothing function that is shifted over an image to perform convolution is a matrix known as a kernel, and many different kinds of kernels are possible and useful depending on context. GaussianFilter and MeanFilter are special cases of ImageConvolve that use a Gaussian and the mean value in a given range, respectively, as their kernels.
  • ImageConvolve is a local operation, meaning it produces output pixel values based only upon the pixel values in its neighborhood as determined by the kernel. It is also a linear one, meaning it is convolution-based and replaces each pixel by a linear combination of its neighbors.
  • The converse operation to ImageConvolve is ImageDeconvolve. The function ListConvolve performs the operation of convolution on lists (as opposed to images).

范例范例打开所有单元关闭所有单元

基本范例  (3)基本范例  (3)

通过一个平方内核的卷积,使图像平滑:

In[1]:=
Click for copyable input
Out[1]=

用一个 Sobel 外壳和一个灰度图像卷积,检测垂直边:

In[1]:=
Click for copyable input
Out[1]=

对三维图像进行平滑处理:

In[1]:=
Click for copyable input
Out[1]=
2008年引入
(7.0)
| 2012年更新
(9.0)