How to separate horizontly on the basis of gaps or space

1 次查看(过去 30 天)
Hello friends,
I am trying to separate all characters vertically separated through gaps/spaces as highlighted in image through red, blue and green color
If I am trying to use bwlabel, it is separating connected components. thus I am losing ligatures and dots. Any help by providing me the link or sample code shall be highly appreciated.
Regards

回答(1 个)

Image Analyst
Image Analyst 2013-11-6
For this simple case, I'd just get profiles. I would sum the image horizontally and vertically and look for spikes.
horizontalProfile = sum(grayImage, 1); % Sum across all rows.
verticalProfile = sum(grayImage, 2); % Sum across all columns.

类别

Help CenterFile Exchange 中查找有关 Language Support 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by