How to get the location of all text present in an image using OpenCV?
Here’s a potential approach using morphological operations to filter out non-text contours. The idea is: Obtain binary image. Load image, grayscale, then Otsu’s threshold Remove horizontal and vertical lines. Create horizontal and vertical kernels using cv2.getStructuringElement() then remove lines with cv2.drawContours() Remove diagonal lines, circle objects, and curved contours. Filter using contour area cv2.contourArea() and … Read more