How to determine the Voronoi center coordinates knowing ?
Mostra commenti meno recenti
I have a skeleton of a road network and i want to estimate the cùenter of eacùh cell of the voronoi diagram
below the image

any ideas please !
thx
2 Commenti
Sean de Wolski
il 17 Giu 2014
So you want to calculate the voronoi diagram of the end points and then find the centers? I'm not totally clear on how you want to get from the above image to your centroids.
mika
il 23 Giu 2014
Risposte (1)
Jason Nicholson
il 18 Giu 2014
Modificato: Jason Nicholson
il 18 Giu 2014
This does not deal with the inf's. You will have to replace the infinities with finite values on your boundary to get a better center estimation.
X = rand(10,2);
[V,C] = voronoin(X);
xCenter = cellfun(@(index) mean(V(index,1)),C);
yCenter = cellfun(@(index) mean(V(index,2)),C);
1 Commento
Categorie
Scopri di più su Voronoi Diagram in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
