What are the min and max arguments to EdgeDetect, for all methods and specifically "Sobel"? How do I find the limits or ranges of functions in the future? Or is it 255?

  • 1
    $\begingroup$ See Image Processing for the basics on image representation. Generally, channels and threshholds have a range of 0 to 1. $\endgroup$
    – Michael E2
    Dec 23, 2013 at 1:47
  • 1
    $\begingroup$ You can find default values in the documentation: in the "Details and Options" section. It is most assuredly not 255 as Mathematica scales pixel values between 0 and 1. $\endgroup$
    – bill s
    Dec 23, 2013 at 1:48
  • $\begingroup$ @MichaelE2 @ bill I think this could be a good question, as I think the doc of EdgeDetect is not very clear, and there DO be differences between a threshhold of 1 and 1.1. $\endgroup$
    – Silvia
    Dec 24, 2013 at 12:55
  • $\begingroup$ @Silvia Interesting. I interpreted the question as primarily "How do I find the limits or ranges of functions in the future." There seems to be a lack of explanation of thresholds and EdgeDetect in the docs. $\endgroup$
    – Michael E2
    Dec 24, 2013 at 14:47
  • 2
    $\begingroup$ @MichaelE2 I always do some try-and-fail attempts when using some functions like EdgeDetect, I think they really need a more insightful documentation :( $\endgroup$
    – Silvia
    Dec 24, 2013 at 14:55

1 Answer 1


In EdgeDetect[image, radius, threshold], the radius is expressed in pixels, and the threshold corresponds to normalized pixel values (ie. in the range from 0 to 1).

@Silvia, there may be differences between a threshold of 1 and a threshold of 1.1 indeed. Such cases include:

  1. "Real" or "Real32" images where pixel values are outside the 0-1 range.
  2. Multichannel images for which the vector gradient magnitude is greater than 1.
  • $\begingroup$ So, Real images are not normalized in general? Or just in this particular case? $\endgroup$ Dec 30, 2013 at 20:37
  • 1
    $\begingroup$ The normal range for "Real" and "Real32" data type images is from 0 to 1. But these images can also hold values outside the 0-1 range. An example where it expected is LaplacianFilter that yields positive and negative pixel values. $\endgroup$ Dec 30, 2013 at 21:12
  • $\begingroup$ Matthias, I think it would be helpful if you noted in your profile that you work at WRI. Not because it is necessary (it is not), but because it would certainly make this answer credible for users who do not know that you work at WRI :) $\endgroup$
    – rm -rf
    Dec 30, 2013 at 22:47
  • $\begingroup$ @rm-rf I try to write credible answers that stand by themselves --- falling a bit short at times unfortunately. $\endgroup$ Dec 30, 2013 at 23:51
  • $\begingroup$ Oh, I didn't mean to imply that your answers are not credible/don't stand for themselves... Sometimes, the nature of the question is such that it is impossible for the average user to be able to answer it authoritatively using only the documentation and/or spelunking. In such situations, an answer from someone who actually develops these functions and implements algorithms is much more valuable than speculations. I suppose I actually meant to use the word "authoritative" than "credible" :) $\endgroup$
    – rm -rf
    Dec 31, 2013 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.