|
@@ -24,7 +24,7 @@ psm值为6表示假设文本是单个统一的块。
|
|
|
psm值为7表示将图像视为一个单一的文本行。
|
|
|
psm值为8表示将图像视为一个包含多个文本行的块。
|
|
|
'''
|
|
|
-boxes = pytesseract.image_to_boxes(gray_image,lang = 'chi_sim+eng',config = '--psm 3',output_type = pytesseract.Output.STRING)
|
|
|
+boxes = pytesseract.image_to_boxes(gray_image,lang = 'chi_sim+eng',config = '--psm 6',output_type = pytesseract.Output.STRING)
|
|
|
'''
|
|
|
<char>:识别出的字符。
|
|
|
<left>:字符在图像中的左边界距离图像左侧的距离。
|
|
@@ -33,7 +33,7 @@ boxes = pytesseract.image_to_boxes(gray_image,lang = 'chi_sim+eng',config = '--p
|
|
|
<height>:字符的高度。
|
|
|
<conf>:模型对字符属于该类别的置信度,通常是一个介于0和1之间的值
|
|
|
'''
|
|
|
-datas = pytesseract.image_to_data(gray_image,lang = 'chi_sim+eng',config = '--psm 3',output_type=pytesseract.Output.DICT)
|
|
|
+datas = pytesseract.image_to_data(gray_image,lang = 'chi_sim+eng',config = '--psm 6',output_type=pytesseract.Output.DICT)
|
|
|
'''
|
|
|
level:字符的级别,表示该字符在文本中的重要性。
|
|
|
page_num:字符所在的页面编号。
|