To find the lower array of black pixels of a word in an image
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I want the lower array of black pixels of this word.I know to count the black pixels but how to get the lower array? Please help me. Thank you

Answers (1)
Walter Roberson
on 14 Dec 2015
hprof = ~all(YourImage,2);
first_row_with_black = find(hprof, 1, 'first');
last_row_with_black = find(hprof, 1, 'last');
3 Comments
sindhu c
on 14 Dec 2015
Walter Roberson
on 14 Dec 2015
Change to
hprof = ~all(YourImage,2);
first_row_with_black = find(hprof, 1, 'first')
last_row_with_black = find(hprof, 1, 'last')
sindhu c
on 15 Dec 2015
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!