Class InputFrame
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
Input frame. Contains an image, camera parameters, timestamp, camera transform relative to the world coordinate system, and tracking status. The camera parameters, timestamp, camera transform relative to the world coordinate system, and tracking status are optional, but specific algorithm components may have specific input requirements.
public class InputFrame : RefBase, IDisposable
- Inheritance
-
InputFrame
- Implements
- Inherited Members
Methods
Clone()
public InputFrame Clone()
cameraParameters()
Gets the camera parameters.
public virtual CameraParameters cameraParameters()
cameraTransform()
The transform of the camera relative to the world coordinate system. Both the camera coordinate system and the world coordinate system are right-handed. The origin of the camera coordinate system is the camera optical center; the positive x axis points right, the positive y axis points up, and the positive z axis points in the direction that light enters the camera. (Right and up refer to right and up in the camera image, which may differ from the device natural orientation.) The data is arranged in row-major order, opposite to OpenGL's column-major order.
public virtual Matrix44F cameraTransform()
cameraTransformType()
Camera transform type.
public virtual CameraTransformType cameraTransformType()
createWithImage(Image)
Creates with only an image. Input created with this method can only be used by `CloudRecognizer`_; other features cannot work.
public static InputFrame createWithImage(Image image)
Parameters
image
createWithImageAndCameraParameters(Image, CameraParameters)
Creates with only an image and camera parameters. Input created with this method can only be used by `CloudRecognizer`_; other features cannot work.
public static InputFrame createWithImageAndCameraParameters(Image image, CameraParameters cameraParameters)
Parameters
imagecameraParameters
createWithImageAndCameraParametersAndTemporal(Image, CameraParameters, double)
Creates with only an 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()
Gets the image.
public virtual Image image()
index()
Index, an auto-incrementing value that is different for each input frame.
public virtual int index()
motion()
Motion input data.
public virtual Optional<MotionInputData> motion()
timestamp()
Timestamp. The unit is seconds.
public virtual double timestamp()
trackingStatus()
Gets the device motion tracking status: `MotionTrackingStatus`_.
public virtual MotionTrackingStatus trackingStatus()
tryCreate(Image, CameraParameters, double, Matrix44F, CameraTransformType, MotionTrackingStatus)
Creates.
public static Optional<InputFrame> tryCreate(Image image, CameraParameters cameraParameters, double timestamp, Matrix44F cameraTransform, CameraTransformType cameraTransformType, MotionTrackingStatus trackingStatus)
Parameters
imagecameraParameterstimestampcameraTransformcameraTransformTypetrackingStatus