title: how to increase dpi with opencv?
body: <p>I need to increase the dpi of my image before reading with <code>ocr</code> in <code>opencv</code>. The problems are :</p>
  <ol>
  <li>I do not know the dpi of my image right now</li>
  <li>I do not know how to increase the dpi of an image</li>
  </ol>
  <p>I searched in Google, and almost every answer suggests using <code>cv2.resize</code></p>
  <pre><code>image = cv2.imread(&quot;source.png&quot;)
  resized_image = cv2.resize(image, (100, 50)) #I need to change it to 300 DPI
  </code></pre>
  <p><code>resize</code> only changes the size of image, but after all does not increase the dpi.  I tried to use it, and then checked in Photoshop, the dpi was not changed.</p>
  <p>How to do it with <code>opencv</code>?</p>
  <p>I need to change dpi to 300, why do I need to know current dpi? Because if it is already <code>dpi &gt; 300</code>, I do not need to convert it.</p>
  <p>I do it with python.</p>