accessing element in a homography matrix
Hi all, I have a 3x3 homography matrix , which I computed using findHomography() function. I store it in a cv::Mat matrix.
I am trying to do element access using the following code
float cvHomography::accessElements(const cv::Mat& aCvMat) { //cout << aCvMat << endl;
const float* Mi;
for( int i = 0; i < aCvMat.rows; i++){
Mi = aCvMat.ptr<float>(i);
for( int j = 0; j < aCvMat.cols; j++){
cout << Mi[j] << endl;
}
}
}
The above does not return the correct value from the homography matrix. I have searched through documentation , tutorials and google and I honestly cannot see what I am doing wrong.