![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172787/image.jpeg)
How can I find the longest chord of a region?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Md
am 7 Jan. 2015
Kommentiert: Image Analyst
am 7 Jan. 2015
Hi, I am trying to find out the longest chord of a region. Also, I need to find out the chord that is perpendicular to the longest chord of that region. Thanks in advance.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 7 Jan. 2015
See my attached demo. In the image below, the red line is the line between the two points in the binary (white) blob that are farthest apart. The magenta line is the line cutting across the blob perpendicular to the longest line. Feel free to adapt it.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172787/image.jpeg)
2 Kommentare
Image Analyst
am 7 Jan. 2015
I didn't find any vertical. I just went around to every point finding the distances to every other point using the Pythagorean formula. If you want the vertical extent, you can just subtract the y values of the end points.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!