void function( ..... cv::Affine3d pose,....)
{
cv::Vec3d z_axis(0.0, 0.0, dev->len);
cv::Vec3d plane_vec = pose * z_axis;// the result of plane_vec is [-60.5844, 48.1445, -17.4011]
}
In my opinion, pose is a 4x4 matrix which contains a 3x3 rotation matrix, a 3x1 translation matrix and a row containing 0001, and z_axis is an array containing 3 numbers.
why does this happen? it seems not obey the rule of matrix multiplication.
also, how do you derive that pose ?
(admittedly, it would make a lot of sense to have a 4x4, homogeneous RT mat here, just this one does not seem like it)
Sorry, i can not show any more information about pose due to my power.
But could you tell me if pose is a 3x3 matrix, how does it contains these tow matrixs?
I mean if pose is a 4x4 matrix, then the left upper matrix is a 3x3 rotation and behind it is a 3x1 translation vector.
maybe pose is a 3x4 matrix?
OK, sorry to bother you so long.
I just print the translation, it is a 3 x1 vector [153.665, -1029.43, 36.6683]
And, could you tell me any information do you need to fix this problem.
the definition of pose in its class is cv::affine3d
that (default and Mat4 constructor) clearly states that it holds 4x4 data. I don’t see a reason to question that.
I don’t see where multiplication is defined on that thing. I don’t see superclasses.
however, Vec has operators… but docs don’t say what operation is performed by operator*…
the operation M v should result in another vector that is either 4-element (generally) or 3-element (affine). did you expect something other than a vector?