mat读取大于255的像素值

小丑_jk / 2023-08-31 / 原文

 

    Mat dst;
    input.convertTo(dst, CV_32S);
    int rows = dst.rows;
    int cols = dst.cols;
    for(int i = 0; i < rows; i++)
    {
        for(int j = 0; j < cols; j++)
        {
            cout << "value : " << dst.at<int>(i, j)  << endl ;
        }
    }