Android APIs
public final class

CameraCharacteristics

extends CameraMetadata<TKey>
java.lang.Object
   ↳ android.hardware.camera2.CameraMetadata<TKey>
     ↳ android.hardware.camera2.CameraCharacteristics

Class Overview

The properties describing a CameraDevice.

These properties are fixed for a given CameraDevice, and can be queried through the CameraManager interface with getCameraCharacteristics(String).

CameraCharacteristics objects are immutable.

Summary

Nested Classes
class CameraCharacteristics.Key<T> A Key is used to do camera characteristics field lookups with get(CameraCharacteristics.Key)
[Expand]
Inherited Constants
From class android.hardware.camera2.CameraMetadata
Fields
public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES

The set of auto-exposure antibanding modes that are supported by this camera device.

public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES

The set of auto-exposure modes that are supported by this camera device.

public static final Key<Range[]<Integer>> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES

List of frame rate ranges supported by the auto-exposure (AE) algorithm/hardware

public static final Key<Range<Integer>> CONTROL_AE_COMPENSATION_RANGE

Maximum and minimum exposure compensation setting, in counts of android.control.aeCompensationStep.

public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP

Smallest step by which exposure compensation can be changed

public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES

List of auto-focus (AF) modes that can be selected with android.control.afMode.

public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS

List containing the subset of color effects specified in android.control.effectMode that is supported by this device.

public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES

List containing a subset of scene modes specified in android.control.sceneMode.

public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES

List of video stabilization modes that can be supported

public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES

The set of auto-white-balance modes (android.control.awbMode) that are supported by this camera device.

public static final Key<Integer> CONTROL_MAX_REGIONS_AE

List of the maximum number of regions that can be used for metering in auto-exposure (AE); this corresponds to the the maximum number of elements in android.control.aeRegions.

public static final Key<Integer> CONTROL_MAX_REGIONS_AF

List of the maximum number of regions that can be used for metering in auto-focus (AF); this corresponds to the the maximum number of elements in android.control.afRegions.

public static final Key<Integer> CONTROL_MAX_REGIONS_AWB

List of the maximum number of regions that can be used for metering in auto-white balance (AWB); this corresponds to the the maximum number of elements in android.control.awbRegions.

public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES

The set of edge enhancement modes supported by this camera device.

public static final Key<Boolean> FLASH_INFO_AVAILABLE

Whether this camera device has a flash.

public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES

The set of hot pixel correction modes that are supported by this camera device.

public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL

Generally classifies the overall set of the camera device functionality.

public static final Key<Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES

Supported resolutions for the JPEG thumbnail.

public static final Key<Integer> LENS_FACING

Direction the camera faces relative to device screen.

public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES

List of supported aperture values.

public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES

List of supported neutral density filter values for android.lens.filterDensity.

public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS

The available focal lengths for this device for use with android.lens.focalLength.

public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION

List containing a subset of the optical image stabilization (OIS) modes specified in android.lens.opticalStabilizationMode.

public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION

The lens focus distance calibration quality.

public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE

Optional.

public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE

Shortest distance from frontmost surface of the lens that can be focused correctly.

public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES

The set of noise reduction modes supported by this camera device.

public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES

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

public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any processed (but not-stalling) formats.

public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any processed (and stalling) formats.

public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any RAW formats.

public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT

Defines how many sub-components a result will be composed of.

public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH

Specifies the number of maximum pipeline stages a frame has to go through from when it's exposed to when it's available to the framework.

public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM

The maximum ratio between both active area width and crop region width, and active area height and crop region height.

public static final Key<Integer> SCALER_CROPPING_TYPE

The crop type that this camera device supports.

public static final Key<StreamConfigurationMap> SCALER_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.

public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES

Lists the supported sensor test pattern modes for android.sensor.testPatternMode.

public static final Key<int[]> SENSOR_BLACK_LEVEL_PATTERN

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

public static final Key<ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1

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

public static final Key<ColorSpaceTransform> SENSOR_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).

public static final Key<ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1

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

public static final Key<ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2

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

public static final Key<ColorSpaceTransform> SENSOR_FORWARD_MATRIX1

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

public static final Key<ColorSpaceTransform> SENSOR_FORWARD_MATRIX2

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

public static final Key<Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE

Area of raw data which corresponds to only active pixels.

public static final Key<Integer> SENSOR_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.

public static final Key<Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE

Range of valid exposure times used by android.sensor.exposureTime.

public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION

Maximum possible frame duration (minimum frame rate).

public static final Key<SizeF> SENSOR_INFO_PHYSICAL_SIZE

The physical dimensions of the full pixel array.

public static final Key<Size> SENSOR_INFO_PIXEL_ARRAY_SIZE

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

public static final Key<Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE

Range of valid sensitivities.

public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL

Maximum raw value output by sensor.

public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY

Maximum sensitivity that is implemented purely through analog gain.

public static final Key<Integer> SENSOR_ORIENTATION

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

public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1

The standard reference illuminant used as the scene light source when calculating the android.sensor.colorTransform1, android.sensor.calibrationTransform1, and android.sensor.forwardMatrix1 matrices.

public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2

The standard reference illuminant used as the scene light source when calculating the android.sensor.colorTransform2, android.sensor.calibrationTransform2, and android.sensor.forwardMatrix2 matrices.

public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES

The face detection modes that are available for this camera device.

public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES

The set of hot pixel map output modes supported by this camera device.

public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT

The maximum number of simultaneously detectable faces.

public static final Key<Integer> SYNC_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 (by setting android.sync.frameNumber to a non-negative value).

public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES

The set of tonemapping modes supported by this camera device.

public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS

Maximum number of supported points in the tonemap curve that can be used for android.tonemap.curve.

Public Methods
<T> T get(Key<T> key)
Get a camera characteristics field value.
List<Key<?>> getAvailableCaptureRequestKeys()
Returns the list of keys supported by this CameraDevice for querying with a CaptureRequest.
List<Key<?>> getAvailableCaptureResultKeys()
Returns the list of keys supported by this CameraDevice for querying with a CaptureResult.
List<Key<?>> getKeys()
Returns a list of the keys contained in this map.
[Expand]
Inherited Methods
From class android.hardware.camera2.CameraMetadata
From class java.lang.Object

Fields

public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES

The set of auto-exposure antibanding modes that are supported by this camera device.

Not all of the auto-exposure anti-banding modes may be supported by a given camera device. This field lists the valid anti-banding modes that the application may request for this camera device; they must include AUTO.

public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES

The set of auto-exposure modes 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. This entry lists the valid modes for android.control.aeMode for this camera device.

All camera devices support ON, and all camera devices with flash units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.

FULL mode camera devices always support OFF mode, which enables application control of camera exposure time, sensitivity, and frame duration.

See Also

public static final Key<Range[]<Integer>> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES

List of frame rate ranges supported by the auto-exposure (AE) algorithm/hardware

public static final Key<Range<Integer>> CONTROL_AE_COMPENSATION_RANGE

Maximum and minimum exposure compensation setting, in counts of android.control.aeCompensationStep.

public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP

Smallest step by which exposure compensation can be changed

public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES

List of auto-focus (AF) modes that can be selected with android.control.afMode.

Not all the auto-focus modes may be supported by a given camera device. This entry lists the valid modes for android.control.afMode for this camera device.

All camera devices will support OFF mode, and all camera devices with adjustable focuser units (android.lens.info.minimumFocusDistance > 0) will support AUTO mode.

public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS

List containing the subset of color effects specified in android.control.effectMode that is supported by this device.

This list contains the color effect modes that can be applied to images produced by the camera device. Only modes that have been fully implemented for the current device may be included here. Implementations are not expected to be consistent across all devices. If no color effect modes are available for a device, this should simply be set to OFF.

A color effect will only be applied if android.control.mode != OFF.

public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES

List containing a subset of scene modes specified in android.control.sceneMode.

This list contains scene modes that can be set for the camera device. Only scene modes that have been fully implemented for the camera device may be included here. Implementations are not expected to be consistent across all devices. If no scene modes are supported by the camera device, this will be set to [DISABLED].

public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES

List of video stabilization modes that can be supported

public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES

The set of auto-white-balance modes (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. This entry lists the valid modes for android.control.awbMode for this camera device.

All camera devices will support ON mode.

FULL mode camera devices will always support OFF mode, which enables application control of white balance, by using android.colorCorrection.transform and android.colorCorrection.gains(android.colorCorrection.mode must be set to TRANSFORM_MATRIX).

public static final Key<Integer> CONTROL_MAX_REGIONS_AE

List of the maximum number of regions that can be used for metering in auto-exposure (AE); this corresponds to the the maximum number of elements in android.control.aeRegions.

public static final Key<Integer> CONTROL_MAX_REGIONS_AF

List of the maximum number of regions that can be used for metering in auto-focus (AF); this corresponds to the the maximum number of elements in android.control.afRegions.

public static final Key<Integer> CONTROL_MAX_REGIONS_AWB

List of the maximum number of regions that can be used for metering in auto-white balance (AWB); this corresponds to the the maximum number of elements in android.control.awbRegions.

public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES

The set of edge enhancement modes supported by this camera device.

This tag lists the valid modes for android.edge.mode.

Full-capability camera devices must always support OFF and FAST.

See Also

public static final Key<Boolean> FLASH_INFO_AVAILABLE

Whether this camera device has a flash.

If no flash, none of the flash controls do anything. All other metadata should return 0.

public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES

The set of hot pixel correction modes that are supported by this camera device.

This tag lists valid modes for android.hotPixel.mode.

FULL mode camera devices will always support FAST.

See Also

public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL

Generally classifies the overall set of the camera device functionality.

Camera devices will come in two flavors: LIMITED and FULL.

A FULL device has the most support possible and will enable the widest range of use cases such as:

A LIMITED device may have some or none of the above characteristics. To find out more refer to android.request.availableCapabilities.

public static final Key<Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES

Supported resolutions for the JPEG thumbnail.

Below condiditions will be satisfied for this size list:

  • The sizes will be sorted by increasing pixel area (width x height). If several resolutions have the same area, they will be sorted by increasing width.
  • The aspect ratio of the largest thumbnail size will be same as the aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. The largest size is defined as the size that has the largest pixel area in a given size list.
  • Each output JPEG size in android.scaler.availableStreamConfigurations will have at least one corresponding size that has the same aspect ratio in availableThumbnailSizes, and vice versa.
  • All non (0, 0) sizes will have non-zero widths and heights.

public static final Key<Integer> LENS_FACING

Direction the camera faces relative to device screen.

public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES

List of supported aperture values.

If the camera device doesn't support variable apertures, listed value will be the fixed aperture.

If the camera device supports variable apertures, the aperture value in this list will be sorted in ascending order.

public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES

List of supported neutral density filter values for android.lens.filterDensity.

If changing android.lens.filterDensity is not supported, availableFilterDensities must contain only 0. Otherwise, this list contains only the exact filter density values available on this camera device.

public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS

The available focal lengths for this device for use with android.lens.focalLength.

If optical zoom is not supported, this will only report a single value corresponding to the static focal length of the device. Otherwise, this will report every focal length supported by the device.

public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION

List containing a subset of the optical image stabilization (OIS) modes specified in android.lens.opticalStabilizationMode.

If OIS is not implemented for a given camera device, this will contain only OFF.

public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE

Optional. Hyperfocal distance for this lens.

If the lens is not fixed focus, the camera device will report this field when android.lens.info.focusDistanceCalibration is APPROXIMATE or CALIBRATED.

Optional - This value may be null on some devices.

public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE

Shortest distance from frontmost surface of the lens that can be focused correctly.

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

public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES

The set of noise reduction modes supported by this camera device.

This tag lists the valid modes for android.noiseReduction.mode.

Full-capability camera devices must always support OFF and FAST.

public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES

List of capabilities that the 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 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 field to be sure.

public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any processed (but not-stalling) formats.

This value contains the max number of output simultaneous streams for any processed (but not-stalling) formats.

This lists the upper bound of the number of output streams supported by the camera device. Using more streams simultaneously may require more hardware and CPU resources that will consume more power. The image format for this kind of an output stream can be any non-RAW and supported format provided by android.scaler.streamConfigurationMap.

Processed (but not-stalling) is defined as any non-RAW format without a stall duration. Typically:

  • ImageFormat#YUV_420_888
  • ImageFormat#NV21
  • ImageFormat#YV12
  • Implementation-defined formats, i.e. StreamConfiguration#isOutputSupportedFor(Class)

For full guarantees, query StreamConfigurationMap#getOutputStallDuration with a processed format -- it will return 0 for a non-stalling stream.

public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any processed (and stalling) formats.

This value contains the max number of output simultaneous streams for any processed (but not-stalling) formats.

This lists the upper bound of the number of output streams supported by the camera device. Using more streams simultaneously may require more hardware and CPU resources that will consume more power. The image format for this kind of an output stream can be any non-RAW and supported format provided by android.scaler.streamConfigurationMap.

A processed and stalling format is defined as any non-RAW format with a stallDurations > 0. Typically only the JPEG format (ImageFormat#JPEG)

For full guarantees, query StreamConfigurationMap#getOutputStallDuration with a processed format -- it will return a non-0 value for a stalling stream.

public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW

The maximum numbers of different types of output streams that can be configured and used simultaneously by a camera device for any RAW formats.

This value contains the max number of output simultaneous streams from the raw sensor.

This lists the upper bound of the number of output streams supported by the camera device. Using more streams simultaneously may require more hardware and CPU resources that will consume more power. The image format for this kind of an output stream can be any RAW and supported format provided by android.scaler.streamConfigurationMap.

In particular, a RAW format is typically one of:

  • ImageFormat#RAW_SENSOR
  • Opaque RAW

public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT

Defines how many sub-components a result will be composed of.

In order to combat the pipeline latency, partial results may be delivered to the application layer from the camera device as soon as they are available.

Optional; defaults to 1. A value of 1 means that partial results are not supported, and only the final TotalCaptureResult will be produced by the camera device.

A typical use case for this might be: after requesting an auto-focus (AF) lock the new AF state might be available 50% of the way through the pipeline. The camera device could then immediately dispatch this state via a partial result to the application, and the rest of the metadata via later partial results.

public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH

Specifies the number of maximum pipeline stages a frame has to go through from when it's exposed to when it's available to the framework.

A typical minimum value for this is 2 (one stage to expose, one stage to readout) from the sensor. The ISP then usually adds its own stages to do custom HW processing. Further stages may be added by SW processing.

Depending on what settings are used (e.g. YUV, JPEG) and what processing is enabled (e.g. face detection), the actual pipeline depth (specified by android.request.pipelineDepth) may be less than the max pipeline depth.

A pipeline depth of X stages is equivalent to a pipeline latency of X frame intervals.

This value will be 8 or less.

public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM

The maximum ratio between both active area width and crop region width, and active area height and crop region height.

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.

public static final Key<Integer> SCALER_CROPPING_TYPE

The crop type that this camera device supports.

When passing a non-centered crop region (android.scaler.cropRegion) to a camera device that only supports CENTER_ONLY cropping, the camera device will move the crop region to the center of the sensor active array (android.sensor.info.activeArraySize) and keep the crop region width and height unchanged. The camera device will return the final used crop region in metadata result android.scaler.cropRegion.

Camera devices that support FREEFORM cropping will support any crop region that is inside of the active array. The camera device will apply the same crop region and return the final used crop region in capture result metadata android.scaler.cropRegion.

FULL capability devices (android.info.supportedHardwareLevel == FULL) will support FREEFORM cropping.

public static final Key<StreamConfigurationMap> SCALER_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 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. For example, for recording video, the video encoder chosen may have a maximum size limit (e.g. 1080p) smaller than what the camera (e.g. maximum resolution is 3264x2448) can provide.

Please reference the documentation for the image data destination to check if it limits the maximum size for image data.

The following table describes the minimum required output stream configurations based on the hardware level (android.info.supportedHardwareLevel):

Format Size Hardware Level Notes
JPEG android.sensor.info.activeArraySize Any
JPEG 1920x1080 (1080p) Any if 1080p <= activeArraySize
JPEG 1280x720 (720) Any if 720p <= activeArraySize
JPEG 640x480 (480p) Any if 480p <= activeArraySize
JPEG 320x240 (240p) Any if 240p <= activeArraySize
YUV_420_888 all output sizes available for JPEG FULL
YUV_420_888 all output sizes available for JPEG, up to the maximum video size LIMITED
IMPLEMENTATION_DEFINED same as YUV_420_888 Any

Refer to android.request.availableCapabilities for additional mandatory stream configurations on a per-capability basis.

public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES

Lists the supported sensor test pattern modes for android.sensor.testPatternMode.

Optional. Defaults to [OFF].

Optional - This value may be null on some devices.

public static final Key<int[]> SENSOR_BLACK_LEVEL_PATTERN

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

This tag specifies the zero light value for each of the CFA mosaic channels in the camera sensor. The maximal value output by the sensor is represented by the value in android.sensor.info.whiteLevel.

The values are given in row-column scan order, with the first value corresponding to the element of the CFA in row=0, column=0.

Optional - This value may be null on some devices.

public static final Key<ColorSpaceTransform> SENSOR_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. the "golden module" colorspace) into this camera device's native sensor color space under the first reference illuminant (android.sensor.referenceIlluminant1).

Optional - This value may be null on some devices.

public static final Key<ColorSpaceTransform> SENSOR_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. the "golden module" colorspace) into this camera device's native sensor color space under the second reference illuminant (android.sensor.referenceIlluminant2).

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

Optional - This value may be null on some devices.

public static final Key<ColorSpaceTransform> SENSOR_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. the "golden module" colorspace) under the first reference illuminant (android.sensor.referenceIlluminant1).

The white points chosen in both the reference sensor color space and the CIE XYZ colorspace when calculating this transform will match the standard white point for the first reference illuminant (i.e. no chromatic adaptation will be applied by this transform).

Optional - This value may be null on some devices.

public static final Key<ColorSpaceTransform> SENSOR_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. the "golden module" colorspace) under the second reference illuminant (android.sensor.referenceIlluminant2).

The white points chosen in both the reference sensor color space and the CIE XYZ colorspace when calculating this transform will match the standard white point for the second reference illuminant (i.e. no chromatic adaptation will be applied by this transform).

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

Optional - This value may be null on some devices.

public static final Key<ColorSpaceTransform> SENSOR_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 (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.

public static final Key<ColorSpaceTransform> SENSOR_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 (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.

public static final Key<Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE

Area of raw data which corresponds to only active pixels.

It is smaller or equal to sensor full pixel array, which could include the black calibration pixels.

public static final Key<Integer> SENSOR_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.

public static final Key<Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE

Range of valid exposure times used by android.sensor.exposureTime.

public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION

Maximum possible frame duration (minimum frame rate).

The largest possible android.sensor.frameDuration that will be accepted by the camera device. Attempting to use frame durations beyond the maximum will result in the frame duration being clipped to the maximum. See that control for a full definition of frame durations.

Refer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum frame duration values.

public static final Key<SizeF> SENSOR_INFO_PHYSICAL_SIZE

The physical dimensions of the full pixel array.

This is the physical size of the sensor pixel array defined by android.sensor.info.pixelArraySize.

public static final Key<Size> SENSOR_INFO_PIXEL_ARRAY_SIZE

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

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

If a camera device supports raw sensor formats, either this or android.sensor.info.activeArraySize is the maximum output raw size listed in android.scaler.streamConfigurationMap. If a size corresponding to pixelArraySize is listed, the resulting raw sensor image will include black pixels.

public static final Key<Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE

Range of valid sensitivities.

The minimum and maximum valid values for the android.sensor.sensitivity control.

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

public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL

Maximum raw value output by sensor.

This specifies the fully-saturated encoding level for the raw sample values from the sensor. This is typically caused by the sensor becoming highly non-linear or clipping. The minimum for each channel is specified by the offset in the android.sensor.blackLevelPattern tag.

The white level is typically determined either by sensor bit depth (8-14 bits is expected), or by the point where the sensor response becomes too non-linear to be useful. The default value for this is maximum representable value for a 16-bit raw sample (2^16 - 1).

public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY

Maximum sensitivity that is implemented purely through analog gain.

For android.sensor.sensitivity values less than or equal to this, all applied gain must be analog. For values above this, the gain applied can be a mix of analog and digital.

Optional - This value may be null on some devices.

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

public static final Key<Integer> SENSOR_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

public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1

The standard reference illuminant used as the scene light source when calculating the android.sensor.colorTransform1, android.sensor.calibrationTransform1, and android.sensor.forwardMatrix1 matrices.

The values in this tag correspond to the values defined for the EXIF LightSource tag. These illuminants are standard light sources that are often used calibrating camera devices.

If this tag is present, then android.sensor.colorTransform1, android.sensor.calibrationTransform1, and android.sensor.forwardMatrix1 will also be present.

Some devices may choose to provide a second set of calibration information for improved quality, including android.sensor.referenceIlluminant2 and its corresponding matrices.

public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2

The standard reference illuminant used as the scene light source when calculating the android.sensor.colorTransform2, android.sensor.calibrationTransform2, and android.sensor.forwardMatrix2 matrices.

See android.sensor.referenceIlluminant1 for more details. Valid values for this are the same as those given for the first reference illuminant.

If this tag is present, then android.sensor.colorTransform2, android.sensor.calibrationTransform2, and android.sensor.forwardMatrix2 will also be present.

public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES

The face detection modes that are available for this camera device.

OFF is always supported.

SIMPLE means the device supports the android.statistics.faceRectangles and android.statistics.faceScores outputs.

FULL means the device additionally supports the android.statistics.faceIds and android.statistics.faceLandmarks outputs.

public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES

The set of hot pixel map output modes supported by this camera device.

This tag lists valid output modes for android.statistics.hotPixelMapMode.

If no hotpixel map is available for this camera device, this will contain only OFF. If the hotpixel map is available, this will include both the ON and OFF options.

public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT

The maximum number of simultaneously detectable faces.

public static final Key<Integer> SYNC_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 (by setting android.sync.frameNumber to a non-negative value).

This defines the maximum distance (in number of metadata results), between android.sync.frameNumber and the equivalent android.request.frameCount.

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.

For example if the distance was 2,

initial request = X (repeating)
 request1 = X
 request2 = Y
 request3 = Y
 request4 = Y

 where requestN has frameNumber N, and the first of the repeating
 initial request's has frameNumber F (and F < 1).

 initial result = X' + { android.sync.frameNumber == F }
 result1 = X' + { android.sync.frameNumber == F }
 result2 = X' + { android.sync.frameNumber == CONVERGING }
 result3 = X' + { android.sync.frameNumber == CONVERGING }
 result4 = X' + { android.sync.frameNumber == 2 }

 where resultN has frameNumber N.
 

Since result4 has a frameNumber == 4 and android.sync.frameNumber == 2, the distance is clearly 4 - 2 = 2.

public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES

The set of tonemapping modes supported by this camera device.

This tag lists the valid modes for android.tonemap.mode.

Full-capability camera devices must always support CONTRAST_CURVE and FAST.

See Also

public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS

Maximum number of supported points in the tonemap curve that can be used for android.tonemap.curve.

If the actual number of points provided by the application (in android.tonemap.curve*) is less than max, the camera device will resample the curve to its internal representation, using linear interpolation.

The output curves in the result metadata may have a different number of points than the input curves, and will represent the actual hardware curves used as closely as possible when linearly interpolated.

See Also

Public Methods

public T get (Key<T> key)

Get a camera characteristics field value.

The field definitions can be found in CameraCharacteristics.

Querying the value for the same key more than once will return a value which is equal to the previous queried value.

Parameters
key The characteristics field to read.
Returns
  • The value of that key, or null if the field is not set.
Throws
IllegalArgumentException if the key was not valid

public List<Key<?>> getAvailableCaptureRequestKeys ()

Returns the list of keys supported by this CameraDevice for querying with a CaptureRequest.

The list returned is not modifiable, so any attempts to modify it will throw a UnsupportedOperationException.

Each key is only listed once in the list. The order of the keys is undefined.

Note that there is no getAvailableCameraCharacteristicsKeys() -- use getKeys() instead.

Returns
  • List of keys supported by this CameraDevice for CaptureRequests.

public List<Key<?>> getAvailableCaptureResultKeys ()

Returns the list of keys supported by this CameraDevice for querying with a CaptureResult.

The list returned is not modifiable, so any attempts to modify it will throw a UnsupportedOperationException.

Each key is only listed once in the list. The order of the keys is undefined.

Note that there is no getAvailableCameraCharacteristicsKeys() -- use getKeys() instead.

Returns
  • List of keys supported by this CameraDevice for CaptureResults.

public List<Key<?>> getKeys ()

Returns a list of the keys contained in this map.

The list returned is not modifiable, so any attempts to modify it will throw a UnsupportedOperationException.

All values retrieved by a key from this list with #get are guaranteed to be non-null. Each key is only listed once in the list. The order of the keys is undefined.

Returns
  • List of the keys contained in this map.