ARSceneTracker Class

Inherits: FrameFilter


EasyAR implements SLAM on Android and iOS devices with special optimizations, it is not recommended to run SLAM on Windows or Mac. The algorithm effects will be totally different. SLAM for Windows and Mac is only for development purpose, to ease content creation.

An ARSceneTracker is a class for SLAM tracking.

ARSceneTracker tracks ARScene. You need to call attachStreamer to attach a FrameStreamer to tracker first, then the images from the FrameStreamer are used for by the tracker. You can call start/stop to enable/disable the track process. start and stop are very lightweight calls.

You do not have to load target before track, Frame returned from FrameStreamer.peek will include target of ARScene type automatically.

You can get a Frame by FrameStreamer.peek which contains current camera image and tracked TargetInstance.


C: void easyar_ARSceneTracker__ctor(easyar_ARSceneTracker * * Return)
C++11: ARSceneTracker()
Traditional C++: ARSceneTracker()
Java: public ARSceneTracker()
Objective-C: + (easyar_ARSceneTracker *) create
Swift (since EasyAR SDK 2.1.0): public convenience init()


Attach FrameStreamer to the tracker. Tracker will not start to track until a FrameStreamer is attached.

Attach null object will detach previous attached FrameStreamer from tracker.

C: bool easyar_ARSceneTracker_attachStreamer(easyar_ARSceneTracker * This, easyar_FrameStreamer * obj)
C++11: bool attachStreamer(std::shared_ptr<FrameStreamer> obj)
Traditional C++: bool attachStreamer(FrameStreamer * obj)
Java: public native boolean attachStreamer(FrameStreamer obj)
Objective-C: - (bool)attachStreamer:(easyar_FrameStreamer *)obj
Swift (since EasyAR SDK 2.1.0): public override func attachStreamer(_ obj: FrameStreamer?) -> Bool


Starts the track algorithm. The track will not actually start until a FrameStreamer is attached.

C: bool easyar_ARSceneTracker_start(easyar_ARSceneTracker * This)
C++11: bool start()
Traditional C++: bool start()
Java: public native boolean start()
Objective-C: - (bool)start
Swift (since EasyAR SDK 2.1.0): public override func start() -> Bool


Stops the track algorithm. Call start to start the track again.

C: bool easyar_ARSceneTracker_stop(easyar_ARSceneTracker * This)
C++11: bool stop()
Traditional C++: bool stop()
Java: public native boolean stop()
Objective-C: - (bool)stop
Swift (since EasyAR SDK 2.1.0): public override func stop() -> Bool