File Exchange

image thumbnail

Simple Edge Detection Using Classical Haralick Method

version 1.0 (184 KB) by

Implementation of the well known Haralick Edge Detector.

6 Downloads

Updated

View License

Here are the steps of the algorithm :
(1) Fit a bi-cubic polynomial to a small neighborhood of each pixel
(this step provides smoothing too).
(2) Compute (analytically) the second and third directional derivatives
in the direction of gradient.
(3) Find points where
(i) the second derivative is equal to zero and
(ii) the third derivative is negative.

The image is initially filtered using a Gaussian filter, to remove noise in theory a 5x5 Window was used to obtain the polynomial coefficients. A third polynomial expression was used and the 10 unknown variables, k1...k10 were obtained using the pixels in the window. The system of 25 equations in 10 variables is solved using Least Squares. Practically, this is computationally very intensive. To overcome the polynomial fitting, the smoothed image is convolved with 10 Facet Model Masks to obtain the coefficients of the polynomial.

The rest of the steps also follow the exact proposal of Haralick.
Input :
I is the image
Threshold: The 'rho' value in the original algorithm.

Usage:
Just hit F5 or provide the appropriate threshold and byte image to the algorithm.

Reference
Digital Step Edges from Zero Crossing of Second Directional Derivatives, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 6, No. 1, January, 1984, pp. 58-68

Comments and Ratings (0)

MATLAB Release
MATLAB 7.9 (R2009b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video