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 (0 - 255).
threshold2 Second threshold for the hysteresis procedure (0 - 255).
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.


Demo

Demo  Demos\IEVision\LinesDetect\LinesDetect.dpr


Example

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