Info
This question is closed. Reopen it to edit or answer.
remove dead spaces between peaks in progection
1 view (last 30 days)
Show older comments
I make a vertical projection of a handwritten word image by using this code:
imread('a1.bmp');
verticalProjection = sum(ans,1); %vertical projection
subplot(2,2,1);imshow(ans);
subplot(2,2,3);plot(verticalProjection, 'b-');
grid on;
darkPixels = verticalProjection < 1; %threshold
[labeldRegions, numberOfRegions] = bwlabel(darkPixels); %label
fprintf('Number of regions = %d\n', numberOfRegions);
and this is an output:
I want to remove (crop) the dead spaces which are 2 spaces here in this image in order to remove these spaces from image itself (between part of a word) and get the word image without spaces as an output. any one can help me please?
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!