Percentage of white pixel

Posted by AZIRAR on Stack Overflow See other posts from Stack Overflow or by AZIRAR
Published on 2010-05-21T17:46:01Z Indexed on 2010/05/21 17:50 UTC
Read the original article Hit count: 273

Filed under:

After performing processing I want to calculate the percentage of white pixels between this images after the change.

I'm doing this: var = (int2str(nnz(Img2)) / int2str(nnz(Img1))) * 100;

but it returns as result ]

What's the problem ?

© Stack Overflow or respective owner

Related posts about matlab