15 lines
409 B
Python
15 lines
409 B
Python
import cv2
|
|
import numpy as np
|
|
from paddleocr import PaddleOCR
|
|
|
|
# Create a dummy image with some text
|
|
img = np.zeros((100, 300, 3), dtype=np.uint8)
|
|
cv2.putText(img, "Hello World", (10, 50), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 2)
|
|
|
|
ocr = PaddleOCR(use_angle_cls=False, lang="vi", enable_mkldnn=False)
|
|
result = ocr.ocr(img)
|
|
|
|
print("===== RAW RESULT =====")
|
|
print(result)
|
|
print("======================")
|