ImageEn, unit imageenproc

TImageEnProc.EdgeDetect_Sobel

TImageEnProc.EdgeDetect_Sobel


Declaration

procedure EdgeDetect_Sobel();


Description

Detect the edges of objects within an image using a Sobel filter.
The result is a gray scale bitmap: high values (closed to 255) are edges.
When Location is ieTBitmap, the output pixel format is i24RGB, otherwise it is ie8g.
To make the result black & white (with 1=edge) it is recommended you call ConvertToBWThreshold using the parameter -2 (Maximum Entropy Algorithm).

Note: Edge detection is performed on entire image. It is not affected by any selection


Demos

Demo  Demos\ImageEditing\CompleteEditor\PhotoEn.dpr
Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Method Comparison

ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );

  


// Detect the edges of objects within an image using a Sobel filter
ImageEnView1.Proc.EdgeDetect_Sobel();
ImageEnView1.Proc.Negative();

  


// Convert the current color image to black & white (1 bit) using a Shen-Castan (ISEF) edge detection algorithm
ImageEnView1.Proc.EdgeDetect_ShenCastan();