Kannada handwritten and printed character separation
Show older comments
I want aa help to do my project for separating handwritten and printed character. can i achieve this by segmentation
Answers (2)
Image Analyst
on 15 Apr 2017
1 vote
Yes you can. That's what segmentation is - identifying and separating separate distinct regions into a binary image that you can then label and measure, characterize, evaluate, or whatever.
See the published literature on OCR for examples: http://www.visionbib.com/bibliography/contentschar.html#OCR,%20Document%20Analysis%20and%20Character%20Recognition%20Systems
13 Comments
Kishor s
on 15 Apr 2017
Kishor s
on 15 Apr 2017
Image Analyst
on 15 Apr 2017
Edited: Image Analyst
on 15 Apr 2017
Attached is one possibility. It may or may not work for your images. It's designed to get a good threshold for handwritten historical documents with noise and non-uniform background.

Image Analyst
on 16 Apr 2017
If your background is good, just apply a global threshold. See my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862&sort=downloads_desc for a full demo that will walk you through the process.
Kishor s
on 19 Apr 2017
Image Analyst
on 19 Apr 2017
Look where it's cropped out. That information will be there right where the cropping happens.
Kishor s
on 20 Apr 2017
Image Analyst
on 20 Apr 2017
If you want the labeling done in a particular order, you're going to have to get the centroids and sort them based on the centroids.
Kishor s
on 21 Apr 2017
Kishor s
on 21 Apr 2017
Image Analyst
on 21 Apr 2017
You can't sort like that because that BoundingBox is all the values of x, y, width, and height. You have to extract out each
bb = [blobMeasurements.BoundingBox];
% Get x
x = bb(1:4:end);
% Get y
y = bb(2:4:end);
% Get widths and heights
widths = bb(3:4:end);
heights = bb(4:4:end);
You might then want to pass the y into kmeans to find out which characters are in which line. Once you know that, then just march over with increasing x.
[classIndexes, clusterCenters] = kmeans(y, numberOfLines);
% Show what line the character is in
for k = 1 : length(classIndexes)
fprintf('Blob %d is in line #%d.\n', k, classIndexes(k));
end
Kishor s
on 19 Apr 2017
0 votes
Categories
Find more on Language Support in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!