tesseract 输出中的奇怪符号

Strange symbol in tesseract output

我想知道为什么这个符号出现在输出中以及如何删除它。

我使用的所有图像都具有相同的行为。

我无法摆脱它。

我需要从没有那个符号的图像中提取的值,因为我稍后会在另一个地方使用它。

script.py

import pytesseract as ocr
from PIL import Image

custom_config = r'--psm 3'
phrase = ocr.image_to_string(Image.open('image.jpg'), config=custom_config)
print(phrase)

使用 pytesseract

使用超正方体

image.jpg

这些是换页符 (FF, \u000C),Tesseract 使用这些字符来分隔 OCRed 文本的页面。您可以 trim 在打印到控制台之前输出字符串。