AccusoftImagXpress13 ActiveX DLL > ImagXpress Object : MatrixV Method |
A variant representing filter matrix values, specified as a 9 element array of short values.
Valid matrix values are -32767 to 32767.
The nIPMatrixV is mapped to a 3x3 array used for filtering the image.
An integer expression that evaluates to the divisor of the matrix filter values.
Valid range is -999 to 999.
An error is set if 0 is used, as it is not divisible by 0. |
An integer expression that evaluates to the intensity of the matrix filter.
Valid range is 0 to 10.
A variant representing filter matrix values, specified as a 9 element array of short values.
Valid matrix values are -32767 to 32767.
The nIPMatrixV is mapped to a 3x3 array used for filtering the image.
An integer expression that evaluates to the divisor of the matrix filter values.
Valid range is -999 to 999.
An error is set if 0 is used, as it is not divisible by 0. |
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 following Visual Basic source code demonstrates how to use the Matrix method to sharpen an image:
Dim matrixV As Variant 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 matrixV = matrixValues ImagXpress1.MatrixV matrixV, 1, 2