Find nearest seed index given geodesic distance of a binary image
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Given a binary image, BW, and a vector of seed locations, ind
D = bwdistgeodesic(BW,ind) computes the geodesic distance of each pixel in BW to the nearest seed.
How can one find a matrix I, same size as BW, which gives the index of the nearest seed for each pixel? For example, if there are 5 seeds, each pixel in I should have a value (1,2,3,4 or 5) depending on the nearest seed location based on the distance already found in D.
Cheers.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!