1
votes

I have a comics image, and I want to extract panels and text balloons from it. I am using connected component algorithm for this purpose,"bwconncomp". Knowing that "bwconncomp" requires a binary image as an argument, I am using "im2bw" to binarize my image followed by some morphological filtering.

Ibw = im2bw(I,graythresh(I)); % also tried the default threshold along with all values in the      % range [0 1]
Imr = bwmorph(Ibw,'skel'); % also tried 'close' and 'clean' 

Icc = bwareaopen(Imr,100); 

The problem is that I am getting a drastic change in the number of detected connected components as I change the binarization threshold and some changes upon morphological operation. None of the combinations I have tried gave me all available major objects of the image, there is always some missing.

Can anyone please guide me with that?

1
Well thats a BIG problem. It is not possible to create THE THRESHOLD method for the resut you want that wokrs allways, spetially if you are working with comics where i guess the imageschange a lot from square to square. What I would suggest is first to find "squares" and separate each panel. Then threeshold with a high threshold value (as I suppose the balloons are white) or try to find circular objects and white objects together. Another option is to implement also OCR and the find white areas where the text is... Your question can be a GOOGLE software if its properly coded,not easy to answer - Ander Biguri
I suggeest you break the problem into small problems and Try to solve them one by one. You will be able to get better results and better answers in SO. - Ander Biguri
Please post an example image of what you are trying to segment. This may help us in giving you a solution - rayryeng
I need 10 reputations to be able to post an image.. if u have another way to share it i don't mind - user2217303

1 Answers

0
votes

You can try detecting text, rather than simply binarizing the image. If you have a recent version of MATLAB with the Computer Vision System Toolbox, you can try this example of text detection.