What is the reference for the heuristic threshold determination method used in the MATLAB function "edge"?

3 views (last 30 days)
Banjo Yucatan
Banjo Yucatan on 27 Jun 2016
Answered: Mohammed Alammar on 20 May 2021
If a user-specified threshold parameter is not specified, then the edge function automatically determines a threshold value using a hueristic algorithm. Specifically, I am interested in the case where a Roberts, Sobel, or Prewitt filter is used. For instance, I_out = edge(I_in,'prewitt'). Within the code for the edge function, on line 407, the following code sets the edge threshold if none is specified by the user:
% determine the threshold; see page 514 of "Digital Imaging Processing" by % William K. Pratt if isempty(thresh), % Determine cutoff based on RMS estimate of noise % Mean of the magnitude squared image is a % value that's roughly proportional to SNR cutoff = scale*mean2(b); thresh = sqrt(cutoff);
Where, scale = 4 for a Prewitt or Sobel filter or scale = 6 for a Roberts filter, and "b" is the gradient magnitude at each pixel. I have consulted all four editions of "Digital Image Processing" by William K. Pratt and found no support for the method implemented in the "edge" function. Does anyone know an academic reference for this threshold determination method?

Answers (1)

Mohammed Alammar
Mohammed Alammar on 20 May 2021
Dear ,
I was wondering if you got the answer for that questions. I am stuck at the same point. could you please reply it here if you got it.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!