OpenCV3历程(2)——二值图像像素统计countNonZero()
图像处理中我们经常会用到统计非零像素点个数,这时我们应该尽量避免循环,可以对二值图像使用countNonZero()函数,更加简单高效!#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>#include <opencv2/imgproc/imgproc.hpp>...