I need to recognize speech bubbles to send to OCR and also to know where they are in the strip.
How could I do this with OpenCV?

I'm using OpenCV 2 and Python 3.6

enter image description here

  • 2
    $\begingroup$ modern OCR software often does text localization itself; are you sure you actually need to do this? Because honestly, speech bubble recognition sounds like a very hard problem, whereas just looking for things that look like letters in an image would be easy; find a heap of letters somewhere, and tadah: text. $\endgroup$ May 22, 2018 at 6:54
  • $\begingroup$ Yes that would work, although finding the bubbles may be an interesting feature to have for other things I have in mind, like automatic translation inside the bubbles, for example. $\endgroup$
    – Petruza
    May 22, 2018 at 23:37

1 Answer 1


As said in the comments an efficient way is to first detect letters, words and text with OCR. Then try to expand each text zone to its corresponding text bubble.

Depending on the text bubble design there are different approaches. However, a solution that could work well and be robust would be to perform edge detection on the near surrounding of the previously detected text zones and then keeping only the (radially) closest edges from the text zones(that should be the bubble borders).

This is just a basic idea, you may have to build a more sophisticated algorithm obviously!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.