OTSU /* * 功能: 大津二值法 * 参数: img为图像矩阵 * 返回: 二值化的阈值 */ #include #define HEIGHT 1080 #define WIDTH 1920 unsigned char otsuBin(unsigned char img[][WIDTH]) { long greyHisto[256]; unsigned char greyMin = 0, greyMax = 255; memset(greyHisto, 0, 256 * sizeof(long)); // 获取灰度直方图 f