Table of Contents

Class MotionTrackerCameraDevice

名前空間
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

コンストラクター

MotionTrackerCameraDevice

作成します a MotionTrackerCameraDevice object.

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

メソッド

isAvailable

確認します whether the device supports Motion Tracking. 返します 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()

戻り値

説明
Boolean

getQualityLevel

取得します 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()

戻り値

説明
MotionTrackerCameraDeviceQualityLevel

setFrameRateType

設定します 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)

パラメーター

名前 説明
fps MotionTrackerCameraDeviceFPS

戻り値

説明
Boolean

setFocusMode

設定します 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)

パラメーター

名前 説明
focusMode MotionTrackerCameraDeviceFocusMode

戻り値

説明
Boolean

setFrameResolutionType

設定します 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)

パラメーター

名前 説明
resolution MotionTrackerCameraDeviceResolution

戻り値

説明
Boolean

setTrackingMode

設定します 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)

パラメーター

名前 説明
trackingMode MotionTrackerCameraDeviceTrackingMode

戻り値

説明
Boolean

setBufferCapacity

設定します 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)

パラメーター

名前 説明
capacity Int32

戻り値

説明
Void

bufferCapacity

取得します 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()

戻り値

説明
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()

戻り値

説明
InputFrameSource

start

開始します 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()

戻り値

説明
Boolean

stop

一時停止します 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()

戻り値

説明
Void

close

閉じます 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()

戻り値

説明
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()

戻り値

説明
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()

戻り値

説明
Int32

size

取得します 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()

戻り値

説明
Vec2I

frameRateRangeLower

取得します 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()

戻り値

説明
Double

frameRateRangeUpper

取得します 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()

戻り値

説明
Double

hitTestAgainstPointCloud

実行します 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)

パラメーター

名前 説明
cameraImagePoint Vec2F

戻り値

説明
List<Vec3F>

hitTestAgainstHorizontalPlane

実行します 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)

パラメーター

名前 説明
cameraImagePoint Vec2F

戻り値

説明
List<Vec3F>

getLocalPointsCloud

取得します 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()

戻り値

説明
List<Vec3F>