Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

To find the lower array of black pixels of a word in an image

1 Ansicht (letzte 30 Tage)
sindhu c
sindhu c am 14 Dez. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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

Antworten (1)

Walter Roberson
Walter Roberson am 14 Dez. 2015
hprof = ~all(YourImage,2);
first_row_with_black = find(hprof, 1, 'first');
last_row_with_black = find(hprof, 1, 'last');
  3 Kommentare
Walter Roberson
Walter Roberson am 14 Dez. 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
sindhu c am 15 Dez. 2015
sir,this is what i'm getting .empty array!!

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by