Reputation: 1870
How can I get the real distance between two ArUco markers in a frame?
Upvotes: 0
Views: 2006
Reputation: 1870
tvec
First we need to get the tvec
of each marker like seen in this one:
How to get distance from camera to marker with ArUco
Once we have both tvec
's of both markers in the frame we can simply use the Euclidean distance formula to retrieve the distance between both markers in the 3D space. Be aware that the unit you'll receive is the same as the one you provided for the real maker size to get the tvec
.
Numpy provides a method to retrieve the euclidian distance.
np.linalg.norm(tvec1-tvec2)
Upvotes: 1