Table of Contents

Class MotionTrackerCameraDevice

Espace de noms
easyar

MotionTrackerCameraDevice implements a camera device for real-scale 6DOF motion tracking, outputting InputFrame (including image, camera parameters, timestamp, 6DOF position information, and tracking status). After creation, start/stop can be called to start and stop the data stream. When the device is no longer needed, close can be called to close it. It should not be used after close. MotionTrackerCameraDevice outputs InputFrame through inputFrameSource. inputFrameSource should be connected to InputFrameSink for use.

MotionTrackerCameraDevice

Constructeurs

MotionTrackerCameraDevice

Cree a MotionTrackerCameraDevice object.

void easyar_MotionTrackerCameraDevice__ctor(easyar_MotionTrackerCameraDevice * * Return)
MotionTrackerCameraDevice()
public MotionTrackerCameraDevice()
constructor()
+ (easyar_MotionTrackerCameraDevice *) create
public convenience init()
public MotionTrackerCameraDevice()

Méthodes

isAvailable

Verifie whether the device supports Motion Tracking. Retourne True when the device supports motion tracking, otherwise returns False.

bool easyar_MotionTrackerCameraDevice_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()

Retours

Type Description
Boolean

getQualityLevel

Obtient the Motion Tracking quality on the device. Combined with the application scenario, this value can be used to decide whether to start Motion Tracking.

easyar_MotionTrackerCameraDeviceQualityLevel easyar_MotionTrackerCameraDevice_getQualityLevel(void)
static MotionTrackerCameraDeviceQualityLevel getQualityLevel()
public static int getQualityLevel()
companion object fun getQualityLevel(): Int
+ (easyar_MotionTrackerCameraDeviceQualityLevel)getQualityLevel
public static func getQualityLevel() -> MotionTrackerCameraDeviceQualityLevel
public static MotionTrackerCameraDeviceQualityLevel getQualityLevel()

Retours

Type Description
MotionTrackerCameraDeviceQualityLevel

setFrameRateType

Definit the current frame rate of the current device. Call before start. If this function is not called, the default is 30fps.

bool easyar_MotionTrackerCameraDevice_setFrameRateType(easyar_MotionTrackerCameraDevice * This, easyar_MotionTrackerCameraDeviceFPS fps)
bool setFrameRateType(MotionTrackerCameraDeviceFPS fps)
public boolean setFrameRateType(int fps)
fun setFrameRateType(fps: Int): Boolean
- (bool)setFrameRateType:(easyar_MotionTrackerCameraDeviceFPS)fps
public func setFrameRateType(_ fps: MotionTrackerCameraDeviceFPS) -> Bool
public virtual bool setFrameRateType(MotionTrackerCameraDeviceFPS fps)

Paramètres

Nom Type Description
fps MotionTrackerCameraDeviceFPS

Retours

Type Description
Boolean

setFocusMode

Definit the focus mode to focusMode. Call before start. If this function is not called, the default is continuous auto focus.

bool easyar_MotionTrackerCameraDevice_setFocusMode(easyar_MotionTrackerCameraDevice * This, easyar_MotionTrackerCameraDeviceFocusMode focusMode)
bool setFocusMode(MotionTrackerCameraDeviceFocusMode focusMode)
public boolean setFocusMode(int focusMode)
fun setFocusMode(focusMode: Int): Boolean
- (bool)setFocusMode:(easyar_MotionTrackerCameraDeviceFocusMode)focusMode
public func setFocusMode(_ focusMode: MotionTrackerCameraDeviceFocusMode) -> Bool
public virtual bool setFocusMode(MotionTrackerCameraDeviceFocusMode focusMode)

Paramètres

Nom Type Description
focusMode MotionTrackerCameraDeviceFocusMode

Retours

Type Description
Boolean

setFrameResolutionType

Definit the frame resolution. Call before start. If this function is not called, the default is 1280x960 or 1280x720.

bool easyar_MotionTrackerCameraDevice_setFrameResolutionType(easyar_MotionTrackerCameraDevice * This, easyar_MotionTrackerCameraDeviceResolution resolution)
bool setFrameResolutionType(MotionTrackerCameraDeviceResolution resolution)
public boolean setFrameResolutionType(int resolution)
fun setFrameResolutionType(resolution: Int): Boolean
- (bool)setFrameResolutionType:(easyar_MotionTrackerCameraDeviceResolution)resolution
public func setFrameResolutionType(_ resolution: MotionTrackerCameraDeviceResolution) -> Bool
public virtual bool setFrameResolutionType(MotionTrackerCameraDeviceResolution resolution)

Paramètres

Nom Type Description
resolution MotionTrackerCameraDeviceResolution

Retours

Type Description
Boolean

setTrackingMode

Definit the tracking mode. Call before start. If this function is not called, the default is anchor mode.

bool easyar_MotionTrackerCameraDevice_setTrackingMode(easyar_MotionTrackerCameraDevice * This, easyar_MotionTrackerCameraDeviceTrackingMode trackingMode)
bool setTrackingMode(MotionTrackerCameraDeviceTrackingMode trackingMode)
public boolean setTrackingMode(int trackingMode)
fun setTrackingMode(trackingMode: Int): Boolean
- (bool)setTrackingMode:(easyar_MotionTrackerCameraDeviceTrackingMode)trackingMode
public func setTrackingMode(_ trackingMode: MotionTrackerCameraDeviceTrackingMode) -> Bool
public virtual bool setTrackingMode(MotionTrackerCameraDeviceTrackingMode trackingMode)

Paramètres

Nom Type Description
trackingMode MotionTrackerCameraDeviceTrackingMode

Retours

Type Description
Boolean

setBufferCapacity

Definit the capacity of the InputFrame buffer. bufferCapacity indicates the capacity of the InputFrame buffer. If more than this number of InputFrame objects are output from the device and not released, the device will stop outputting new InputFrame objects until previous InputFrame objects are released. This may cause problems such as a frozen image.

void easyar_MotionTrackerCameraDevice_setBufferCapacity(easyar_MotionTrackerCameraDevice * This, int capacity)
void setBufferCapacity(int capacity)
public void setBufferCapacity(int capacity)
fun setBufferCapacity(capacity: Int): Unit
- (void)setBufferCapacity:(int)capacity
public func setBufferCapacity(_ capacity: Int32) -> Void
public virtual void setBufferCapacity(int capacity)

Paramètres

Nom Type Description
capacity Int32

Retours

Type Description
Void

bufferCapacity

Obtient the capacity of the InputFrame buffer. The default value is 8.

int easyar_MotionTrackerCameraDevice_bufferCapacity(const easyar_MotionTrackerCameraDevice * This)
int bufferCapacity()
public int bufferCapacity()
fun bufferCapacity(): Int
- (int)bufferCapacity
public func bufferCapacity() -> Int32
public virtual int bufferCapacity()

Retours

Type Description
Int32

inputFrameSource

InputFrame output port.

void easyar_MotionTrackerCameraDevice_inputFrameSource(easyar_MotionTrackerCameraDevice * This, easyar_InputFrameSource * * Return)
std::shared_ptr<InputFrameSource> inputFrameSource()
public @Nonnull InputFrameSource inputFrameSource()
fun inputFrameSource(): InputFrameSource
- (easyar_InputFrameSource *)inputFrameSource
public func inputFrameSource() -> InputFrameSource
public virtual InputFrameSource inputFrameSource()

Retours

Type Description
InputFrameSource

start

Demarre motion tracking, or triggers relocalization from pause and continues tracking after success. Note: If the device was paused by calling stop and then start is called to track again, relocalization will be triggered, and tracking will continue only after relocalization succeeds.

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

Retours

Type Description
Boolean

stop

Met en pause motion tracking. Call start to trigger relocalization, and continue motion tracking after relocalization succeeds.

void easyar_MotionTrackerCameraDevice_stop(easyar_MotionTrackerCameraDevice * This)
void stop()
public void stop()
fun stop(): Unit
- (void)stop
public func stop() -> Void
public virtual void stop()

Retours

Type Description
Void

close

Ferme the motion tracking process. It should not be used after close.

void easyar_MotionTrackerCameraDevice_close(easyar_MotionTrackerCameraDevice * This)
void close()
public void close()
fun close(): Unit
- (void)close
public func close() -> Void
public virtual void close()

Retours

Type Description
Void

type

camera type. Call after successful start.

easyar_CameraDeviceType easyar_MotionTrackerCameraDevice_type(const easyar_MotionTrackerCameraDevice * This)
CameraDeviceType type()
public int type()
fun type(): Int
- (easyar_CameraDeviceType)type
public func type() -> CameraDeviceType
public virtual CameraDeviceType type()

Retours

Type Description
CameraDeviceType

cameraOrientation

The clockwise rotation angle required when displaying the camera image in the device natural orientation. Call after successful start.

int easyar_MotionTrackerCameraDevice_cameraOrientation(const easyar_MotionTrackerCameraDevice * This)
int cameraOrientation()
public int cameraOrientation()
fun cameraOrientation(): Int
- (int)cameraOrientation
public func cameraOrientation() -> Int32
public virtual int cameraOrientation()

Retours

Type Description
Int32

size

Obtient the current image size. Call after successful start.

easyar_Vec2I easyar_MotionTrackerCameraDevice_size(const easyar_MotionTrackerCameraDevice * This)
Vec2I size()
public @Nonnull Vec2I size()
fun size(): Vec2I
- (easyar_Vec2I *)size
public func size() -> Vec2I
public virtual Vec2I size()

Retours

Type Description
Vec2I

frameRateRangeLower

Obtient the lower bound of the current frame rate range. Call after successful open.

double easyar_MotionTrackerCameraDevice_frameRateRangeLower(const easyar_MotionTrackerCameraDevice * This)
double frameRateRangeLower()
public double frameRateRangeLower()
fun frameRateRangeLower(): Double
- (double)frameRateRangeLower
public func frameRateRangeLower() -> Double
public virtual double frameRateRangeLower()

Retours

Type Description
Double

frameRateRangeUpper

Obtient the upper bound of the current frame rate range. Call after successful open.

double easyar_MotionTrackerCameraDevice_frameRateRangeUpper(const easyar_MotionTrackerCameraDevice * This)
double frameRateRangeUpper()
public double frameRateRangeUpper()
fun frameRateRangeUpper(): Double
- (double)frameRateRangeUpper
public func frameRateRangeUpper() -> Double
public virtual double frameRateRangeUpper()

Retours

Type Description
Double

hitTestAgainstPointCloud

Effectue Hit Test in the current point cloud and obtains the nearest 3D point position coordinate on a ray from near to far relative to the camera. The point is represented by three consecutive values, corresponding to the coordinate values on the X, Y, and Z axes. In the input image coordinate system ([0, 1]^2), x points right, y points down, and the origin is at the upper-left corner. You can use imageCoordinatesFromScreenCoordinates to convert from screen coordinates to image coordinates.

void easyar_MotionTrackerCameraDevice_hitTestAgainstPointCloud(easyar_MotionTrackerCameraDevice * This, easyar_Vec2F cameraImagePoint, easyar_ListOfVec3F * * Return)
std::vector<Vec3F> hitTestAgainstPointCloud(Vec2F cameraImagePoint)
public java.util.@Nonnull ArrayList<@Nonnull Vec3F> hitTestAgainstPointCloud(@Nonnull Vec2F cameraImagePoint)
fun hitTestAgainstPointCloud(cameraImagePoint: Vec2F): ArrayList<Vec3F>
- (NSArray<easyar_Vec3F *> *)hitTestAgainstPointCloud:(easyar_Vec2F *)cameraImagePoint
public func hitTestAgainstPointCloud(_ cameraImagePoint: Vec2F) -> [Vec3F]
public virtual List<Vec3F> hitTestAgainstPointCloud(Vec2F cameraImagePoint)

Paramètres

Nom Type Description
cameraImagePoint Vec2F

Retours

Type Description
List<Vec3F>

hitTestAgainstHorizontalPlane

Effectue Hit Test on horizontal planes detected in real time within the current field of view. After hitting a horizontal plane, returns the position coordinate of the 3D point on that plane nearest to the Hit Test ray. In the input image coordinate system ([0, 1]^2), x points right, y points down, and the origin is at the upper-left corner. You can use imageCoordinatesFromScreenCoordinates to convert from screen coordinates to image coordinates. The output is the coordinates of the point cloud on the plane in the world coordinate system. Each point is represented by three consecutive values, corresponding to the coordinate values on the X, Y, and Z axes.

void easyar_MotionTrackerCameraDevice_hitTestAgainstHorizontalPlane(easyar_MotionTrackerCameraDevice * This, easyar_Vec2F cameraImagePoint, easyar_ListOfVec3F * * Return)
std::vector<Vec3F> hitTestAgainstHorizontalPlane(Vec2F cameraImagePoint)
public java.util.@Nonnull ArrayList<@Nonnull Vec3F> hitTestAgainstHorizontalPlane(@Nonnull Vec2F cameraImagePoint)
fun hitTestAgainstHorizontalPlane(cameraImagePoint: Vec2F): ArrayList<Vec3F>
- (NSArray<easyar_Vec3F *> *)hitTestAgainstHorizontalPlane:(easyar_Vec2F *)cameraImagePoint
public func hitTestAgainstHorizontalPlane(_ cameraImagePoint: Vec2F) -> [Vec3F]
public virtual List<Vec3F> hitTestAgainstHorizontalPlane(Vec2F cameraImagePoint)

Paramètres

Nom Type Description
cameraImagePoint Vec2F

Retours

Type Description
List<Vec3F>

getLocalPointsCloud

Obtient current point cloud position information. Point cloud positions are positions in the world coordinate system. Each point is represented by three consecutive values, corresponding to the coordinate values on the X, Y, and Z axes.

void easyar_MotionTrackerCameraDevice_getLocalPointsCloud(easyar_MotionTrackerCameraDevice * This, easyar_ListOfVec3F * * Return)
std::vector<Vec3F> getLocalPointsCloud()
public java.util.@Nonnull ArrayList<@Nonnull Vec3F> getLocalPointsCloud()
fun getLocalPointsCloud(): ArrayList<Vec3F>
- (NSArray<easyar_Vec3F *> *)getLocalPointsCloud
public func getLocalPointsCloud() -> [Vec3F]
public virtual List<Vec3F> getLocalPointsCloud()

Retours

Type Description
List<Vec3F>