Stanislav
Stanislav

Reputation: 410

Finding word's bounding box on a low quality image

I'm trying to get a bounding box for the word "ЛИЛИЯ" in this image, using opencv.

example image to process
(source: litprom.ru)

I am already experimenting with cv::findContours() and different thresholding alogrithms for couple of days, but can not get any satisfying results.

So, what do I know about this word:

English is not my native language, so I'm sorry if the question is not properly explained. If someone needs more images to answer this question, I have at least a dozen more.

Upvotes: 2

Views: 270

Answers (2)

Diana
Diana

Reputation: 1321

Check out stroke width transform. That is used to text detection.

Upvotes: 1

rold2007
rold2007

Reputation: 1327

You can preprocess your image with adaptiveThreshold. You should use a blocksize a little bit bigger than your biggest character. I tried on your image with 91 and it gave good results. Then you can use FindContours and filter the blobs/contours using their height. Note that the letters will still be connected one to another so you cannot really filter using the width.

Upvotes: 0

Related Questions