title: How to improve the final image quality and clarity in Python PIL?
body: <p>I have been working on a POC which required Image Processing using PIL to extract the reading from the dials. The image processing steps are 1. </p>
  
  <ol>
  <li>Cropping</li>
  <li>Equalizing </li>
  <li>Thresholding</li>
  <li>Filtering</li>
  <li>Inverting. </li>
  </ol>
  
  <p>This process worked quite well for some images. For example: </p>
  
  <p>Higher Resolution:
   <a href="https://i.stack.imgur.com/4mW1y.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4mW1y.jpg" alt="Working: Higher Resolution"></a></p>
  
  <p>Same image of lower resolution when processed: </p>
  
  <p><a href="https://i.stack.imgur.com/y9tsS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y9tsS.jpg" alt="Working: Lower Resolution"></a></p>
  
  <p>Now I have a different sets of image which is spoiled due to a bit of shadowing and the images after image processing comes out like this:</p>
  
  <p>Higher Resolution:</p>
  
  <p><a href="https://i.stack.imgur.com/XI2n3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XI2n3.jpg" alt="Not Working:Higher Resolution"></a> </p>
  
  <p>Same image of lower resolution when processed:</p>
  
  <p><a href="https://i.stack.imgur.com/EJ5e1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EJ5e1.jpg" alt="Not Working:Lower Resolution"></a></p>
  
  <p>The lower portion is whitened a bit due to the shadowing and there is no reliable result which follows.</p>
  
  <p>Can anyone suggest any solution for this problem??</p>