title: Get Trajectory from Voronoi Diagram for Polygonal Obstacles
body: <p>I'm trying to get the Trajectory from Voronoi Diagram using the library <em>voronoi</em> from Matlab. I'm using this code:</p>
  
  <p><code>vo</code> = (all the obstacles from a binary picture, plotted in a figure), where:</p>
  
  <ul>
  <li><code>vo(1,:)</code> : x-axis points</li>
  <li><code>vo(2,:)</code> : y-axis points</li>
  </ul>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>figure; hold on;
  plot(vo(1,:),vo(2,:),'sr');
  
  [vx,vy] = voronoi(vo(1,:),vo(2,:));
  
  plot(vx,vy,'-b');
  </code></pre>
  
  <p>Obtaining:
  <a href="https://i.stack.imgur.com/A45Mw.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/A45Mw.jpg" alt="enter image description here"></a></p>
  
  <p>In other words, how can I separate all the useless lines from the real trajectory?</p>