Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to get the distance from an image ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Chuanjung Lin
am 9 Sep. 2020
Geschlossen: MATLAB Answer Bot
am 20 Aug. 2021
Hi all, I have a question about the distance acquire from a image, and the image as folloing:
in the fiste step, I'll conver the image to grey and extrcat its edge.
The question is :
- How to get the center point (w)?
- How to get the distacne from W to other point ?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/358099/image.png)
3 Kommentare
Akzeptierte Antwort
Vinai Datta Thatiparthi
am 15 Sep. 2020
Hi Lin,
"How to get the center point?"
- From the question, it isn't very clear how you define the the image. Have a look at the regionprops function to get the centroid of the image. You could otherwise also simply calculate from the average of the extremeties of the image coordinates.
"How to get the distance from W to other point?"
- First, you may use detectHarrisFeatures or detectMinEigenFeatures to extract the corner points in your image. Once you get the coordinates, use pdist or imdistline to get the distance between the 2 points.
As previously mentioned on the thread, you may have to programmatically call all these functions on your image set iteratively.
Hope this helps!
0 Kommentare
Weitere Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!