title: How to remove border components in Python 2.7 using Opencv
body: <p>I want to remove the components which are touching the border of the image. </p>
  
  <p>I'm using OpenCV 2.4.10 and Python 2.7.</p>
  
  <p>I have done HSV conversion and THRESHOLD_BINARY of the image, next I want to remove the components (objects) which are touching to border of the image. </p>
  
  <p>It was explained in Matlab here - <a href="http://blogs.mathworks.com/steve/2007/09/04/clearing-border-components/" rel="nofollow noreferrer">http://blogs.mathworks.com/steve/2007/09/04/clearing-border-components/</a> </p>
  
  <p>but I want to do in Python using OpenCV. </p>
  
  <p>Please explain me the code.</p>