Class InputFrame
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
Input frame. Contains image, camera parameters, timestamp, camera transform relative to world coordinate system, and tracking status. Among these, camera parameters, timestamp, camera transform relative to world coordinate system, and tracking status are optional, but specific algorithm components may have specific requirements for the input.
public class InputFrame : RefBase, IDisposable
- Inheritance
-
InputFrame
- Implements
- Inherited Members
Methods
Clone()
public InputFrame Clone()
CloneObject()
protected override object CloneObject()
cameraParameters()
Get the camera parameters.
public virtual CameraParameters cameraParameters()
cameraTransform()
Camera transform relative to the world coordinate system. Both camera coordinate system and world coordinate system are right-handed coordinate systems. The origin of the camera coordinate system is the camera optical center, with the positive x-axis pointing right, the positive y-axis pointing up, and the positive z-axis pointing in the direction of light entering the camera. (Here, right and up refer to the right and up in the camera image, which may differ from the device's natural orientation.) Data is arranged in row-major order, opposite to OpenGL's column-major.
public virtual Matrix44F cameraTransform()
cameraTransformType()
Camera transform type.
public virtual CameraTransformType cameraTransformType()
createWithImage(Image)
Create, containing only image. Input created with this method can only be used for `CloudRecognizer`_ , other functionalities will not work.
public static InputFrame createWithImage(Image image)
Parameters
image
createWithImageAndCameraParameters(Image, CameraParameters)
Create, containing only image and camera parameters. Input created with this method can only be used for `CloudRecognizer`_ , other functionalities will not work.
public static InputFrame createWithImageAndCameraParameters(Image image, CameraParameters cameraParameters)
Parameters
imagecameraParameters
createWithImageAndCameraParametersAndTemporal(Image, CameraParameters, double)
Create, containing only image, camera parameters, and timestamp.
public static InputFrame createWithImageAndCameraParametersAndTemporal(Image image, CameraParameters cameraParameters, double timestamp)
Parameters
imagecameraParameterstimestamp
hasCameraParameters()
Whether camera parameters are included.
public virtual bool hasCameraParameters()
hasSpatialInformation()
Whether spatial information (cameraTransform and trackingStatus) is included.
public virtual bool hasSpatialInformation()
hasTemporalInformation()
Whether time information (timestamp) is included.
public virtual bool hasTemporalInformation()
image()
Get the image.
public virtual Image image()
index()
Index, an auto-increment value, unique for each input frame.
public virtual int index()
motion()
Motion input data.
public virtual Optional<MotionInputData> motion()
timestamp()
Timestamp. Unit is seconds.
public virtual double timestamp()
trackingStatus()
Get device motion tracking status: `MotionTrackingStatus`_ .
public virtual MotionTrackingStatus trackingStatus()
tryCreate(Image, CameraParameters, double, Matrix44F, CameraTransformType, MotionTrackingStatus)
Create.
public static Optional<InputFrame> tryCreate(Image image, CameraParameters cameraParameters, double timestamp, Matrix44F cameraTransform, CameraTransformType cameraTransformType, MotionTrackingStatus trackingStatus)
Parameters
imagecameraParameterstimestampcameraTransformcameraTransformTypetrackingStatus