Hi,
I am new to Vuforia so I started with the SampleApplication in Android with Java. What I am trying to achieve is to recognize some object and compute the position of the object to the camera. Like how far is this object to the device.
When I looked into the code for the SampleApplication.Object Reco, I see that it renders a bounding box on the object in scene and the size of the box is changing when the object moves away from the camera. I notice that the App uses the getPose() API on the trackableResult and get a modelViewMatrix. But I couldn't fully understand the math behind the scene and figure out how to compute the distance. My idea is that if I can get the size of the object on screen, combinded with the size of the object in database, I can know the difference in distance.
Thank you in advance for any help.
I am not too familiar with the pipeline of OpenGL and the math of modelViewMatrix. Is there a straighforward way to compute the distance from the tracked object to the camera given the size of the object?
Or it does not have to accurate, something close or calibrated result should be fine..