Accusoft.ImagXpress13.Net
Matrix Method




A 16-bit integer array with 9 elements.

The range of the elements is from -32768 to 32767.

The nIPMatrixV is mapped to a 3x3 array used for filtering the image.

A 16-bit integer which represents the divisor of the matrix filter values.

The range is from -999 to 999.

Note: An exception is thrown if 0 is used as it is not divisible by 0.

A 16-bit integer which represents the intensity of the matrix.

The range is from 0 to 10.

Modifies the image using a 3x3 correlation matrix filter.
Syntax
'Declaration
 
Public Sub Matrix( _
   ByVal nIPMatrixV() As Short, _
   ByVal nIPMatrixD As Short, _
   ByVal nIPMatrixI As Short _
) 
'Usage
 
Dim instance As Processor
Dim nIPMatrixV() As Short
Dim nIPMatrixD As Short
Dim nIPMatrixI As Short
 
instance.Matrix(nIPMatrixV, nIPMatrixD, nIPMatrixI)
public void Matrix( 
   short[] nIPMatrixV,
   short nIPMatrixD,
   short nIPMatrixI
)
public: void Matrix( 
   short[]* nIPMatrixV,
   short nIPMatrixD,
   short nIPMatrixI
) 
public:
void Matrix( 
   array<short>^ nIPMatrixV,
   short nIPMatrixD,
   short nIPMatrixI
) 

Parameters

nIPMatrixV
A 16-bit integer array with 9 elements.

The range of the elements is from -32768 to 32767.

The nIPMatrixV is mapped to a 3x3 array used for filtering the image.

nIPMatrixD

A 16-bit integer which represents the divisor of the matrix filter values.

The range is from -999 to 999.

Note: An exception is thrown if 0 is used as it is not divisible by 0.

nIPMatrixI

A 16-bit integer which represents the intensity of the matrix.

The range is from 0 to 10.

Remarks

The matrix filter alters each pixel's color based on its current color and the colors of any neighboring pixels. The array of nIPMatrixV 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 nIPMatrixD parameter is the coefficient denominator. Each coefficient in the filter matrix is divided by the divisor before being applied to a pixel.

If the nIPMatrixI parameter is not 10 then the difference of the original pixel value from the calculated target pixel's new value is multiplied by nIPMatrixI and divided by 10. This value is then added to the original pixel value and this is the target pixel's final value.

See Also

Reference

Processor Class
Processor Members

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback