Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you're "one-off" here, simply. if your Mat has a single row, the only valid row-index is 0 .

for (int i=0; i<rowMean.cols; i++)
{
        std::cout<<rowMean.at<int>(0,i)<<" ";
}

will give the correct result.