title: Widen gaps in images in OpenCV (Python)
body: <p>I have a building floor plan that I am performing some geospatial analysis on. For reasons beyond my control, it is essential that doorways on that plan are at least 0.8 meters wide. Unfortunately, the architects of this particular building did not foresee our need and several are only 0.75m wide.</p>
  
  <p>Is there a way, within OpenCV (or any other python library) to <em>detect</em> these narrow gaps in the shape and to <em>widen</em> them. We have considered using erode, but it erodes everything, causing us other problems. </p>
  
  <p>Obviously this is related to the standard 'how do I fill this unwanted gap' problem, but I haven't found a way to take those answers and apply the same logic to this problem. </p>
  
  <p>So we have a floorplan with doorways like this:</p>
  
  <p><a href="https://i.stack.imgur.com/iSjlX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iSjlX.png" alt=""></a></p>
  
  <p>and we want to go to a plan, more like:</p>
  
  <p><a href="https://i.stack.imgur.com/Q5DZw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q5DZw.png" alt="enter image description here"></a></p>