cv::Mat mat34(3,4, CV_32FC(3),cv::Scalar(20,30,40));
mat34.at<float>(3,3) = 1000;
std::cout << mat34.at<float>(3,3) << " and " << mat34.at<cv::Vec<float,3> >(3,3)[0] << std::endl;
std::cout << mat34 << std::endl;
Output
1000 and 0
[20, 30, 40, 20, 30, 40, 20, 30, 40, 20, 30, 40;
20, 30, 40, 20, 30, 40, 20, 30, 40, 20, 30, 40;
20, 30, 40, 20, 30, 40, 20, 30, 40, 20, 30, 40]
I dont understand the 3,3 part. Is the element 3,3 not direclty in the matrix?