Applies various filter operations to 8 and 24-bit images. Filters provided include smoothing filters (Gaussian, median, and average), sharpening filters (unsharp mask), morphological filters (dilate, erode, open, and close), and edge and line detection filters (Laplacian, Prewitt), as well as provision for user defined convolution filters.
- Subcode is set to SF_SUBCODE_FILTER (30).
- u.SC30.Type Specifies the type of filter to use. Valid values are the following types: SCANFIX_FILTER_GAUSSIAN, SCANFIX_FILTER_UNSHARP, SCANFIX_FILTER_MEDIAN, SCANFIX_FILTER_DILATE, SCANFIX_FILTER_ERODE, SCANFIX_FILTER_OPEN, SCANFIX_FILTER_CLOSE, SCANFIX_FILTER_AVERAGE, SCANFIX_FILTER_USER, SCANFIX_FILTER_GAUSSIAN3X3, SCANFIX_FILTER_GAUSSIAN5X5, SCANFIX_FILTER_LAPLACIAN3X3, SCANFIX_FILTER_PREWITTV3X3, SCANFIX_FILTER_PREWITTH3X3, SCANFIX_FILTER_SOBELV3X3, SCANFIX_FILTER_SOBLEH3X3. Filters with a 3X3 or 5X5 in the name are fixed size filters, and a width, height, and center point are not needed and will be ignored. Other filters require a width and height, except the SCANFIX_FILTER_USER, which requires all parameters be set. The user defined filter is a convolution filter, and it requires that the Weights parameter point to an array of values containing the weights to be used in the convolution.
- u.SC30.Width The width of the filter, required for non-fixed size filters.
- u.SC30.Height The height of the filter, required for non-fixed size filters.
- u.SC30.CenterX The center point of the filter, required for variable size and user defined filters. Set to -1 to automatically set to the center (width / 2).
- u.SC30.CenterY The center point of the filter, required for variable size and user defined filters. Set to -1 to automatically set to the center (height / 2).
- u.SC30.Divisor The divisor used by the user defined filter. This weighted sum of the filtered pixels is divided by this divisor.
- u.SC30.Offset The offset added to the output of the convolution, used to bias the result up or down.
- u.SC30.Weights The matrix of weights used in the user defined filter. The size of the array should be Width * Height, and the values are stored left to right, top to bottom. This list should be allocated before REQ_INIT and freed by the user after REQ_TERM.