help in interpreting edge detection threshold criteria
From: Pushker Pradhan (pushkar_at_erc.msstate.edu)
Date: 11/14/04
- Next message: bharath: "Matlab results ok for publication??"
- Previous message: Jonathan G Campbell: "Re: Mathematics of Hough Transform"
- Next in thread: Martin Leese: "Re: help in interpreting edge detection threshold criteria"
- Reply: Martin Leese: "Re: help in interpreting edge detection threshold criteria"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: bharath: "Matlab results ok for publication??"
- Previous message: Jonathan G Campbell: "Re: Mathematics of Hough Transform"
- Next in thread: Martin Leese: "Re: help in interpreting edge detection threshold criteria"
- Reply: Martin Leese: "Re: help in interpreting edge detection threshold criteria"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|