- Preprocess the loaded image by converting it to grayscale, and apply thresholding to convert the image to binary format
- Perform image segmentation based on pixel intensity and perform morphological operations like “imfill”, “imdilate”, etc to clean up the binary image.
- To identify the dark regions, create a mask for the same in the grayscale image, and display the regions as potential text area.
- Segmentation of scanned pages on text and image blocks - https://www.mathworks.com/matlabcentral/answers/376905-segmentation-of-scanned-pages-on-text-and-image-blocks
- Segment and read text in image - https://www.mathworks.com/help/vision/ug/automatically-detect-and-recognize-text-in-natural-images.html