how to read column wise pixels using FOR LOOP

1 visualizzazione (ultimi 30 giorni)
DB
DB il 6 Mar 2017
Modificato: Adam il 7 Mar 2017
when I'm using this code I got below results....... figure,plot(sum(bw,2),1:size(bw,1));
so I need how to read column wise pixels using FOR LOOP? can any one tell me how to read pixels column wise ....?
Thanks in Advance
  6 Commenti
Adam
Adam il 6 Mar 2017
It still doesn't make sense what you want. Focus on the result you want. The fact you think you should use a for loop is irrelevant to what you are actually trying to get as an end result.
DB
DB il 6 Mar 2017
This is my input image
I want output like this

Accedi per commentare.

Risposta accettata

Adam
Adam il 7 Mar 2017
Modificato: Adam il 7 Mar 2017
Judging from your last comment what you want is a plot of the number of black pixels in each column of the image:
figure; area( sum( ~bw ) )
should give you this.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by