I was working on homography and whenever I try to check the values of H matrix (type CV_64F) using H.at
I get random numbers(sometimes garbag
You should try this:
A.at(i, j);
because your matrix is of "type" CV_64F
which in turn means it contains elements of type double
, not float
.
By the way, I'm not sure whether you are aware of this, but you can use cout
to print the matrix like so:
std::cout << A << std::endl;
I found this to be useful for inspecting a small matrix or a slice of a matrix.