I'm using openALPR library to read plate licenses but I'm having issues reading the plates in different angles, like below image. My question is: what's the proper way to do that? Image processing to try make the image straight before submitting such as Homography
?
openALPR's settings such as max_plate_angle_degrees max_detection_input_width, max_detection_input_height, etc or train the tesseract-ocr with cropped images in different angles? I have no code to show because I'm looking for a direction how to do that.
Yes, Homography is the general term for what you are looking for, but I think you might find better resources by searching for "geometric transformation" or "projective/perspective transformation".
Here are some starting resources that might help:
I don't know about OpenALPR, and can't find clear documentation anywhere, so I can't comment on it. But those functions you've listed (max_plate_angle_degrees
max_detection_input_width
, max_detection_input_height
) does not sound like what you are looking for.
And I personally don't recommend training Tesseract OCR directly on unprocessed images (uncropped, angled license plates). Typically, you would follow an image processing procedure before passing it to Tesseract OCR as the final step. However, I haven't touched Tesseract since version 3 back in 2018, so the latest version 5 might fare better...
Regardless, I would imagine a traditional, end-to-end image processing pipeline like this:
You would likely implement fewer steps than this, as most libraries provide higher level functionalities that handles all this automatically.