Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to enhance text in this image

I have an image here: https://s9.rr.itc.cn/r/wapChange/20164_26_17/a7pr217408361896362.jpg

How do I enhance the text in this image?

I tried the below:

img = cv2.imread(imgpath, 0)

height, width = img.shape[0], img.shape[1]

scale = 2000/width

img = cv2.resize(img, (0,0), fx=scale, fy=scale)

img = cv2.adaptiveThreshold(img,255,cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY,11,21)

But no matter how I adjust the parameters (block size and constant, 11 and 21 above), I couldn't enhance the text in these images well. Does anyone know a good way to do this? I'm using opencv-python. Thanks very much for your help.

how to enhance text in this image

I have an image here: https://s9.rr.itc.cn/r/wapChange/20164_26_17/a7pr217408361896362.jpg

How do I enhance the text in this image?

I tried the below:

img = cv2.imread(imgpath, 0)

0)

height, width = img.shape[0], img.shape[1]

img.shape[1]

scale = 2000/width

2000/width

img = cv2.resize(img, (0,0), fx=scale, fy=scale)

fy=scale)

img = cv2.adaptiveThreshold(img,255,cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY,11,21)

cv2.THRESH_BINARY,11,21)

But no matter how I adjust the parameters (block size and constant, 11 and 21 above), I couldn't enhance the text in these images well. Does anyone know a good way to do this? I'm using opencv-python. Thanks very much for your help.

how to enhance text in this image

I have an image here: https://s9.rr.itc.cn/r/wapChange/20164_26_17/a7pr217408361896362.jpgimage description

How do I enhance the text in this image?

I tried the below:

img = cv2.imread(imgpath, 0)

height, width = img.shape[0], img.shape[1]

scale = 2000/width

img = cv2.resize(img, (0,0), fx=scale, fy=scale)

img = cv2.adaptiveThreshold(img,255,cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY,11,21)

But no matter how I adjust the parameters (block size and constant, 11 and 21 above), I couldn't enhance the text in these images well. Does anyone know a good way to do this? I'm using opencv-python. Thanks very much for your help.