title: How to improve intensity contrast in image?
body: <p>I have an image with very low intensity contrast from its background.
  The first line between the two arrows is the line with low contrast.
  The second line is ok. Please see in the below image.</p>
  
  <p><a href="https://i.stack.imgur.com/742Bo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/742Bo.png" alt="enter image description here"></a></p>
  
  <p>The original image is as shown below.</p>
  
  <p><a href="https://i.stack.imgur.com/H1o8X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H1o8X.png" alt="enter image description here"></a></p>
  
  <p>I used the following method to enhance the contrast in Gray scale.
  First the image is changed to Gray color and used the following method.</p>
  
  <pre><code>cv::Mat temp;
  for (int i = 0; i &lt; 1; i++) // number of iterations has to be adjusted
  {
      cv::threshold(image, temp, 0, 255, CV_THRESH_BINARY| CV_THRESH_OTSU);// 
      cv::bitwise_and(image, temp, image);
      cv::normalize(image, image, 0, 255, cv::NORM_MINMAX, -1, temp);     
  }
  </code></pre>
  
  <p>I have image with a little bit higher in contrast in Gray scale, but is there any method better than this in Gray scale or Color?</p>
  
  <p><a href="https://i.stack.imgur.com/FaHnW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FaHnW.jpg" alt="enter image description here"></a></p>