Skip to content
Select language:English

ARDK 1.5.6

abstract class CameraSession : Module

Base class for all the sessions.

Inheritors

Constructors

constructor()

Properties

Desired minimum height, in pixels, of camera frames.

Desired minimum width, in pixels, of camera frames.

open override val port: Module.Port

Communication port inherited from the Module interface.

val rawPoses: SharedFlow<Sample<Trans3f>>

A stream of raw poses.

The current tracking state.

A stream of tracking updates.

Functions

fun attachMarker(markerInfo: MarkerInfo)

Attaches a marker to the session.

fun discardMarker(markerId: Int)

Discard the current detected marker.

abstract fun dispose()

Disposes the session.

Gets the ID of the camera texture.

fun link(module: Module)

Links a module to the session.

abstract fun prepare(context: Any? = null)

Prepares the session for tracking.

fun requestCameraFrame(callback: (reader: CameraFrameReader) -> Unit)

Requests a single camera frame and its associated spatial metadata.

fun requestCameraFrameMono(callback: (reader: CameraFrameReader) -> Unit)

This function is similar to requestCameraFrame, but it requests a monochromatic camera frame.

fun requestMarkers(callback: (state: DetectionState, markerId: Int, marker: Marker?) -> Unit)

Sets a callback to receive marker detection events.

fun setMarkerMountingThresholds(vertical: Float, horizontal: Float)

Sets the thresholds used to detect how a marker is mounted.

fun setMarkerRefining(count: Int, movement: Float)

Sets the refinement parameters for marker detection.

fun unlink(module: Module)

Unlinks a module from the session.

fun unlinkAll()

Unlinks all the previously linked modules.