Finding the distance between two objects... Please help!
显示 更早的评论
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 个评论
Matt Kindig
2013-3-7
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
2013-3-8
Richa Nayak
2013-3-8
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Segmentation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!