EasyAR Data and Memory

EasyAR Data Flow

EasyAR components are basically independent with each other. Some connection between components must be built to make the EasyAR work. To build up the EasyAR scene, a CameraDevice should be attached to ImageTracker, and Augmenter should periodically get a new Frame from the ImageTracker. The attach and newFrame operation make the AR chain begin to run. And data moves along the chain.

Images from CameraDevice will go to the ImageTracker each frame and push the tracker to move. It will follow the Frame to the Augmenter.

Targets are constructed from images and json files. They can be loaded into ImageTracker. When it is detected or tracked by the tracker, it will go into the Augmenter inside the Frame. And finally move to the AugmentedTarget.

EasyAR Memory Model

EasyAR C++ objects behaves like a normal C++ std::shared_ptr, it is a very thin wrapper on top of the real objects. You can use any class C derived from RefBase as if you are using std::shared_ptr<_c\_internal_\>. Memory held by C is reference counted and managed like std::shared_ptr, and C is as thread-safe as std::shared_ptr. An object in EasyAR is generally lazy initialized, which means the object is not valid (operator bool() returns false) before certain methods are called.

Images captured from camera will stay in memory until the release of Frame if it is caught by a newFrame.

ImageTracker keeps reference of targets loaded into it. The reference can be removed by an unload from the tracker, or the destroy of the tracker. Frame and AugmentedTarget also keep reference of targets that are tracked. Targets loaded will not be released before all references are removed.

results matching ""

    No results matching ""