Extracting text from vehicle license plate images
Contents
[
Hide
]
Aspose.OCR for Python via .NET offers a special recognition algorithm that extracts text from vehicle license plates, including dark and blurry photos. The resulting text can then be automatically saved to the database or automatically verified.
To extract text from a vehicle license plate image, use recognize_car_plate()
method of AsposeOcr
class.
This method allows you to customize recognition accuracy, performance, and other settings.
The method takes OcrInput
object and returns OcrOutput
object containing the vehicle license plate text and other details.
# Instantiate Aspose.OCR API
api = AsposeOcr()
# Add image to the recognition batch
input = OcrInput(InputType.SINGLE_IMAGE)
input.add("car1.png")
input.add("car2.png")
# Set recognition language
recognitionSettings = CarPlateRecognitionSettings()
recognitionSettings.Language = Aspose.OCR.Language.Latin;
# Recognize license plates
results = api.recognize_car_plate(input, recognitionSettings)
# Print recognition result
for result in results:
print(result.recognition_text)