如何用MATLAB计算二进制图像中的白色像素数?
函数NNZ应该可以解决问题,因为“white”在二进制图像img
表示为1,“black”表示为0:
nWhite = nnz(img);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.