How to segment an image containing text?
1 次查看(过去 30 天)
显示 更早的评论
I have an image containing paragraph,how do i segment that paragraph into separate lines?? i mean the paragraph should be segmented into 6 lines of text.
Thank you
0 个评论
回答(1 个)
Image Analyst
2015-11-17
See if this does what you want: http://www.mathworks.com/help/vision/ref/ocr.html#bt548t1-2_1. Otherwise, if your lines are aligned with the edges of the image, get the mean horizontally:
verticalProfile = mean(grayImage, 2);
Then threshold
inALineIndexes = verticalProfile < 128; % or whatever value works.
3 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!