convolve.im(X, Y=X, ..., reflectX=FALSE, reflectY=FALSE)
"im"
.X
and Y
(respectively) should be reflected in the origin before computing
the convolution."im"
) representing the
convolution of X
and Y
."im"
) whose greyscale values
are values of the convolution. If reflectX = TRUE
then the pixel image X
is reflected
in the origin (see reflect
)
before the convolution is computed, so that
convolve.im(X,Y,reflectX=TRUE)
is mathematically
equivalent to convolve.im(reflect(X), Y)
. (These two commands
are not exactly equivalent, because the reflection is performed
in the Fourier domain in the first command, and reflection is
performed in the spatial domain in the second command).
Similarly if reflectY = TRUE
then the pixel image Y
is reflected
in the origin before the convolution is computed, so that
convolve.im(X,Y,reflectY=TRUE)
is mathematically
equivalent to convolve.im(X, reflect(Y))
.
imcov
,
reflect
X <- as.im(letterR)
Y <- as.im(square(1))
plot(convolve.im(X, Y))
plot(convolve.im(X, Y, reflectX=TRUE))
plot(convolve.im(X))
Run the code above in your browser using DataLab