ImageEn, unit ievision

TIEVisionImage.canny

TIEVisionImage.canny


Declaration

procedure canny(threshold1: double; threshold2: double; apertureSize: int32_t = 3; L2gradient: bool32 = false); overload; safecall;
procedure canny(outImage: TIEVisionImage; threshold1: double; threshold2: double; apertureSize: int32_t = 3; L2gradient: bool32 = false); overload; safecall;


Description

Finds edges in an image using the Canny algorithm.

Note: Pixel format of input image must be ie8g.

Parameter Description
outImage Destination image. Must be 8 bit gray scale (ie8g) and must have the same size of input image.
threshold1 First threshold for the hysteresis procedure.
threshold2 Second threshold for the hysteresis procedure.
apertureSize Aperture size for the Sobel operator.
L2gradient A flag, indicating whether a more accurate L2 normalization should be used to calculate the image gradient magnitude.


Example

ImageEnView.IO.LoadFromFile('input.jpg');
ImageEnView.IEBitmap.PixelFormat := ie8g;
ImageEnView.IEBitmap.GetIEVisionImage().canny(50, 200, 3);
ImageEnView.Update();