ImageTracking_MotionFusion

Demonstrate how to use motion fusion to extend tracking started from image.

  • Demonstrate how to track image more stable using EasyAR motion fusion

  • Demonstrate how to extend tracking using EasyAR motion fusion

This sample will use VIO function to keep tracking when image tracking lost and keep 3d content in the scene.

Reference: EasyAR Motion Fusion, Motion Tracking and EasyAR Features.

How to Use

../../_images/image_s5_4.png

Turn OFF/ON Motion Fusion: Turn OFF/ON Motion Fusion

How It Works

Use motion fusion

A device capable of motion tracking is required to use motion fusion. Please reference Motion Tracking and EasyAR Features.

In this sample, ARSession will choose a motion tracking feature according to their availabilities. It will fall back to normal image tracking if there is no motion tracking feature available.

../../_images/image_s5_1.png

To use motion fusion, ImageTrackerFrameFilter.ResultType should be set to turn on both EnablePersistentTargetInstance EnableMotionFusion.

../../_images/image_s5_2.png

Also, ImageTargetController.ActiveControl should be set to ActiveControlStrategy.HideBeforeFirstFound

../../_images/image_s5_3.png

Motion fusion on/off

ImageTrackerFrameFilter.ResultType can be used to control motion fusion in runtime.

public void SwitchMotionFusion(bool on)
{
    tracker.ResultType = new ImageTrackerFrameFilter.ResultParameters { EnablePersistentTargetInstance = on, EnableMotionFusion = on };
}