Hello Bohdan,
As stated in our documentation "In case you have the wikitude SDK running with ongoing image recognition, the plugin API will populate the RecognizedTarget in the update method once an image has been recognized. The plugin can then work with class RecognizedTarget, which wraps the details of the target image in the camera view. With that you can read out the pose of the target image and use it for your purposes. Additionally the call contains the calculated distance to the recognized target"
class RecognizedTarget { public: const string& getIdentifier() const; // the identifier of the target. The identifier is defined when the target is added to a target collection const Mat4& getModelViewMatrix() const; // the model view matrix that defines the transformation of the target in the camera frame (translation, rotation, scale) const Mat4& getProjectionMatrix() const; const float getDistanceToCamera() const; // represents the distance from the target to the camera in millimeter };
Thanks
Eva
Bohdan Turivniy
How to call the method getDistanceToCamera() class RecognizedTarget ?