when using tesseract character recognition, it is found that if the enlarged picture recognition is used, the wrong text recognition will get the correct result. The image magnification algorithm of WIN10 with photo viewer or light and shadow view or Mac"s own preview tool is not a simple zoom picture, but is optimized with image quality improvement. If you know this algorithm, you can improve the correct rate of text recognition and realize text recognition on a single machine. Does anyone know what algorithm is used
from PIL import Image
import pytesseract
path = r"D:\ocr.bmp"
for p in range(4,14):
text = pytesseract.image_to_string(Image.open(path), config="--psm {}".format(p),lang="chi_sim")
print(str(p)+" : "+text)
reference question: https://codeshelper.com/q/10.