HOW TO SEGMENT TWO OVERLAPPING CHARACTERS USING CURVED LINE SEGMENTATION?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
0 votes
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
Image Analyst
on 29 Mar 2014
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
soumyadeep
on 29 Mar 2014
Edited: soumyadeep
on 29 Mar 2014
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.
Image Analyst
on 29 Mar 2014
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.
soumyadeep
on 30 Mar 2014
sir, my question was how connected component analysis and then AND-ing it with the original image will help me segment the overlapping characters?
Image Analyst
on 30 Mar 2014
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.
soumyadeep
on 30 Mar 2014
ah... ok... thats a neat idea!! thank you!! i will try that and let you know!! :)
soumyadeep
on 30 Mar 2014
ITS WORKING PERFECTLY ,SIR!! THANK YOU VERY MUCH!! :)
honey
on 8 Jan 2015
Hello Soumyadeep, Can you please give me your code. My id is honeypatel1992@yahoo.co.in.Please give it to me.Thank you
amrin banu
on 23 Apr 2015
Dasun Praneeth
on 2 Nov 2017
More Answers (0)
Categories
Find more on Color Segmentation in Help Center and File Exchange
Tags
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)