title: Segmenting License Plate Characters
body: <p>I am facing a problem in segmenting characters from a license plate image.
  I have applied following method to extract license plate characters"</p>
  
  <ol>
  <li>Adaptive threshold the license plate image.</li>
  <li>Select contours which having particular aspect ratio.</li>
  </ol>
  
  <p>If there is any shade in the license plate image as in attached file, I am not able to properly segment the characters due to improper binarization.  The shade in the image merges adjacent characters in the image.</p>
  
  <p>I have thresholded the images with different window sizes.  The results are attached.  How can I segment characters from image if there is shade in the image?  I am using OpenCV.</p>
  
  <p><img src="https://i.stack.imgur.com/5DnwY.jpg" alt="License plate image with shade"> </p>
  
  <p><img src="https://i.stack.imgur.com/fCP1q.jpg" alt="threshoded image 1"></p>
  
  <p><img src="https://i.stack.imgur.com/0Dwzr.jpg" alt="thresholded image 2"></p>
  
  <p><img src="https://i.stack.imgur.com/Lsldw.jpg" alt="thresholded image 3"></p>
  
  <p>I have used following function in OpenCV to threshold my license plate image:</p>
  
  <pre><code>cvAdaptiveThreshold(licensePlateImg, threshImg, 255, CV_ADAPTIVE_THRESH_GAUSSIAN_C, CV_THRESH_BINARY_INV, wind);
  </code></pre>
  
  <p>I have tried with different window sizes (<code>wind</code>) and different <code>adaptiveMethod</code> (<code>ADAPTIVE_THRESH_MEAN_C and ADAPTIVE_THRESH_GAUSSIAN_C</code>)
  to get the thresholded images.</p>