How to segment an image containing text?

4 views (last 30 days)
Meghashree G
Meghashree G on 17 Nov 2015
Edited: Meghashree G on 17 Nov 2015
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

Answers (1)

Image Analyst
Image Analyst on 17 Nov 2015
See if this does what you want: 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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!