Convolvesan array with a kernel (or another array).
kernel
scale_factor
Edge
'zero'
) Valid strings are:
'zero'
'copy'
TIP: When using CONVOL with image data, make sure the data has been first converted to floating-point type.
Using the scale_factor parameter allows you to simulate fractional kernel values and avoid overflow with byte parameters.
In many signal and image processing applications, it is useful to center a symmetric kernel over the data, to align the result with the original array. The Center keyword controls the alignment of the kernel with the array and the ordering of the kernel elements.
In terms of CONVOL parameters, s corresponds to array and r corresponds to kernel. The effect of convolution is to smear the signal s(t) in time according to the "recipe" provided by the response function r(t).
R = CONVOL(A, K, S)
A
is an n-element vector, K
is an m-element vector (m S
is the scale factor.
R = CONVOL(A, K, S)
A
is an m-by-n element array, K
is an l-by-l element kernel, S
is the scale factor, and the result R
is an m-by-n element array.
result = CONVOL(mandril_img, kernel, /Center)
kernel
is a 3-by-3 array. This array has the following value:
This kernel value represents a commonly-used algorithm for edge enhancement.
Figure 2-23 The CONVOL function has been used to enhance the edges of this 512-by-512 mandrill image. In other words, after CONVOL is applied, the dark colors change quickly to light ones.
Figure 2-24 The CONVOL function has been used to enhance the edges of this 512-by-512 mandrill image. In other words, after CONVOL is applied, the dark colors change quickly to light ones.
For more information on displaying images, see the PV-WAVE User's Guide.
For a signal processing example, see the DIGITAL_FILTER Example section.