Skip to content

opencv无法正确读取png图片导致ocr识别失败 #16148

@donggoing

Description

@donggoing

🔎 Search before asking

  • I have searched the PaddleOCR Docs and found no similar bug report.
  • I have searched the PaddleOCR Issues and found no similar bug report.
  • I have searched the PaddleOCR Discussions and found no similar bug report.

🐛 Bug (问题描述)

#16104#16099 (comment) 中的第一张图在读取后文字完全不可见,导致文字识别失败

Image

运行Demo保存图片后如下:

Image

🏃‍♂️ Environment (运行环境)

macOS m4 & linux

paddleocr 3.1.0
paddlepaddle 3.1.0
paddlex 3.1.3

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

import cv2
from paddlex.inference.common.reader.image_reader import ReadImage
img = ReadImage().read("sprite_7d0cc3c385.png")
cv2.imwrite("sprite_7d0cc3c385_1.png", img)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions