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

Find 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

// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );

  


// Find line segments in a binary image using the probabilistic Hough transform
ImageEnView1.IEBitmap.PixelFormat := ie8g;
ImageEnView1.IEBitmap.GetIEVisionImage().canny( 50, 200, 3 );
ImageEnView1.IEBitmap.Negative();   // Which will call ImageEnView1.Update();