title: Extracting text regions from an Image using contours - Opencv , Python
body: <p>I have been working on an OCR project for business cards using opencv in python. </p>
  
  <p>Till now, I have been able to crop the card of the image. I am trying to detect text regions in the cropped image using contours.
  (ie, Taking a Canny image , finding contours from those edges and dilating them to get connected components, which must potentially be text regions).</p>
  
  <p>While I was trying to detect closed connected components,some contours cover an extra part(like symbols) apart from the text like in <a href="https://i.stack.imgur.com/9OZVT.jpg" rel="nofollow noreferrer">this</a> image. </p>
  
  <p>Due to this,Applying tesseract-ocr on those text regions gives unwanted text(garbage) along with the required text.This is result of my OCR.</p>
  
  <p>**(P) (972) 656-6074<br>
  (F) (972) 656-6077<br>
  (M) (214) 505-8473<br>
  5910 N. Central Expressway, Suite1625»<br>
  Dallas, Texas 75206<br>
  ken.shulman@capviewpartners.com<br>
  WKw™/"<br>
  CAPVIEW  </p>
  
  <p>EPARTNERS<br>
  Ken Shulman, CRE<br>
  Partner**  </p>
  
  <p>I tried modifying the dilating factor but the part of symbol in the image always becomes a part of the text region.</p>
  
  <p>I want to make the pre-processing as optimized as possible so that tesseract-ocr doesn't make any mistakes.So how to remove those extra parts(symbols) from the text regions or is there an alternate approach ?</p>