Java android.hardware.camera2 CameraCharacteristics fields, constructors, methods, implement or subclass

Example usage for Java android.hardware.camera2 CameraCharacteristics fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.hardware.camera2 CameraCharacteristics.

The text is from its open source code.

Field

KeyCONTROL_AE_AVAILABLE_MODES

List of auto-exposure modes for CaptureRequest#CONTROL_AE_MODE android.control.aeMode that are supported by this camera device.

Not all the auto-exposure modes may be supported by a given camera device, especially if no flash unit is available.

KeyCONTROL_AE_AVAILABLE_TARGET_FPS_RANGES

List of frame rate ranges for CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange supported by this camera device.

For devices at the LEGACY level or above:

  • For constant-framerate recording, for each normal android.media.CamcorderProfile CamcorderProfile , that is, a android.media.CamcorderProfile CamcorderProfile that has android.media.CamcorderProfile#quality quality in the range [ android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW , android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P ], if the profile is supported by the device and has android.media.CamcorderProfile#videoFrameRate videoFrameRate x, this list will always include (x,x).

  • Also, a camera device must either not support any android.media.CamcorderProfile CamcorderProfile , or support at least one normal android.media.CamcorderProfile CamcorderProfile that has android.media.CamcorderProfile#videoFrameRate videoFrameRate x >= 24.

For devices at the LIMITED level or above:

  • For YUV_420_888 burst capture use case, this list will always include (min, max) and (max, max) where min <= 15 and max = the maximum output frame rate of the maximum YUV_420_888 output size.

Units: Frames per second (FPS)

This key is available on all devices.

KeyCONTROL_AF_AVAILABLE_MODES

List of auto-focus (AF) modes for CaptureRequest#CONTROL_AF_MODE android.control.afMode that are supported by this camera device.

Not all the auto-focus modes may be supported by a given camera device.

KeyCONTROL_AWB_AVAILABLE_MODES

List of auto-white-balance modes for CaptureRequest#CONTROL_AWB_MODE android.control.awbMode that are supported by this camera device.

Not all the auto-white-balance modes may be supported by a given camera device.

KeyCONTROL_MAX_REGIONS_AF

The maximum number of metering regions that can be used by the auto-focus (AF) routine.

This corresponds to the the maximum allowed number of elements in CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions .

Range of valid values:
Value will be >= 0.

KeyFLASH_INFO_AVAILABLE

Whether this camera device has a flash unit.

Will be false if no flash is available.

If there is no flash unit, none of the flash controls do anything.

KeyLENS_INFO_MINIMUM_FOCUS_DISTANCE

Shortest distance from frontmost surface of the lens that can be brought into sharp focus.

If the lens is fixed-focus, this will be 0.

Units: See CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration for details

Range of valid values:
>= 0

Optional - This value may be null on some devices.

Limited capability - Present on all camera devices that report being at least CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED devices in the CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel key

KeyLENS_FACING

Direction the camera faces relative to device screen.

Possible values:

  • #LENS_FACING_FRONT FRONT
  • #LENS_FACING_BACK BACK
  • #LENS_FACING_EXTERNAL EXTERNAL

This key is available on all devices.

KeyREQUEST_AVAILABLE_CAPABILITIES

List of capabilities that this camera device advertises as fully supporting.

A capability is a contract that the camera device makes in order to be able to satisfy one or more use cases.

Listing a capability guarantees that the whole set of features required to support a common use will all be available.

Using a subset of the functionality provided by an unsupported capability may be possible on a specific camera device implementation; to do this query each of android.request.availableRequestKeys, android.request.availableResultKeys, android.request.availableCharacteristicsKeys.

The following capabilities are guaranteed to be available on CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel == FULL devices:

  • MANUAL_SENSOR
  • MANUAL_POST_PROCESSING

Other capabilities may be available on either FULL or LIMITED devices, but the application should query this key to be sure.

Possible values:

  • #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE
  • #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR
  • #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING
  • #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW
  • #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING
  • #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS
  • #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE
  • #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING
  • #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT
  • #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO
  • #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING
  • #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA
  • #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME

This key is available on all devices.

KeySCALER_AVAILABLE_MAX_DIGITAL_ZOOM

The maximum ratio between both active area width and crop region width, and active area height and crop region height, for CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion .

This represents the maximum amount of zooming possible by the camera device, or equivalently, the minimum cropping window size.

Crop regions that have a width or height that is smaller than this ratio allows will be rounded up to the minimum allowed size by the camera device.

Units: Zoom scale factor

Range of valid values:
>=1

This key is available on all devices.

KeySCALER_STREAM_CONFIGURATION_MAP

The available stream configurations that this camera device supports; also includes the minimum frame durations and the stall durations for each format/size combination.

All camera devices will support sensor maximum resolution (defined by CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize ) for the JPEG format.

For a given use case, the actual maximum supported resolution may be lower than what is listed here, depending on the destination Surface for the image data.

KeySENSOR_INFO_ACTIVE_ARRAY_SIZE

The area of the image sensor which corresponds to active pixels after any geometric distortion correction has been applied.

This is the rectangle representing the size of the active region of the sensor (i.e.

KeySENSOR_INFO_SENSITIVITY_RANGE

Range of sensitivities for CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity supported by this camera device.

The values are the standard ISO sensitivity values, as defined in ISO 12232:2006.

Range of valid values:
Min <= 100, Max >= 800

Optional - This value may be null on some devices.

Full capability - Present on all camera devices that report being CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL devices in the CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel key

KeySENSOR_INFO_COLOR_FILTER_ARRANGEMENT

The arrangement of color filters on sensor; represents the colors in the top-left 2x2 section of the sensor, in reading order.

Possible values:

  • #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB
  • #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG
  • #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG
  • #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR
  • #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB

Optional - This value may be null on some devices.

Full capability - Present on all camera devices that report being CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL devices in the CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel key

KeySENSOR_INFO_PIXEL_ARRAY_SIZE

Dimensions of the full pixel array, possibly including black calibration pixels.

The pixel count of the full pixel array of the image sensor, which covers CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize area.

KeySENSOR_CALIBRATION_TRANSFORM1

A per-device calibration transform matrix that maps from the reference sensor colorspace to the actual device sensor colorspace.

This matrix is used to correct for per-device variations in the sensor colorspace, and is used for processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a per-device calibration transform that maps colors from reference sensor color space (i.e.

KeySENSOR_CALIBRATION_TRANSFORM2

A per-device calibration transform matrix that maps from the reference sensor colorspace to the actual device sensor colorspace (this is the colorspace of the raw buffer data).

This matrix is used to correct for per-device variations in the sensor colorspace, and is used for processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a per-device calibration transform that maps colors from reference sensor color space (i.e.

KeySENSOR_COLOR_TRANSFORM1

A matrix that transforms color values from CIE XYZ color space to reference sensor color space.

This matrix is used to convert from the standard CIE XYZ color space to the reference sensor colorspace, and is used when processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps colors from the CIE XYZ color space to the reference sensor color space (i.e.

KeySENSOR_COLOR_TRANSFORM2

A matrix that transforms color values from CIE XYZ color space to reference sensor color space.

This matrix is used to convert from the standard CIE XYZ color space to the reference sensor colorspace, and is used when processing raw buffer data.

The matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps colors from the CIE XYZ color space to the reference sensor color space (i.e.

KeySENSOR_FORWARD_MATRIX1

A matrix that transforms white balanced camera colors from the reference sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.

This matrix is used to convert to the standard CIE XYZ colorspace, and is used when processing raw buffer data.

This matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps white balanced colors from the reference sensor color space to the CIE XYZ color space with a D50 white point.

Under the first reference illuminant ( CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1 ) this matrix is chosen so that the standard white point for this reference illuminant in the reference sensor colorspace is mapped to D50 in the CIE XYZ colorspace.

Optional - This value may be null on some devices.

KeySENSOR_FORWARD_MATRIX2

A matrix that transforms white balanced camera colors from the reference sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.

This matrix is used to convert to the standard CIE XYZ colorspace, and is used when processing raw buffer data.

This matrix is expressed as a 3x3 matrix in row-major-order, and contains a color transform matrix that maps white balanced colors from the reference sensor color space to the CIE XYZ color space with a D50 white point.

Under the second reference illuminant ( CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2 ) this matrix is chosen so that the standard white point for this reference illuminant in the reference sensor colorspace is mapped to D50 in the CIE XYZ colorspace.

This matrix will only be present if the second reference illuminant is present.

Optional - This value may be null on some devices.

KeySENSOR_BLACK_LEVEL_PATTERN

A fixed black level offset for each of the color filter arrangement (CFA) mosaic channels.

This key specifies the zero light value for each of the CFA mosaic channels in the camera sensor.

KeySENSOR_ORIENTATION

Clockwise angle through which the output image needs to be rotated to be upright on the device screen in its native orientation.

Also defines the direction of rolling shutter readout, which is from top to bottom in the sensor's coordinate system.

Units: Degrees of clockwise rotation; always a multiple of 90

Range of valid values:
0, 90, 180, 270

This key is available on all devices.

KeyINFO_SUPPORTED_HARDWARE_LEVEL

Generally classifies the overall set of the camera device functionality.

The supported hardware level is a high-level description of the camera device's capabilities, summarizing several capabilities into one field.

KeySYNC_MAX_LATENCY

The maximum number of frames that can occur after a request (different than the previous) has been submitted, and before the result's state becomes synchronized.

This defines the maximum distance (in number of metadata results), between the frame number of the request that has new controls to apply and the frame number of the result that has all the controls applied.

In other words this acts as an upper boundary for how many frames must occur before the camera device knows for a fact that the new submitted camera settings have been applied in outgoing frames.

Units: Frame counts

Possible values:

  • #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL
  • #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN

Available values for this device:
A positive value, PER_FRAME_CONTROL, or UNKNOWN.

This key is available on all devices.

Method

Tget(Key key)
Get a camera characteristics field value.