OCR with Pytesseract and OpenCV
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQjUpL3Dj5RE0LNEPMmA3yrLCeg5u_dJ537cUl5HZ6fWB6b9QwFCNFxQ-EUZfuhadtRljcBMbGoWF7yRjkbDWy__s7f1WXIyOcQWdZUK4n3s_PBtZdbVgTDjrFX_wpnLUlidcC6yyOu1V1/w579-h377/1.jpeg)
OCR with Pytesseract and OpenCV Pytesseract is a wrapper for Tesseract-OCR Engine. It is also useful as a stand-alone invocation script to tesseract, as it can read all image types supported by the Pillow and Leptonica imaging libraries, including jpeg, png, gif, bmp, tiff, and others. Preprocessing for Tesseract The main objective of the Preprocessing phase is to make as easy as possible for the OCR system to distinguish a character/word from the background. Some of the most basic and important Preprocessing techniques are:- Binarization. Skew Correction. Noise Removal. Thinning and Skeletonization. Binarization: In layman’s terms Binarization means converting a coloured image into an image which consists of only black and white pixels (Black pixel value=0 and White pixel value=255). As a basic rule, this can be done by fixing a threshold (normally threshold=127, as it is exactly half of the pixel range 0–255). If the pixel value is greater than the threshold, it is