AR.source.ocr namespace
AR.source.ocr.LabelProcessing module
- AR.source.ocr.LabelProcessing.ReaderCroppedAndFullImage(img, regexp, type, background, range, ocrResults)
Call ogLblShapeDetector to crop the image, call ReaderOneImageRecursive on the cropped image and on the full image if not succesfull to read the label. Returns a list containing all characters in the image satisfying the different part ot the regexp and a list containing all characters that were read on the image to be used if a new regexp is used on the same image.
- AR.source.ocr.LabelProcessing.ReaderOneImageRecursive(img, regexp, type, ocrResults)
Handles regexp by calling ogLblUtils, call ogLblOCR to perform OCR on the image provided
AR.source.ocr.OCR module
- AR.source.ocr.OCR.PerformOCR(img)
Use easyOcr module to perform OCR on the provided image. Returns a tuple containing the characters read and their position.
- AR.source.ocr.OCR.ReplaceSymbol(text)
Replace the ‘Ø’ charachter with an ‘0’
- AR.source.ocr.OCR.ReturnMatch(text, labelMatcher)
Match a text with a regexp. Returns a string containing the match. If none returns None.
- AR.source.ocr.OCR.cleanup_text(text)
strip out non-ASCII text so we can draw the text on the image using OpenCV
AR.source.ocr.ShapeDetector module
- AR.source.ocr.ShapeDetector.HexaToRGB(hexa)
Take a hexa color code and convert it to RGB. Returns a tuple with the RGB code.
- AR.source.ocr.ShapeDetector.ShapeAndColorDetector(img, background, range)
Perform HSV mapping on the provided image using a hexa color code or a predefined color. Crop the image according to this mask. Returns the new image.