FilterEdgeSC  Method

Description         This function will find edges on the input image by the Shen-Castan edge detection method. This function works for 8 and 24 bit per pixel images. Shen-Castan edge detector uses an optima filter function called Infinite Symmetric Exponential Filter (ISEF). This produces better signal to noise ratios and better localisation than Canny. First step is convolving the input image with the ISEF, then localization edges by zero crossing of the Laplacian (similar to the Marr-Hildreth algorithm). The approximation of Laplacian is computed by subtracting the original image from the smoothed one. The result is a band-limited Laplacian image. Next, a binary Laplacian image is generated by setting all the positive valued pixels to 1 and all others to 0. The candidate pixels are on the boundaries of the regions in th binary image. After improving the quality of edge pixels by false zero-crossing suppression, adaptive gradient thresholding and a hysteresis thresholding is applied finally.

Examples

edge          edgeshencastan

The original 500 x 400 pixel image and the Shen-Castan edge detected image with fSF = 0.8, iLow = 20, iHigh = 22, fRatio = 0.99, iThinFactor = 0, iWndSize = 7 and bDoHysteresis = TRUE parameter values.

Syntax                 RetVal = [BiFilter.]FilterEdgeSC  hDib dSF iLow iHigh dRatio iThinFactor iWndSize bDoHysteresis bShowDialog

Returns               RetVal                    LONGLONG The handle of new filtered DIB, 0 if an error occurred, or -1 if the BIFilter.dll does not installed.

Remarks             hDib                       LONGLONG Handle of the image to filter.

                            dSF                         Double            Smoothing factor used by the IESF filtering. See the description and examples above for further information and a possible value.

                            iLow                       Long                Low threshold value of hysteresis thresholding. See the description and examples above for further information and a possible value.

                            iHigh                       Long                High threshold value of hysteresis thresholding. See the description and examples above for further information and a possible value.

                            dRatio                    double             This parameter specifies the percents of pixels above the hysteresis thresholding. See the description and examples above for further information and a possible value.

                            iThinFactor           Long                Thinning factor (number of pixels). See the description and examples above for further information and a possible value.

                            iWndSize                Long                Size of window used by gradient thresholding. See the description and examples above for further information and a possible value.

                            bDoHysteresis        BOOL             Do hysteresis thresholding with iLow and iHigh thresholding values.

                            bShowDialog         BOOL             This parameter specifies the displaying of the preview dialog. IMPORTANT: The preview dialog will only display, if there is BiDlgs.dll installed

See Also