- The notebook containing my solution: Assignment_5_NB.ipynb
- The image used for the experiments is at: Original_Images/Image_1.jpeg
- Dependencies: pip install opencv-python numpy easyocr matplotlib
Border detection is done by initially detecting the edges with opencv's Canny and then a rectangular contour is recognized to be displayed on top of the original image.
Perspective transform is also done with opencv by transforming the rectangular contour from the "Border Detection" stage into 4 corner points. The resulting image is saved in the folder named "Results_Folder" under the name _"image_name"+"Perspective" and displayed with matplotlib.
Text Recognition was carried out with MSER where the detected text was highlighted with red. The resulting image is saved in the folder named "Results_Folder" under the name "image_name"+"_MSER" and displayed with matplotlib.
A pre-trained CRNN model was loaded via the "easyocr" library which extracted the text from the "highlighted_image" array from the "Text Recognition" stage to be printed and saved in the "Results_Folder" under the name "image_name"+"Text" in txt format.