javaandroidartoolkit

artoolkit Distance between camera and ArMarker


I want to find the accurate distance between camera and armarker.

float[] markerDistance = ARToolKit.getInstance().queryMarkerTransformation(markerID.get(i));

float x = markerDistance[12];
float y = markerDistance[13];
float z = markerDistance[14];

double distance = Math.sqrt((x*x) + (y*y) + (z*z));

Here is the distance but it is not accurate.

My project depends on accurate or nearly accurate distance.


Solution

  • I answered that before. The distance is represented by the z-Axis on ARToolKit5. Have a look here:

    Find distance between ArMarker and camera in ArToolkit's android java SDK

    Let me know it that is what you were looking for.