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.