Search code examples
opencvimage-processingcomputer-visionedge-detectionbounding-box

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:

  • letters are of similar size;
  • letters' height is in range: 40px — 90px;
  • word is oriented horizontaly (±5˚);
  • there is one and only one word on this image;
  • this word does not intersect image's border (it's fully visible);
  • different parts of image may have different luminosity;
  • hotspots (totally white areas) may be present on an image.

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.


Solution

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