Reputation: 1673
I am trying to detect filled shapes (mainly texts) from an image using edge detection algorithms like Sobel, Canny, Prewitt, Roberts etc. I am using C# as my programming language. Image can contain texts of different sizes. The result I am getting after applying edge detection algorithms are the edges of texts like this
But I want to detect the whole body of text (no matter how big the size of text is), like this
I don't know whether I am doing it write or wrong, for what I want to achieve. I have also tried it by increasing the size of my mask, but it eventually neglect small size texts. I need help in it.
Upvotes: 0
Views: 678
Reputation:
As said by @BalajiR your text is already in the desired shape and edge detection followed by filling would be overkill.
If you have different colors, you can just binarize by using the rule "background/not background".
Finding characters on a real picture is something completely different, which deserves a separate question. In particular, adaptive thresholding is usually required.
Regarding blur/disturbed text, there is nothing you can do to restore perfect characters (deblurring can help to some extent but I would not recommend). Image processing algorithms cannot "re-invent" the shape of the characters.
Upvotes: 1