Table of Contents

Class SurfaceTracker

Namespace
easyar

SurfaceTracker implements tracking of environmental surfaces. SurfaceTracker occupies one camera buffer. The camera's setBufferCapacity should be set to no less than the total number of camera buffers occupied by all components. After creation, you can call start/stop to begin and halt operation; start/stop are very lightweight calls. When the component is no longer needed, you can call close to shut it down. It should not be used after close. SurfaceTracker inputs InputFrame through inputFrameSink; InputFrameSource should be connected to inputFrameSink for use.

SurfaceTracker

Methods

isAvailable

Returns true only on Android and iOS systems and when the accelerometer and gyroscope are available.

bool easyar_SurfaceTracker_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
+ (bool)isAvailable
public static func isAvailable() -> Bool
public static bool isAvailable()

Returns

Boolean

inputFrameSink

InputFrame input port. InputFrame must have an image, timestamp, and camera parameters. Note: The camera does not support the fisheye camera model.

void easyar_SurfaceTracker_inputFrameSink(easyar_SurfaceTracker * This, easyar_InputFrameSink * * Return)
std::shared_ptr<InputFrameSink> inputFrameSink()
public @Nonnull InputFrameSink inputFrameSink()
fun inputFrameSink(): InputFrameSink
- (easyar_InputFrameSink *)inputFrameSink
public func inputFrameSink() -> InputFrameSink
public virtual InputFrameSink inputFrameSink()

Returns

InputFrameSink

bufferRequirement

The number of camera buffers occupied by the current component.

int easyar_SurfaceTracker_bufferRequirement(easyar_SurfaceTracker * This)
int bufferRequirement()
public int bufferRequirement()
fun bufferRequirement(): Int
- (int)bufferRequirement
public func bufferRequirement() -> Int32
public virtual int bufferRequirement()

Returns

Int32

outputFrameSource

OutputFrame output port.

void easyar_SurfaceTracker_outputFrameSource(easyar_SurfaceTracker * This, easyar_OutputFrameSource * * Return)
std::shared_ptr<OutputFrameSource> outputFrameSource()
public @Nonnull OutputFrameSource outputFrameSource()
fun outputFrameSource(): OutputFrameSource
- (easyar_OutputFrameSource *)outputFrameSource
public func outputFrameSource() -> OutputFrameSource
public virtual OutputFrameSource outputFrameSource()

Returns

OutputFrameSource

create

Create.

void easyar_SurfaceTracker_create(easyar_SurfaceTracker * * Return)
static std::shared_ptr<SurfaceTracker> create()
public static @Nonnull SurfaceTracker create()
companion object fun create(): SurfaceTracker
+ (easyar_SurfaceTracker *)create
public static func create() -> SurfaceTracker
public static SurfaceTracker create()

Returns

SurfaceTracker

start

Start the tracking algorithm.

bool easyar_SurfaceTracker_start(easyar_SurfaceTracker * This)
bool start()
public boolean start()
fun start(): Boolean
- (bool)start
public func start() -> Bool
public virtual bool start()

Returns

Boolean

stop

Pause the tracking algorithm. Call start to restart tracking.

void easyar_SurfaceTracker_stop(easyar_SurfaceTracker * This)
void stop()
public void stop()
fun stop(): Unit
- (void)stop
public func stop() -> Void
public virtual void stop()

Returns

Void

close

Close. It should not be used after close.

void easyar_SurfaceTracker_close(easyar_SurfaceTracker * This)
void close()
public void close()
fun close(): Unit
- (void)close
public func close() -> Void
public virtual void close()

Returns

Void

alignTargetToCameraImagePoint

Align the tracking target point to a specified point in the camera image. The image coordinate system ([0, 1]^2) has x to the right, y down, with the origin at the top-left corner. You can use imageCoordinatesFromScreenCoordinates to convert from screen coordinates to image coordinates.

void easyar_SurfaceTracker_alignTargetToCameraImagePoint(easyar_SurfaceTracker * This, easyar_Vec2F cameraImagePoint)
void alignTargetToCameraImagePoint(Vec2F cameraImagePoint)
public void alignTargetToCameraImagePoint(@Nonnull Vec2F cameraImagePoint)
fun alignTargetToCameraImagePoint(cameraImagePoint: Vec2F): Unit
- (void)alignTargetToCameraImagePoint:(easyar_Vec2F *)cameraImagePoint
public func alignTargetToCameraImagePoint(_ cameraImagePoint: Vec2F) -> Void
public virtual void alignTargetToCameraImagePoint(Vec2F cameraImagePoint)

Parameters

cameraImagePoint Vec2F

Returns

Void