camellia_flower_close_up.jpg?w=800"]] // ColorNegate

I would like to reduce the number of edges displayed in EdgeDetect. How can I do it ?

Mathematica graphics

  • $\begingroup$ Check the second attribute of EdgeDetect. EdgeDetect[img, 3] // ColorNegate seems to have reduced the number of edges. Is this what you want? $\endgroup$ Apr 6, 2017 at 11:48
  • $\begingroup$ Could you explain more precisely why you mean by reducing the number of displayed edges? $\endgroup$
    – anderstood
    Apr 6, 2017 at 14:49

1 Answer 1


One way to approach this kind of thing is to preprocess the image. In this case, an edge preserving smoothing function might be useful:

EdgeDetect[MeanShiftFilter[img, 3, 0.5]] // ColorNegate

enter image description here

The parameters of the filter (here 3 and 0.5) change the number of edges detected.


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.