I have bounding box(coordinate of rectangle) in an image and want to extract text within that coordinates. How can I use pytesseract to extract text within that coordinates?
I tried copying the image portion to other numpyarray using opencv like
cropped_image = image[y1:y2][x1:x2]
and tried pytesseract.image_to_string(). But the accuracy was very poor. But when I tried original image to pytesseract.image_to_string() it extracted every thing perfectly..
Is there any function to extract specific portion of image using pytesseract?
Please help Thanks in advance
Versions I am using: Tesseract 4.0.0 pytesseract 0.3.0 OpenCv 3.4.3