Ocr, Tesseract, Opencv, Pytesseract, Optical Character Recogn.
re.search('(?<=Rotate: )\d+', osd).group(0) script = re.search('(?<=Script: )\d+', osd).group(0) print("angle: ", angle) print("script: ", script) will print the following output. angle: 90 script: Latin Detect only digits Take this image for example - The text extracted from this image looks like