Skip to content

Visual Positioning

VisualPositioning estimates the user’s position and floor level from a single camera frame.

Positioning accuracy depends on the selected model and, above all, on the quality of the images acquired during the survey. Combining Visual Positioning output with other signals through the MDK can further improve both accuracy and the smoothness of location updates.

This class requires the ARDK to access the camera. ARDK provides direct access to the hardware, reducing image copies and improving performance. A future version may support standalone operation, allowing Visual Positioning to read camera images directly.

Creating an instance

To create an instance, provide the path to a Visual Positioning descriptor file. This file contains the information required to load the appropriate models for each floor, as well as the floor-estimation model. These files can usually be obtained as auxiliary files through the MDK.

Floor detection

When creating an instance, the floor estimator is available only if it is included in the Visual Positioning descriptor file and ignoreFloorEstimator is set to false (the default). Use canEstimateFloor to check whether automatic floor estimation is available. If it is not, the active floor must be updated manually by calling changeLevel.

Integration with MDK and ARDK

The AIDK receives camera input through an ARDK CameraSession and sends its output to an MDK LocationSession.

To configure this flow, first call link on the ARDK CameraSession, passing the VisualPositioning instance. Then call link on VisualPositioning, passing the LocationSession.

To release the associated resources, you must explicitly call the unlink function on both ends. Alternatively, call unlinkAll to unlink all connected modules at once.