Description Executes the convolution filtering using the convolution kernel with prescribed size, coefficients and normalizing divider on color (24 bits/pixel) device independent bitmap.
Usage NewDib = [BIImage.]ColorConvolution Dib Undo Psychovisual Filter Size FileName FilterBuf Error iShowProgress hWnd
Remarks NewDib LONGLONG The new device independent bitmap.
Dib LONGLONG Handle to the 24 bits/pixel DIB to be convolved.
Undo Boolean If True, a new DIB will be created, otherwise the old one will be modified.
Psychovisual Boolean Determines the computation of pixel luminance.
Filter Integer Type of filter to be used.
Size Integer Size of the convolution filter (3, 5, or 7) in case of filter type imgckUserDef and imgckSmooth.
FileName String The name of file containing the nSize*nSize pieces of integer coefficients and after them an integer normalizing weight if the filter type is equal to imgckFromFile. The sum of positive and negative coefficients must be in a range of{-127...+128}.
FilterBuf Integer The first item of an array containing the nSize*nSize pieces of integer coefficients and after them an integer normalizing weight if the filter type is equal to imgckUserDef. The sum of positive and negative coefficients must be in a range of {-127...+128}.
Error Long* Pointer to the error string.
iShowProgress short This parameter specifies the displaying of the progressbar and the preview dialog.
Available values:
DISPLAY_NONE (0) - The progressbar and the preview dialog will not display before filtering.
DISPLAY_PROGRESS (1) - The progressbar will display during filtering procedure.
DISPLAY_DIALOG (2) - The preview dialog will display before filtering. This dialog shows the part of the image before and after filtering.
DISPLAY_BOTH (3) - The progressbar and the preview dialog will display.
IMPORTANT: The preview dialog will only display, if there is BIDlgs32.dll installed.
hWnd LONGLONG Handler of the parent window.
The pixel value P'(i,j) after the convolution: sum of the close neighboring pixel values (multiplied by the proper element of convolution kernel) and divided by the normalizing divider.
The luminance is weighted (RED*GREEN*BLUE)/3 if Psychovisual is set to False, otherwise the following scheme is used (8*RED+15*GREEN+3*BLUE)/26.
Type of filter to be used:
imgckUserDef The coefficients are given by the user (See: FilterBuf)
imgckFromFile The coefficients are given by a file (See: FileName)
imgckSmooth Noise filter (all the coeffs. are the same: 1)
imgckWeightedSmooth Weighted noise filter e.g. if Size=3, the filter is:
1 2 1
2 4 2
1 2 1
imgckLaplace Laplace filter (digital grad., e.g. if Size=3, the filter is:
0 -1 0
-1 5 -1
0 -1 0
imgckWeightedLaplace Weighted Laplace filter, e.g. if Size=3, the filter is:
-1 -1 -1
-1 9 -1
-1 -1 -1