help in interpreting edge detection threshold criteria

From: Pushker Pradhan (pushkar_at_erc.msstate.edu)
Date: 11/14/04


Date: Sun, 14 Nov 2004 12:07:22 -0600

I'm referring AK Jain "Fundamentals of Digital Image Processing" to
implement edge detection. The author first asks to compute the image
gradient (g) by filtering with the (Sobel) filters. I've done this.
The threshold is selected as follows "Typically, t may be selected using the
cumulative histogram of g(m,n) so that 5 to 10% of pixels with largest
gradients are declared as edges."
Can someone explain to me how the cum. histogram will help? I wrote the
following code, but it's obviously wrong:
% gimg is the filtered img., while cumhist() returns the cumulative
histogram (with 256 bins)
[gcumhist,x] = cumhist(gimg);
t = 0.9*max(max(gimg)); % threshold

% Find edges and make new edge img.
edimg = zeros(m,n,d);
i = find(gimg > t);
edimg(i) = 1;

PS: I'm not using the MATLAB edge function as I want to detect only the
vertical/horizontal edges.

-- 
Pushkar Pradhan


Relevant Pages

  • Re: Getting the process tranfer function
    ... PITOPS TFI offfer special new release that can calculate the very ... When using Gradient method, ... When using Gravity method, ... The new Pitops TFI automatically adds filtering on the raw CV (plant ...
    (sci.engr.control)
  • Re: Is there a probability distribution that looks similar to the McDonalds M?
    ... shape arises because of the general nature of stock market ... just a linear filtering of e. ... the output of the filter is almost never zero. ... Now to the histogram. ...
    (sci.stat.math)
  • Re: lightness metric for images
    ... Subtract a constant so the left part of the histogram is at zero. ... Anomalies such as dead and hot pixels are excluded from consideration ... process, dead and hot pixels can be removed by median filtering, but not ...
    (sci.image.processing)