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了