Find nearest seed index given geodesic distance of a binary image
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!