Better character isolation
Hi,
I am trying to process an image, and extract the characters from it. Please see the following link for current work in progress: http://imgur.com/a/FfqwJ
At the moment, these are the steps I have followed:
- Take original image, convert to hsv, get a mask of the yellow regions using inRange( )
- Extract the yellow marker regions ( see the link above )
- Take the yellow region image, convert to grayscale
- Dilate and erode the grayscale image
- Threshold the image using cv2.threshold( image, 110, 255, cv2.THRESH_BINARY )
- run findContours on the threshold image to identify the characters
- Create a bounding box around the contours to isolate the characters based on width, height, position
- Extract each character individually.
As you can see from the two images, the thresholding is not working so well for the first image, but is good for the second. If I change my thresholding value to where the first image becomes cleaner, then the second image becomes much worse.
I am hoping someone can suggest some other methods to help me process the images more reliably.
Any help would be greatly appreciated.