<div dir="ltr"><div><div><div><div><div><br><br>On Wed, Jan 18, 2017 at 8:16 PM, Giuseppe Amatulli <<a href="mailto:giuseppe.amatulli@gmail.com">giuseppe.amatulli@gmail.com</a>> wrote:<br>><br>> Hi all, <br>><br>> I would like to "segment" an image using a sort of Voronoi algorithm on a cost surface instead of distance between point.<br>><br>> Below you can see an image where the black pixels identity areas with high cost value. I would like to identify the "valley" between theses black areas. <br>><br>> In the second image I draft by hand an ideal solution for few high cost areas. <br>><br>> Which grass command can do this kind of delineation? <br><br></div>You can use v.voronoi: first extract the pixels with high cost values with e.g.<br>r.mapcalc "high_cost = if(surface_map > threshold_value, 1, null())"<br><br></div>Then convert to vector areas with <br></div>r.to.vect input=high_cost output=high_cost type=area<br><br></div>Now create Voronoi triangles for areas with<br></div>v.voronoi input=high_cost output=high_cost_voronoi -a<br><div><div><div><div><div><br></div><div>HTH,<br><br></div><div>Markus M<br></div><div><div>><br>> Thanks,<br>><br>> Giuseppe        <br>><br>><br>><br>><br>><br>><br>> --<br>> Giuseppe Amatulli, Ph.D.<br>><br>> Research scientist at<br>> Yale School of Forestry & Environmental Studies<br>> Yale Center for Research Computing<br>> Center for Science and Social Science Information<br>> New Haven, 06511<br>> Teaching: <a href="http://spatial-ecology.org">http://spatial-ecology.org</a><br>> Work:  <a href="https://environment.yale.edu/profile/giuseppe-amatulli/">https://environment.yale.edu/profile/giuseppe-amatulli/</a><br>><br>><br>><br>><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div></div></div></div></div></div></div>