How to count the white pixels for each column in a binary image

 Accepted Answer

I = imread('download.png') ;
I = rgb2gray(I) ;
idx = I~=0 ;
iwant = sum(idx)

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Asked:

Anu
on 5 Dec 2018

Commented:

Anu
on 5 Dec 2018

Community Treasure Hunt

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

Start Hunting!