GoogleARCore. Frame. CameraImage
Container for state related to the ARCore camera for the frame.
Summary
Properties |
|
---|---|
ImageDisplayUvs
|
static DisplayUvCoords
Gets UVs that map the orientation and aspect ratio of the image returned by Frame.CameraImage.AcquireCameraImageBytes to that of the device's display.
|
ImageIntrinsics
|
static CameraIntrinsics
Gets the unrotated and uncropped intrinsics for the image (CPU) stream.
|
Texture
|
static Texture
Gets a texture used from the device's rear camera.
|
TextureDisplayUvs
|
static DisplayUvCoords
Gets UVs that map the orientation and aspect ratio of Frame.CameraImage.Texture to those of the device's display.
|
TextureIntrinsics
|
static CameraIntrinsics
Gets the unrotated and uncropped intrinsics for the texture (GPU) stream.
|
Public static functions |
|
---|---|
AcquireCameraImageBytes()
|
Attempts to acquire the camera image for CPU access that corresponds to the current frame.
|
GetCameraProjectionMatrix(float nearClipping, float farClipping)
|
Matrix4x4
Gets the projection matrix for the frame.
|
TransformCoordinate(Vector2 coordinate, DisplayUvCoordinateType sourceType, DisplayUvCoordinateType targetType)
|
Vector2
Transforms a coordinate between the
source and target display UV coordinate types. |
UpdateDepthTexture(ref Texture2D depthTexture)
|
Updates the input texture with the latest depth data from ARCore.
|
Properties
ImageDisplayUvs
static DisplayUvCoords ImageDisplayUvs
Gets UVs that map the orientation and aspect ratio of the image returned by Frame.CameraImage.AcquireCameraImageBytes to that of the device's display.
ImageIntrinsics
static CameraIntrinsics ImageIntrinsics
Gets the unrotated and uncropped intrinsics for the image (CPU) stream.
Texture
static Texture Texture
Gets a texture used from the device's rear camera.
TextureDisplayUvs
static DisplayUvCoords TextureDisplayUvs
Gets UVs that map the orientation and aspect ratio of Frame.CameraImage.Texture to those of the device's display.
TextureIntrinsics
static CameraIntrinsics TextureIntrinsics
Gets the unrotated and uncropped intrinsics for the texture (GPU) stream.
Public static functions
AcquireCameraImageBytes
GoogleARCore.CameraImageBytes AcquireCameraImageBytes()
Attempts to acquire the camera image for CPU access that corresponds to the current frame.
Depending on device performance, this can fail for several frames after session start, and for a few frames at a time while the session is running.
Details | |
---|---|
Returns |
A
CameraImageBytes struct with IsAvailable property set to true if successful and false if the image could not be acquired. |
GetCameraProjectionMatrix
Matrix4x4 GetCameraProjectionMatrix( float nearClipping, float farClipping )
Gets the projection matrix for the frame.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
The projection matrix for the frame.
|
TransformCoordinate
Vector2 TransformCoordinate( Vector2 coordinate, DisplayUvCoordinateType sourceType, DisplayUvCoordinateType targetType )
Transforms a coordinate between the source
and target
display UV coordinate types.
This can be used for the conversion of coordinates accessed in the same Unity update.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns |
A corresponding position in the target frame.
|
UpdateDepthTexture
DepthStatus UpdateDepthTexture( ref Texture2D depthTexture )
Updates the input texture with the latest depth data from ARCore.
If there is no new data, or an error occurs, the contents of the texture will remain unchanged. See DepthStatus for a complete list of reasons.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
DepthStatus.
Success if successful. |