UserFilter method (Main Control)
Builder Syntax |
int UserFilter(unsigned ufltWidth, unsigned ufltHeight, const TPoint &ufltCenter, unsigned ufltDivisor, int nfltOffset, L_PINT ufltMatrix, unsigned ufltFlags); |
Delphi Syntax |
Function UserFilter (ufltWidth: L_UINT; ufltHeight: L_UINT; ufltCenter: TPoint; ufltDivisor: L_UINT; nfltOffset: L_INT; ufltMatrix: L_PINT; ufltFlags: L_UINT): L_INT; |
Overview |
Refer to Removing Noise |
Remarks
(Raster Pro and above toolkits) Filters the bitmap based on a user-defined filter / mask. This method is similar to the spatial and binary filter functions.
With this method you can create a user-defined filter and apply it to the image. The selected filter is passed as a parameter to this method. The filter has a rectangular form (matrix) where the values are user-defined. It allows the creation of simple customized filters, where each value found in matrix is multiplied by the corresponding pixel, and then the specified operation is performed on the results.
Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.
When the filter is applied to pixels from the edge and you choose the sum operation, the edge rows and columns are duplicated. For example, if the pixel (-1, 5) is needed, the pixel (0, 5) is used instead.
This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.
See Also
Elements: |
AddNoise method, Sharpen method, Average method, Median method, SpatialFilter method, BinaryFilter method |
Topics: |