optimized cv::sum (CV_8UC1)