title: Collision avoidance system - image interpretation
body: <p><br>
  I am refining an algorithm for collision avoidance I wrote for an ASV using a monocular camera.<br></p>
  
  <p>In order to have a simple yet effective system, the algorithm relies on edge detection using a <em>Canny</em> filter, after proper erosion/dilation to remove noise and shading spots.<br>
  The final image is a black and white frame where, starting from the bottom, the first contour found and the upper part gets coloured in white while the rest is black: so black can be interpreted as "free space" whereas white as "obstacle".</p>
  
  <p>The rover should use this reactive collision avoidance system to steer accordingly, avoiding close obstacles.</p>
  
  <p>Now I am having some problems to decide how to actually find the way to go.</p>
  
  <p>This is my approach so far.<br>
  The frame is split in columns whose width is exactly 1° relative bearing, then columns are grouped in three super-columns (corresponding to the directions <em>turn left, go on, turn right</em>) and the robot steers on the direction where the most black space is found.</p>
  
  <p>Do you have any other idea on how to find where to steer/proceed given the output of this algorithm? <br>Thank you</p>
  
  <p><strong>Image processing example</strong></p>
  
  <ol>
  <li>initial frame</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/w41gc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w41gc.jpg" alt="initial frame"></a></p>
  
  <ol start="2">
  <li>filtering</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/kMOyL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kMOyL.jpg" alt="filtering"></a></p>
  
  <ol start="3">
  <li>occupancy frame</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/p1kVK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p1kVK.jpg" alt="occupancy frame"></a></p>
  
  <ol start="4">
  <li>column divisions</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/vMbIA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vMbIA.jpg" alt="column divisions"></a></p>
  
  <ol start="5">
  <li>command -> steer left</li>
  </ol>