一段很巧妙的直方图统计算法代码

来源:互联网 发布:腋下汗毛怎么去掉知乎 编辑:程序博客网 时间:2024/06/01 08:05
    double absolute_histo[256] = { 0 };    for (int i = 0; i < Image.rows; i++)    {        const uchar* p = Image.ptr<uchar>(i);        for (int j = 0; j < Image.cols; j++)        {            absolute_histo[*(p + j)]++;        }    }

这是一段hao来的好东西哎。。。。不然要switch 256个case了

0 0