text image segmentation(Text is in form of cursive handwritting)
2 views (last 30 days)
Show older comments
hi
im in need to segment the cursive handwritten words into individual letters from an image.. plz any one help me with code.
code:-
clear all;
close all;
I = imread('plate.jpg');
BW = im2bw(I, 0.9);
BW = ~BW;
stats = regionprops(BW);
for index=1:length(stats)
if stats(index).Area > 200 && stats(index).BoundingBox(3)*stats(index).BoundingBox(4) < 30000
x = ceil(stats(index).BoundingBox(1))
y= ceil(stats(index).BoundingBox(2))
widthX = floor(stats(index).BoundingBox(3)-1)
widthY = floor(stats(index).BoundingBox(4)-1)
subimage(index) = {BW(y:y+widthY,x:x+widthX,:)};
figure, imshow(subimage{index})
end
end
I've tried this code but its segments the character where space occurs.. i'm need of code for cursive handwriting segmentation plz some one help me with code
1 Comment
sreerag ibtl
on 11 Mar 2018
Assume that word is white and background zero. Find the vertical sum of bits(sum). Set a threshold value for the sum. At columns where there is pixels less than threshold value set the pixels in that col to zero. The connections are now broken. ps: Letters such as small n,m and u won't be well segmented if the image is of better clarity or not pre-processed well.This method is not suitable for cursive fonts with overlapping characters.
Answers (1)
Image Analyst
on 14 Dec 2015
Find papers that tell you how to do this here: http://www.visionbib.com/bibliography/contentschar.html#OCR,%20Document%20Analysis%20and%20Character%20Recognition%20Systems
0 Comments
See Also
Categories
Find more on Image Processing Toolbox 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!