Class InputFrame
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
Input frame. Contains image, camera parameters, timestamp, camera transformation relative to world coordinate system, and tracking status. Among them, camera parameters, timestamp, camera transformation relative to world coordinate system, and tracking status are all optional, but specific algorithm components have specific requirements for the input.
public class InputFrame : RefBase, IDisposable
- Inheritance
-
InputFrame
- Implements
- Inherited Members
Methods
Clone()
public InputFrame Clone()
Returns
CloneObject()
protected override object CloneObject()
Returns
cameraParameters()
Get camera parameters.
public virtual CameraParameters cameraParameters()
Returns
cameraTransform()
Camera transformation relative to the world coordinate system. The camera coordinate system and the world coordinate system are both right-handed coordinate systems. The origin of the camera coordinate system is the camera's optical center, the positive direction of the x-axis is right, the positive direction of the y-axis is up, and the positive direction of the z-axis is the direction the light enters the camera. (The right and up here refer to the right and up in the camera image, which may be different from the device's natural orientation.) The data arrangement is row-major, opposite to OpenGL's column-major.
public virtual Matrix44F cameraTransform()
Returns
cameraTransformType()
Camera transformation type.
public virtual CameraTransformType cameraTransformType()
Returns
createWithImage(Image)
Create, only contains image. The input created by this method can only be used for CloudRecognizer_, and other functions cannot work.
public static InputFrame createWithImage(Image image)
Parameters
image
Returns
createWithImageAndCameraParameters(Image, CameraParameters)
Create, only contains image and camera parameters. The input created by this method can only be used for CloudRecognizer_, and other functions cannot work.
public static InputFrame createWithImageAndCameraParameters(Image image, CameraParameters cameraParameters)
Parameters
imagecameraParameters
Returns
createWithImageAndCameraParametersAndTemporal(Image, CameraParameters, double)
Create, only contains image, camera parameters, and timestamp.
public static InputFrame createWithImageAndCameraParametersAndTemporal(Image image, CameraParameters cameraParameters, double timestamp)
Parameters
imagecameraParameterstimestamp
Returns
hasCameraParameters()
Whether to include camera parameters.
public virtual bool hasCameraParameters()
Returns
hasSpatialInformation()
Whether to include spatial information (cameraTransform and trackingStatus).
public virtual bool hasSpatialInformation()
Returns
hasTemporalInformation()
Whether to include time information (timestamp).
public virtual bool hasTemporalInformation()
Returns
image()
Get image.
public virtual Image image()
Returns
index()
Index, an auto-increment, different for each input frame.
public virtual int index()
Returns
motion()
Motion input data.
public virtual Optional<MotionInputData> motion()
Returns
timestamp()
Timestamp. Unit is seconds.
public virtual double timestamp()
Returns
trackingStatus()
Get device motion tracking status: MotionTrackingStatus_.
public virtual MotionTrackingStatus trackingStatus()
Returns
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