Class MotionTrackerCameraDevice
- Namespace
- easyar
MotionTrackerCameraDevice implements a real-scale 6DOF motion tracking camera device that outputs InputFrame (containing image, camera parameters, timestamp, 6DOF position information, and tracking status). After creation, you can call start/stop to begin and stop the data stream. When the device is no longer needed, you can call close to shut it down. After close, it should not be used further. MotionTrackerCameraDevice outputs InputFrame through inputFrameSource, and inputFrameSource should be connected to InputFrameSink for use.
Constructors
MotionTrackerCameraDevice
Create a MotionTrackerCameraDevice object.
void easyar_MotionTrackerCameraDevice__ctor(easyar_MotionTrackerCameraDevice * * Return)
MotionTrackerCameraDevice()
public MotionTrackerCameraDevice()
constructor()
+ (easyar_MotionTrackerCameraDevice *) create
public convenience init()
public MotionTrackerCameraDevice()
Methods
isAvailable
Check if the device supports Motion Tracking. Returns True when the device supports motion tracking functionality, 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()
Returns
- Boolean
getQualityLevel
Get the quality of Motion Tracking on the device. Combined with the application scenario, this value can be used to determine 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()
Returns
setFrameRateType
Set the current frame rate of the 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)
Parameters
Returns
- Boolean
setFocusMode
Set 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)
Parameters
focusModeMotionTrackerCameraDeviceFocusMode
Returns
- Boolean
setFrameResolutionType
Set 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)
Parameters
resolutionMotionTrackerCameraDeviceResolution
Returns
- Boolean
setTrackingMode
Set 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)
Parameters
trackingModeMotionTrackerCameraDeviceTrackingMode
Returns
- Boolean
setBufferCapacity
Set the buffer capacity of InputFrame. bufferCapacity represents the buffer capacity of InputFrame. If more than this number of InputFrame are output from the device and not released, the device will stop outputting new InputFrame until the previous ones are released. This may cause issues like screen freezing.
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)
Parameters
capacityInt32
Returns
- Void
bufferCapacity
Get the buffer capacity of InputFrame. 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()
Returns
- 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()
Returns
start
Start motion tracking, or trigger relocation from pause, and continue tracking after success. Note: If the device is paused by calling stop and then start tracking is called, it will trigger relocation, and tracking will continue only after successful relocation.
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()
Returns
- Boolean
stop
Pause motion tracking. Calling start triggers relocation, and motion tracking continues after successful relocation.
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()
Returns
- Void
close
Close the motion tracking process. After close, it should not be used further.
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()
Returns
- Void
type
camera type. Called after a 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()
Returns
cameraOrientation
The angle by which the camera image needs to be rotated clockwise to display in the device's natural orientation. Called after a 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()
Returns
- Int32
size
Get the current image size. Called after a 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()
Returns
frameRateRangeLower
Get the lower bound of the current frame rate range. Called after a 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()
Returns
- Double
frameRateRangeUpper
Get the upper bound of the current frame rate range. Called after a 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()
Returns
- Double
hitTestAgainstPointCloud
Perform a Hit Test in the current point cloud to get the position coordinates of the nearest 3D point along a ray from near to far from the camera. This point is represented by three consecutive values, corresponding to the X, Y, Z axes. The input 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_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)
Parameters
cameraImagePointVec2F
Returns
- List<Vec3F>
hitTestAgainstHorizontalPlane
Perform a Hit Test on horizontal planes detected in real-time within the current field of view. After clicking on a horizontal plane, return the position coordinates of the 3D point on that plane closest to the Hit Test ray. The input 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. 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 X, Y, 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)
Parameters
cameraImagePointVec2F
Returns
- List<Vec3F>
getLocalPointsCloud
Get the position information of the current point cloud data. The point cloud positions are in the world coordinate system, and each point is represented by three consecutive values, corresponding to the X, Y, 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()
Returns
- List<Vec3F>