Finding the distance between two objects... Please help!
Mostrar comentarios más antiguos
http://www.flickr.com/photos/25387007@N02/8536051789/in/photostream/lightbox/ I want to find the distance between the upper and the middle object at pts on the extremes and the min distance between the two. Please help me to find the same. I do not want to use the distance between the two centroids. Thanks a lot
3 comentarios
Matt Kindig
el 7 de Mzo. de 2013
So to be clear you want the shortest distance between white pixels on the upper and middle objects? If so, first use bwboundaries() to find the outline of each object (i.e. the pixels on the edge). Then use a loop or cellfun or similar to calculate the distance between each boundary coordinate on one object and each boundary coordinate on the other object. Whichever pair has the smallest distance is your desired number.
Richa Nayak
el 8 de Mzo. de 2013
Richa Nayak
el 8 de Mzo. de 2013
Respuestas (0)
Categorías
Más información sobre Image Segmentation en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!