tesseract return reversed words with arabic

Viewed 645

hello everyone I'm trying to extract a license number plate from Tunisian cars so i decided to use tesseract to extract the numbers and word 'تونس' so before that i installed tesseract-OCR v5.0.0 for windows 10 and i wanted to try on an image with Arabic words but i got this result words are reversed i didn't know how to fix this

enter image description here

this is the code I've been used

import pytesseract
import cv2

pytesseract.pytesseract.tesseract_cmd=r"C:\Program Files\Tesseract-OCR\tesseract.exe"

text1= cv2.imread ('text.jpg')

text=pytesseract.image_to_string(text1 , lang='ara')
print(text)
cv2.imshow("img",text1)
cv2.waitKey(0)
0 Answers
Related