Learn R Programming

gridSVG (version 1.4-0)

feConvolveMatrix: Apply a matrix convolution filter effect.

Description

A convolution combines pixels in the input image with neighbouring pixels to produce a resulting image. A wide variety of imaging operations can be achieved through convolutions, including blurring, edge detection, sharpening, embossing and beveling.

Usage

feConvolveMatrix(input = NA, order = 3,
                 kernelMatrix = matrix(),
                 divisor = 1, bias = 0,
                 targetX = 1, targetY = 1,
                 edgeMode = c("duplicate", "wrap", "none"),
                 kernelUnitLength = NA, preserveAlpha = FALSE,
                 ...)

Arguments

input
Identifies an input for this filter primtive. See filterInputs.
order
A numeric vector of length 1 or 2. Indicates the number of cells in each dimension for kernelMatrix. The values provided must be integers greater than zero. The first number (orderX), indicates the number of columns in the matrix.
kernelMatrix
The kernel matrix for the convolution. The number of entries must correspond with the values given by order.
divisor
After applying the kernelMatrix to the input image to yield a number, that number is divided by divisor to yield the final destination colour value. A divisor that is the sum of all the matrix values tends to have an
bias
After applying the kernelMatrix to the input image to yield a number and applying the divisor, the bias attribute is added to each component. One application of bias is when it is desirable t
targetX
Determines the positioning in X of the convolution matrix relative to a given target pixel in the input image. The leftmost column of the matrix is column number zero. The value must be such that: $0
targetY
Determines the positioning in Y of the convolution matrix relative to a given target pixel in the input image. The topmost row of the matrix is row number zero. The value must be such that: $0
edgeMode
Determines how to extend the input image as necessary with colour values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image.

  • "duplicate"indicates that the inp

kernelUnitLength
The first number is the dx value. The second number is the dy value. If the dy value is not specified, it defaults to the same value as dx. Indicates the intended distance in current filter u
preserveAlpha
A value of FALSE indicates that the convolution will apply to all channels, including the alpha channel.

A value of TRUE indicates that the convolution will only apply to the colour channels. In this case, the filter

...
Further arguments to be passed onto fe.

Value

  • An fe.convolve.matrix object.

Details

For more information about this primitive, consult the reference to the SVG specification.

References

http://www.w3.org/TR/SVG/filters.html#feConvolveMatrixElement

See Also

filterEffect, fe.