Hi!
Are there any methods available for calculating the distance between the marker an the Smartphone? The ARToolKit provide many methods like calculating size of a marker or number of pixels in the labeled region who helps calculating the distance.
Perhaps anybody knows how to get the distance easily?
Thanks Steph
You can grab position values from the modelview matrix and get the distance from the magnitude. The modelview matrix represents the orientation of the trackable with the camera at the origin. The inverse of the modelview matrix represents the orientation of the camera with the trackable at the origin. Since we're just doing distance, we won't bother taking the inverse.
Here's a code snippet:
- Kim