- IPMatrixV
The address to the filter matrix values, specified as a simple array of shorts with 9 elements.
Valid matrix values are -32767 to 32767.
The nIPMatrixV is mapped to a 3x3 array used for filtering the image.
- IPMatrixD
An integer expression that evaluates to the divisor of the matrix filter values.
Valid range is -999 to 999.
Note: An error is set if 0 is used as it is not divisible by 0.
- IPMatrixI
An integer expression that evaluates to the intensity of the matrix filter.
Valid range is 0 to 10.
The convolution matrix filter alters each pixel's color based on its current color and the colors of any neighboring pixels. The array of IPMatrixV matrix values are coefficients. When a pixel is processed, its color value is multiplied by the coefficient in the array's center and any pixels within the 3x3 grid are multiplied by the corresponding coefficients in the array. The sum of the products becomes the target pixel's new value.
- The IPMatrixD parameter is the coefficient denominator. Each coefficient in the filter matrix is divided by the divisor before being applied to a pixel.
- The IPMatrixI parameter adds to the product of the matrix calculation and the divisor to shift the value of each pixel by a fixed amount. If the IPMatrixI parameter is not 10 then the difference of the original pixel value from the calculated target pixel's new value is multiplied by IPMatrixI and divided by 10. This value is then added to the original pixel value, and this is the target pixel's final value.
VB Example of Matrix (Visual Basic) | Copy Code |
---|---|
Dim matrixValues(9) As Integer matrixValues(0) = -1 matrixValues(1) = -1 matrixValues(2) = -1 matrixValues(3) = -1 matrixValues(4) = 9 matrixValues(5) = -1 matrixValues(6) = -1 matrixValues(7) = -1 matrixValues(8) = -1 ImagXpress1.Matrix matrixValues(0), 1, 2 |