InputFrame Class¶
Description¶
输入帧。
包含图像、camera参数、时间戳、相机相对于世界坐标系的变换和跟踪状态。
其中,camera参数、时间戳、相机相对于世界坐标系的变换和跟踪状态均为可选,但特定的算法组件会对输入有特定的要求。
index¶
索引,一个自增量,每个输入帧不同。
- C
int easyar_InputFrame_index(const easyar_InputFrame * This)
- C++
int index()
- Java
public int index()
- Kotlin
fun index(): Int
- Objective-C
- (int)index
- Swift
public func index() -> Int32
- C#
public virtual int index()
image¶
获取图像。
hasCameraParameters¶
是否包含camera参数。
- C
bool easyar_InputFrame_hasCameraParameters(const easyar_InputFrame * This)
- C++
bool hasCameraParameters()
- Java
public boolean hasCameraParameters()
- Kotlin
fun hasCameraParameters(): Boolean
- Objective-C
- (bool)hasCameraParameters
- Swift
public func hasCameraParameters() -> Bool
- C#
public virtual bool hasCameraParameters()
cameraParameters¶
获取camera参数。
- C
void easyar_InputFrame_cameraParameters(const easyar_InputFrame * This, easyar_CameraParameters * * Return)
- C++
std::shared_ptr<CameraParameters> cameraParameters()
- Java
public @Nonnull CameraParameters cameraParameters()
- Kotlin
fun cameraParameters(): CameraParameters
- Objective-C
- (easyar_CameraParameters *)cameraParameters
- Swift
public func cameraParameters() -> CameraParameters
- C#
public virtual CameraParameters cameraParameters()
hasTemporalInformation¶
是否包含时间信息(时间戳)。
- C
bool easyar_InputFrame_hasTemporalInformation(const easyar_InputFrame * This)
- C++
bool hasTemporalInformation()
- Java
public boolean hasTemporalInformation()
- Kotlin
fun hasTemporalInformation(): Boolean
- Objective-C
- (bool)hasTemporalInformation
- Swift
public func hasTemporalInformation() -> Bool
- C#
public virtual bool hasTemporalInformation()
timestamp¶
时间戳。单位为秒。
- C
double easyar_InputFrame_timestamp(const easyar_InputFrame * This)
- C++
double timestamp()
- Java
public double timestamp()
- Kotlin
fun timestamp(): Double
- Objective-C
- (double)timestamp
- Swift
public func timestamp() -> Double
- C#
public virtual double timestamp()
hasSpatialInformation¶
是否包含空间信息(cameraTransform和trackingStatus)。
- C
bool easyar_InputFrame_hasSpatialInformation(const easyar_InputFrame * This)
- C++
bool hasSpatialInformation()
- Java
public boolean hasSpatialInformation()
- Kotlin
fun hasSpatialInformation(): Boolean
- Objective-C
- (bool)hasSpatialInformation
- Swift
public func hasSpatialInformation() -> Bool
- C#
public virtual bool hasSpatialInformation()
cameraTransform¶
相机相对于世界坐标系的变换。其中camera坐标系与世界坐标系均为右手坐标系。Camera坐标系的原点为相机光心,x轴正方向为右,y轴正方向为上,z轴正方向为光线进入相机的方向。(其中的右和上,指的是相机图像中的右和上,可能和设备自然方向的可能不同。)数据的排列方式为row-major,与OpenGL的column-major相反。
- C
easyar_Matrix44F easyar_InputFrame_cameraTransform(const easyar_InputFrame * This)
- C++
Matrix44F cameraTransform()
- Java
public @Nonnull Matrix44F cameraTransform()
- Kotlin
fun cameraTransform(): Matrix44F
- Objective-C
- (easyar_Matrix44F *)cameraTransform
- Swift
public func cameraTransform() -> Matrix44F
- C#
public virtual Matrix44F cameraTransform()
cameraTransformType¶
相机变换类型。
- C
easyar_CameraTransformType easyar_InputFrame_cameraTransformType(const easyar_InputFrame * This)
- C++
CameraTransformType cameraTransformType()
- Java
public int cameraTransformType()
- Kotlin
fun cameraTransformType(): Int
- Objective-C
- (easyar_CameraTransformType)cameraTransformType
- Swift
public func cameraTransformType() -> CameraTransformType
- C#
public virtual CameraTransformType cameraTransformType()
trackingStatus¶
获取设备运动跟踪状态: MotionTrackingStatus 。
- C
easyar_MotionTrackingStatus easyar_InputFrame_trackingStatus(const easyar_InputFrame * This)
- C++
MotionTrackingStatus trackingStatus()
- Java
public int trackingStatus()
- Kotlin
fun trackingStatus(): Int
- Objective-C
- (easyar_MotionTrackingStatus)trackingStatus
- Swift
public func trackingStatus() -> MotionTrackingStatus
- C#
public virtual MotionTrackingStatus trackingStatus()
tryCreate¶
创建。
- C
void easyar_InputFrame_tryCreate(easyar_Image * image, easyar_CameraParameters * cameraParameters, double timestamp, easyar_Matrix44F cameraTransform, easyar_CameraTransformType cameraTransformType, easyar_MotionTrackingStatus trackingStatus, easyar_OptionalOfInputFrame * Return)
- C++
static std::optional<std::shared_ptr<InputFrame>> tryCreate(std::shared_ptr<Image> image, std::shared_ptr<CameraParameters> cameraParameters, double timestamp, Matrix44F cameraTransform, CameraTransformType cameraTransformType, MotionTrackingStatus trackingStatus)
- Java
public static @Nullable InputFrame tryCreate(@Nonnull Image image, @Nonnull CameraParameters cameraParameters, double timestamp, @Nonnull Matrix44F cameraTransform, int cameraTransformType, int trackingStatus)
- Kotlin
companion object fun tryCreate(image: Image, cameraParameters: CameraParameters, timestamp: Double, cameraTransform: Matrix44F, cameraTransformType: Int, trackingStatus: Int): InputFrame?
- Objective-C
+ (easyar_InputFrame *)tryCreate:(easyar_Image *)image cameraParameters:(easyar_CameraParameters *)cameraParameters timestamp:(double)timestamp cameraTransform:(easyar_Matrix44F *)cameraTransform cameraTransformType:(easyar_CameraTransformType)cameraTransformType trackingStatus:(easyar_MotionTrackingStatus)trackingStatus
- Swift
public static func tryCreate(_ image: Image, _ cameraParameters: CameraParameters, _ timestamp: Double, _ cameraTransform: Matrix44F, _ cameraTransformType: CameraTransformType, _ trackingStatus: MotionTrackingStatus) -> InputFrame?
- C#
public static Optional<InputFrame> tryCreate(Image image, CameraParameters cameraParameters, double timestamp, Matrix44F cameraTransform, CameraTransformType cameraTransformType, MotionTrackingStatus trackingStatus)
createWithImageAndCameraParametersAndTemporal¶
创建,只包含图像、camera参数和时间戳。
- C
void easyar_InputFrame_createWithImageAndCameraParametersAndTemporal(easyar_Image * image, easyar_CameraParameters * cameraParameters, double timestamp, easyar_InputFrame * * Return)
- C++
static std::shared_ptr<InputFrame> createWithImageAndCameraParametersAndTemporal(std::shared_ptr<Image> image, std::shared_ptr<CameraParameters> cameraParameters, double timestamp)
- Java
public static @Nonnull InputFrame createWithImageAndCameraParametersAndTemporal(@Nonnull Image image, @Nonnull CameraParameters cameraParameters, double timestamp)
- Kotlin
companion object fun createWithImageAndCameraParametersAndTemporal(image: Image, cameraParameters: CameraParameters, timestamp: Double): InputFrame
- Objective-C
+ (easyar_InputFrame *)createWithImageAndCameraParametersAndTemporal:(easyar_Image *)image cameraParameters:(easyar_CameraParameters *)cameraParameters timestamp:(double)timestamp
- Swift
public static func createWithImageAndCameraParametersAndTemporal(_ image: Image, _ cameraParameters: CameraParameters, _ timestamp: Double) -> InputFrame
- C#
public static InputFrame createWithImageAndCameraParametersAndTemporal(Image image, CameraParameters cameraParameters, double timestamp)
createWithImageAndCameraParameters¶
创建,只包含图像和camera参数。
- C
void easyar_InputFrame_createWithImageAndCameraParameters(easyar_Image * image, easyar_CameraParameters * cameraParameters, easyar_InputFrame * * Return)
- C++
static std::shared_ptr<InputFrame> createWithImageAndCameraParameters(std::shared_ptr<Image> image, std::shared_ptr<CameraParameters> cameraParameters)
- Java
public static @Nonnull InputFrame createWithImageAndCameraParameters(@Nonnull Image image, @Nonnull CameraParameters cameraParameters)
- Kotlin
companion object fun createWithImageAndCameraParameters(image: Image, cameraParameters: CameraParameters): InputFrame
- Objective-C
+ (easyar_InputFrame *)createWithImageAndCameraParameters:(easyar_Image *)image cameraParameters:(easyar_CameraParameters *)cameraParameters
- Swift
public static func createWithImageAndCameraParameters(_ image: Image, _ cameraParameters: CameraParameters) -> InputFrame
- C#
public static InputFrame createWithImageAndCameraParameters(Image image, CameraParameters cameraParameters)
createWithImage¶
创建,只包含图像。
- C
void easyar_InputFrame_createWithImage(easyar_Image * image, easyar_InputFrame * * Return)
- C++
static std::shared_ptr<InputFrame> createWithImage(std::shared_ptr<Image> image)
- Java
public static @Nonnull InputFrame createWithImage(@Nonnull Image image)
- Kotlin
companion object fun createWithImage(image: Image): InputFrame
- Objective-C
+ (easyar_InputFrame *)createWithImage:(easyar_Image *)image
- Swift
public static func createWithImage(_ image: Image) -> InputFrame
- C#
public static InputFrame createWithImage(Image image)