ArCameraConfig
Camera configuration.
Summary
Enumerations
ArCameraConfigFacingDirection
{
AR_CAMERA_CONFIG_FACING_DIRECTION_BACK
= 0,
AR_CAMERA_CONFIG_FACING_DIRECTION_FRONT
= 1
}
Typedefs
struct ArCameraConfig_
Functions
ArCameraConfigList_create
(const ArSession
*session, ArCameraConfigList
**out_list)
void
void
ArCameraConfigList_getItem
(const ArSession
*session, const ArCameraConfigList
*list, int32_t index, ArCameraConfig
*out_camera_config)
void
ArCameraConfigList_getSize
(const ArSession
*session, const ArCameraConfigList
*list, int32_t *out_size)
void
ArCameraConfig_create
(const ArSession
*session, ArCameraConfig
**out_camera_config)
void
ArCameraConfig_destroy
( ArCameraConfig
*camera_config)
void
ArCameraConfig_getCameraId
(const ArSession
*session, const ArCameraConfig
*camera_config, char **out_camera_id)
void
ArCameraConfig_getDepthSensorUsage
(const ArSession
*session, const ArCameraConfig
*camera_config, uint32_t *out_depth_sensor_usage)
void
ArCameraConfig_getFacingDirection
(const ArSession
*session, const ArCameraConfig
*camera_config, ArCameraConfigFacingDirection
*out_facing)
void
ArCameraConfig_getFpsRange
(const ArSession
*session, const ArCameraConfig
*camera_config, int32_t *out_min_fps, int32_t *out_max_fps)
void
ArCameraConfig_getImageDimensions
(const ArSession
*session, const ArCameraConfig
*camera_config, int32_t *out_width, int32_t *out_height)
void
ArCameraConfig_getStereoCameraUsage
(const ArSession
*session, const ArCameraConfig
*camera_config, ArCameraConfigStereoCameraUsage
*out_stereo_camera_usage)
void
ArCameraConfig_getTextureDimensions
(const ArSession
*session, const ArCameraConfig
*camera_config, int32_t *out_width, int32_t *out_height)
void
Enumerations
ArCameraConfigFacingDirection
ArCameraConfigFacingDirection
Describes the direction a camera is facing relative to the device.
Used by ArCameraConfig_getFacingDirection
.
Camera looks out the back of the device (away from the user).
Camera looks out the front of the device (towards the user).
To create a session using the front-facing (selfie) camera, use ArSession_setCameraConfig
to set a front-facing (selfie) camera config retrieved from ArSession_getSupportedCameraConfigsWithFilter
.
When the front camera is selected, ARCore's behavior changes in the following ways:
- The display will be mirrored. Specifically,
ArCamera_getProjectionMatrix
will include a horizontal flip in the generated projection matrix and APIs that reason about things in screen space, such asArFrame_transformCoordinates2d
, will mirror screen coordinates. Open GL apps should consider usingglFrontFace
to render mirrored assets without changing their winding direction. -
ArCamera_getTrackingState
will always outputAR_TRACKING_STATE_PAUSED
. -
ArFrame_hitTest
will always output an empty list. -
ArCamera_getDisplayOrientedPose
will always output an identity pose. -
ArSession_acquireNewAnchor
will always returnAR_ERROR_NOT_TRACKING
. - Planes will never be detected.
-
ArSession_configure
will fail if the supplied configuration requests Cloud Anchors, Augmented Images, or Environmental HDR Lighting Estimation mode.
Typedefs
ArCameraConfig
struct ArCameraConfig_ ArCameraConfig
A camera config struct that contains the config supported by the physical camera obtained from the low level device profiles.
( value type ).
- Create with:
ArCameraConfig_create
- Release with:
ArCameraConfig_destroy
ArCameraConfigList
struct ArCameraConfigList_ ArCameraConfigList
A list of camera config ( value type ).
- Create with:
ArCameraConfigList_create
- Release with:
ArCameraConfigList_destroy
Functions
ArCameraConfigList_create
void ArCameraConfigList_create ( const ArSession * session , ArCameraConfigList ** out_list )
Creates a camera config list object.
session
|
The ARCore session
|
out_list
|
A pointer to an
ArCameraConfigList
*
to receive the address of the newly allocated ArCameraConfigList
. |
ArCameraConfigList_destroy
void ArCameraConfigList_destroy( ArCameraConfigList *list )
Releases the memory used by a camera config list object, along with all the camera config references it holds.
ArCameraConfigList_getItem
void ArCameraConfigList_getItem ( const ArSession * session , const ArCameraConfigList * list , int32_t index , ArCameraConfig * out_camera_config )
Retrieves the specific camera config based on the position in this list.
ArCameraConfigList_getSize
void ArCameraConfigList_getSize ( const ArSession * session , const ArCameraConfigList * list , int32_t * out_size )
Retrieves the number of camera configs in this list.
ArCameraConfig_create
void ArCameraConfig_create ( const ArSession * session , ArCameraConfig ** out_camera_config )
Creates a camera config object.
session
|
The ARCore session
|
out_camera_config
|
ArCameraConfig_destroy
void ArCameraConfig_destroy ( ArCameraConfig * camera_config )
Releases the memory used by a camera config object.
ArCameraConfig_getCameraId
void ArCameraConfig_getCameraId ( const ArSession * session , const ArCameraConfig * camera_config , char ** out_camera_id )
Obtains the camera id for the given camera config which is obtained from the list of ARCore compatible camera configs.
The acquired ID must be released after use by the ArString_release
function.
ArCameraConfig_getDepthSensorUsage
void ArCameraConfig_getDepthSensorUsage ( const ArSession * session , const ArCameraConfig * camera_config , uint32_t * out_depth_sensor_usage )
Gets the depth sensor usage settings.
out_depth_sensor_usage
will contain one of the values from ArCameraConfigDepthSensorUsage
enum.
ArCameraConfig_getFacingDirection
void ArCameraConfig_getFacingDirection ( const ArSession * session , const ArCameraConfig * camera_config , ArCameraConfigFacingDirection * out_facing )
Obtains the facing direction of the camera selected by this config.
ArCameraConfig_getFpsRange
void ArCameraConfig_getFpsRange ( const ArSession * session , const ArCameraConfig * camera_config , int32_t * out_min_fps , int32_t * out_max_fps )
Obtains the minimum and maximum camera capture rate in frames per second (fps) for the current camera config.
Actual capture frame rate will vary within this range, depending on lighting conditions. Frame rates will generally be lower under poor lighting conditions to accommodate longer exposure times.
ArCameraConfig_getImageDimensions
void ArCameraConfig_getImageDimensions ( const ArSession * session , const ArCameraConfig * camera_config , int32_t * out_width , int32_t * out_height )
Obtains the CPU camera image dimensions for the given camera config.
ArCameraConfig_getStereoCameraUsage
void ArCameraConfig_getStereoCameraUsage ( const ArSession * session , const ArCameraConfig * camera_config , ArCameraConfigStereoCameraUsage * out_stereo_camera_usage )
Gets the stereo multi-camera ( https://source.android.com/devices/camera/multi-camera ) usage settings.
out_stereo_camera_usage
will contain one of the values from ArCameraConfigStereoCameraUsage
enum.
ArCameraConfig_getTextureDimensions
void ArCameraConfig_getTextureDimensions ( const ArSession * session , const ArCameraConfig * camera_config , int32_t * out_width , int32_t * out_height )
Obtains the GPU texture dimensions for the given camera config.