I need to increase the dpi of my image before reading with `ocr` in `opencv`. The problems are :

1. I do not know the dpi of my image right now
2. I do not know how to increase the dpi of an image

I searched in Google, and almost every answer suggests using `cv2.resize`

```
image = cv2.imread("source.png")
resized_image = cv2.resize(image, (100, 50)) #I need to change it to 300 DPI

```

`resize` 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.

How to do it with `opencv`?

I need to change dpi to 300, why do I need to know current dpi? Because if it is already `dpi > 300`, I do not need to convert it.

I do it with python.