apriltag
apriltag copied to clipboard
How to find the linear distance between the camera and the tag in the code of Apriltags?
I know that pose.R and pose.t represents the rotation matrix and translation vector of tag relative to the camera coordinate system respectively.
The X distance of the tag relative to the camera in the real world is pose.t->data[0].The Y distance of the tag relative to the camera in the real world is pose.t->data[1].The Z distance(heigh) of the tag relative to the camera in the real world is pose.t->data[2].
cout<<" x="<<pose.t->data[0]<<" "<<"y="<<pose.t->data[1]<<" "<<"z="<<pose.t->data[2]<<endl;
What's the linear distance of the tag relative to the camera in the real world incode?
If you have the translation, then the distance is just the norm, right?