print cv::Mat element -- OpenCV(C++) -
i trying loop on matrix , print element, should simple operation, experience strange things...
i have a null matrix : cv::mat accum = cv::mat::zeros(3,5,cv_8u);
doing this:
for(int i=0;i<accum.rows;i++) { for(int j=0;j<accum.cols;j++) { cout<<accum.at<int>(i,j) <<endl; } }
i following elements:
0 0 0 0 0 0 0 0 0 -536870912 0 0 0 2027945984 587217671
why there random number @ places 0 should be?
if initialize value of matrix @ i=1,j=1 number 1, following
0 0 256 0 0 0 1 0 0 587202560 0 0 0 1931673600 587257437
i dont understand random values, might wrong, cant figure out what. please help?
Comments
Post a Comment