ImageTracking_MotionFusion¶
演示如何使用运动融合功能从图像扩展跟踪。
演示如何使用EasyAR运动融合功能更加稳定地跟踪图像
演示如何使用EasyAR运动融合功能实现扩展跟踪
sample在图像跟踪丢失后利用VIO能力继续保持跟踪并在场景中保留3d内容。
参考阅读: EasyAR 运动融合 , 运动跟踪与EasyAR功能
用法¶

Turn OFF/ON Motion Fusion:关闭/开启运动融合
详解¶
使用运动融合¶
运动融合功能需要一个具有运动跟踪能力的设备,可以参考 运动跟踪与EasyAR功能 。
在这个sample中,ARSession会根据设备可用性自动选择一个运动跟踪功能,如果所有运动跟踪功能都无法被支持,将会退化成没有运动融合的普通图像跟踪。

使用运动融合需要配置 ImageTrackerFrameFilter.ResultType ,打开 EnablePersistentTargetInstance 和 EnableMotionFusion 。

还需要设置 ImageTargetController.ActiveControl 为 ActiveControlStrategy.HideBeforeFirstFound 。

开关运动融合¶
修改 ImageTrackerFrameFilter.ResultType 即可对运动融合功能开关进行实时控制。
public void SwitchMotionFusion(bool on)
{
tracker.ResultType = new ImageTrackerFrameFilter.ResultParameters { EnablePersistentTargetInstance = on, EnableMotionFusion = on };
}