HOW TO SEGMENT TWO OVERLAPPING CHARACTERS USING CURVED LINE SEGMENTATION?

hello everyone! Can anyone help me or guide me through segmentation of overlapping characters?
Straight segmentation is not an option as some part of the characters will be lost. thank you!

 Accepted Answer

I'm sure this has already been figured out before and published here: http://iris.usc.edu/Vision-Notes/bibliography/contentschar.html#OCR,%20Document%20Analysis%20and%20Character%20Recognition%20Systems Find the paper and code it up.
Whatever I suggest might not be the best approach. But just to toss a few ideas out there...
You could find the shortest path from top to bottom using bwdistgeodesic. See Steve's blog: http://blogs.mathworks.com/steve/2011/11/01/exploring-shortest-paths-part-1/
You could use "seam carving" - Google it.
You could try to connect nearby blobs using a tall, narrow kernel and imclose. Then do connected components labeling with bwlabel. Then AND those blobs with the original image.

9 Comments

sir, i am new to matlab and i am using matlab 7.6.0 R2008a. The function bwdistgeodesic doesnt seem to work for this version of Matlab. Can you explain more on the connected component labeling and AND-ing the blobs with original image. If you have any code regarding this please send it to me. thank you for your time.
Connected component labeling tags each pixel that is in a connecting "blob" with the same number. If each character was all connected, then it would have the same number of all pixels in it, in the labeled image. If a character was separated, like i or j, then will will have two numbers - one number for the "body" of the i or j, and a different number for the dot above.
sir, my question was how connected component analysis and then AND-ing it with the original image will help me segment the overlapping characters?
Let's say your letters are i and k. If you do labeling on the original binary image, you'll find there are 3 blobs there: 1 is the body of the i, 2 is the dot above the i, and 3 is the k. Now run imclose() to connect nearby objects and label that. You'll now have two blobs: 1 is the label of the merged i, and 2 is the k. Now you can extract the letters one at a time using ismember on the labeled image. So now you have two images, one with the closed i, and one with the closed k. But the closed i is all rounded out and has the dot connected to the body, which you don't want anymore. So you AND it with the original binary image to extract out the original i with dot. Now you can do OCR on just that one character in its original form/shape.
ah... ok... thats a neat idea!! thank you!! i will try that and let you know!! :)
ITS WORKING PERFECTLY ,SIR!! THANK YOU VERY MUCH!! :)
Hello Soumyadeep, Can you please give me your code. My id is honeypatel1992@yahoo.co.in.Please give it to me.Thank you
Hello sir, can you give me your code please. my email is praneethprabashan@gmail.com

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!