sudip128
(Sudip Chakraborty)
April 12, 2023, 2:46pm
1
Hello all,
Is there a way to extract what equation the EdgeDetect function used to identify edges in an image?
I need to figure out whether the edges detected are straight lines or curved lines or something else
Thanks in advance for your help.
Sudip
Sudip,
the option Method -> ("StraightEdges" -> ...) and/or the command ImageLines[]
might be helpful, e.g.:
img = Import["https://reference.wolfram.com/language/ref/Files/EdgeDetect.en/I_9.png"];
lineImg = EdgeDetect[img, Method -> ("StraightEdges" -> 0.3)];
lines = ImageLines[lineImg, .15];
HighlightImage[lineImg, lines]
sudip128
(Sudip Chakraborty)
April 14, 2023, 5:29pm
3
Thanks Henrik. This is very helpful.
Do you know whether there is a way to detect curved lines - i.e. lines that can be represented with a 2nd degree polynomial equation?