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

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

Introduction

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

The text is from its open source code.

Field

KeyCOLOR_CORRECTION_MODE

The mode control selects how the image data is converted from the sensor's native color into linear sRGB color.

When auto-white balance (AWB) is enabled with CaptureRequest#CONTROL_AWB_MODE android.control.awbMode , this control is overridden by the AWB routine.

KeyCOLOR_CORRECTION_TRANSFORM

A color transform matrix to use to transform from sensor RGB color space to output linear sRGB color space.

This matrix is either set by the camera device when the request CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode is not TRANSFORM_MATRIX, or directly by the application in the request when the CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode is TRANSFORM_MATRIX.

In the latter case, the camera device may round the matrix to account for precision issues; the final rounded matrix should be reported back in this matrix result metadata.

KeyCOLOR_CORRECTION_GAINS

Gains applying to Bayer raw color channels for white-balance.

These per-channel gains are either set by the camera device when the request CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode is not TRANSFORM_MATRIX, or directly by the application in the request when the CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode is TRANSFORM_MATRIX.

The gains in the result metadata are the gains actually applied by the camera device to the current frame.

The valid range of gains varies on different devices, but gains between [1.0, 3.0] are guaranteed not to be clipped.

KeyCONTROL_AE_EXPOSURE_COMPENSATION

Adjustment to auto-exposure (AE) target image brightness.

The adjustment is measured as a count of steps, with the step size defined by CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep and the allowed range by CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange .

For example, if the exposure value (EV) step is 0.333, '6' will mean an exposure compensation of +2 EV; -3 will mean an exposure compensation of -1 EV.

KeyCONTROL_AE_LOCK

Whether auto-exposure (AE) is currently locked to its latest calculated values.

When set to true (ON), the AE algorithm is locked to its latest parameters, and will not change exposure settings until the lock is set to false (OFF).

Note that even when AE is locked, the flash may be fired if the CaptureRequest#CONTROL_AE_MODE android.control.aeMode is ON_AUTO_FLASH / ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.

When CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation is changed, even if the AE lock is ON, the camera device will still adjust its exposure value.

If AE precapture is triggered (see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger ) when AE is already locked, the camera device will not change the exposure time ( CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime ) and sensitivity ( CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity ) parameters.

KeyCONTROL_AE_MODE

The desired mode for the camera device's auto-exposure routine.

This control is only effective if CaptureRequest#CONTROL_MODE android.control.mode is AUTO.

When set to any of the ON modes, the camera device's auto-exposure routine is enabled, overriding the application's selected exposure time, sensor sensitivity, and frame duration ( CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime , CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity , and CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration ).

KeyCONTROL_AE_REGIONS

List of metering areas to use for auto-exposure adjustment.

Not available if CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe is 0.

KeyCONTROL_AE_TARGET_FPS_RANGE

Range over which the auto-exposure routine can adjust the capture frame rate to maintain good exposure.

Only constrains auto-exposure (AE) algorithm, not manual control of CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime and CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration .

Units: Frames per second (FPS)

Range of valid values:
Any of the entries in CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges

This key is available on all devices.

KeyCONTROL_AE_PRECAPTURE_TRIGGER

Whether the camera device will trigger a precapture metering sequence when it processes this request.

This entry is normally set to IDLE, or is not included at all in the request settings.

KeyCONTROL_AF_MODE

Whether auto-focus (AF) is currently enabled, and what mode it is set to.

Only effective if CaptureRequest#CONTROL_MODE android.control.mode = AUTO and the lens is not fixed focus (i.e.

KeyCONTROL_AF_REGIONS

List of metering areas to use for auto-focus.

Not available if CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf is 0.

KeyCONTROL_AF_TRIGGER

Whether the camera device will trigger autofocus for this request.

This entry is normally set to IDLE, or is not included at all in the request settings.

When included and set to START, the camera device will trigger the autofocus algorithm.

KeyCONTROL_AWB_LOCK

Whether auto-white balance (AWB) is currently locked to its latest calculated values.

When set to true (ON), the AWB algorithm is locked to its latest parameters, and will not change color balance settings until the lock is set to false (OFF).

Since the camera device has a pipeline of in-flight requests, the settings that get locked do not necessarily correspond to the settings that were present in the latest capture result received from the camera device, since additional captures and AWB updates may have occurred even before the result was sent out.

KeyCONTROL_AWB_MODE

Whether auto-white balance (AWB) is currently setting the color transform fields, and what its illumination target is.

This control is only effective if CaptureRequest#CONTROL_MODE android.control.mode is AUTO.

When set to the ON mode, the camera device's auto-white balance routine is enabled, overriding the application's selected CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform , CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains and CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode .

KeyCONTROL_AWB_REGIONS

List of metering areas to use for auto-white-balance illuminant estimation.

Not available if CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb is 0.

KeyCONTROL_CAPTURE_INTENT

Information to the camera device 3A (auto-exposure, auto-focus, auto-white balance) routines about the purpose of this capture, to help the camera device to decide optimal 3A strategy.

This control (except for MANUAL) is only effective if CaptureRequest#CONTROL_MODE android.control.mode != OFF and any 3A routine is active.

All intents are supported by all devices, except that: * ZERO_SHUTTER_LAG will be supported if CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities contains PRIVATE_REPROCESSING or YUV_REPROCESSING.

KeyCONTROL_EFFECT_MODE

A special color effect to apply.

When this mode is set, a color effect will be applied to images produced by the camera device.

KeyCONTROL_MODE

Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control routines.

This is a top-level 3A control switch.

KeyCONTROL_SCENE_MODE

Control for which scene mode is currently active.

Scene modes are custom camera modes optimized for a certain set of conditions and capture settings.

This is the mode that that is active when CaptureRequest#CONTROL_MODE android.control.mode == USE_SCENE_MODE.

KeyEDGE_MODE

Operation mode for edge enhancement.

Edge enhancement improves sharpness and details in the captured image.

KeyFLASH_MODE

The desired mode for for the camera device's flash control.

This control is only effective when flash unit is available ( CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available == true).

When this control is used, the CaptureRequest#CONTROL_AE_MODE android.control.aeMode must be set to ON or OFF.

KeyHOT_PIXEL_MODE

Operational mode for hot pixel correction.

Hotpixel correction interpolates out, or otherwise removes, pixels that do not accurately measure the incoming light (i.e.

KeyJPEG_GPS_LOCATION

A location object to use when generating image GPS metadata.

Setting a location object in a request will include the GPS coordinates of the location into any JPEG images captured based on the request.

KeyJPEG_ORIENTATION

The orientation for a JPEG image.

The clockwise rotation angle in degrees, relative to the orientation to the camera, that the JPEG picture needs to be rotated by, to be viewed upright.

Camera devices may either encode this value into the JPEG EXIF header, or rotate the image data to match this orientation.

KeyJPEG_QUALITY

Compression quality of the final JPEG image.

85-95 is typical usage range.

Range of valid values:
1-100; larger is higher quality

This key is available on all devices.

KeyLENS_FOCUS_DISTANCE

Desired distance to plane of sharpest focus, measured from frontmost surface of the lens.

This control can be used for setting manual focus, on devices that support the MANUAL_SENSOR capability and have a variable-focus lens (see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance ).

A value of 0.0f means infinity focus.

KeyLENS_OPTICAL_STABILIZATION_MODE

Sets whether the camera device uses optical image stabilization (OIS) when capturing images.

OIS is used to compensate for motion blur due to small movements of the camera during capture.

KeyNOISE_REDUCTION_MODE

Mode of operation for the noise reduction algorithm.

The noise reduction algorithm attempts to improve image quality by removing excessive noise added by the capture process, especially in dark conditions.

OFF means no noise reduction will be applied by the camera device, for both raw and YUV domain.

MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove demosaicing or other processing artifacts.

KeySCALER_CROP_REGION

The desired region of the sensor to read out for this capture.

This control can be used to implement digital zoom.

For devices not supporting CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode control, the coordinate system always follows that of CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize , with (0, 0) being the top-left pixel of the active array.

For devices supporting CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode control, the coordinate system depends on the mode being set.

KeySENSOR_EXPOSURE_TIME

Duration each pixel is exposed to light.

If the sensor can't expose this exact duration, it will shorten the duration exposed to the nearest possible value (rather than expose longer).

KeySENSOR_FRAME_DURATION

Duration from start of frame exposure to start of next frame exposure.

The maximum frame rate that can be supported by a camera subsystem is a function of many factors:

  • Requested resolutions of output image streams
  • Availability of binning / skipping modes on the imager
  • The bandwidth of the imager interface
  • The bandwidth of the various ISP processing blocks

Since these factors can vary greatly between different ISPs and sensors, the camera abstraction tries to represent the bandwidth restrictions with as simple a model as possible.

The model presented has the following characteristics:

  • The image sensor is always configured to output the smallest resolution possible given the application's requested output stream sizes.
KeySENSOR_SENSITIVITY

The amount of gain applied to sensor data before processing.

The sensitivity is the standard ISO sensitivity value, as defined in ISO 12232:2006.

The sensitivity must be within CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange , and if if it less than CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity , the camera device is guaranteed to use only analog amplification for applying the gain.

If the camera device cannot apply the exact sensitivity requested, it will reduce the gain to the nearest supported value.

KeySTATISTICS_FACE_DETECT_MODE

Operating mode for the face detector unit.

Whether face detection is enabled, and whether it should output just the basic fields or the full set of fields.

Possible values:

  • #STATISTICS_FACE_DETECT_MODE_OFF OFF
  • #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE
  • #STATISTICS_FACE_DETECT_MODE_FULL FULL

Available values for this device:
CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes

This key is available on all devices.

KeySTATISTICS_LENS_SHADING_MAP_MODE

Whether the camera device will output the lens shading map in output result metadata.

When set to ON, android.statistics.lensShadingMap will be provided in the output result metadata.

ON is always supported on devices with the RAW capability.

Possible values:

  • #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF
  • #STATISTICS_LENS_SHADING_MAP_MODE_ON ON

Available values for this device:
CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES android.statistics.info.availableLensShadingMapModes

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

KeyTONEMAP_CURVE

Tonemapping / contrast / gamma curve to use when CaptureRequest#TONEMAP_MODE android.tonemap.mode is CONTRAST_CURVE.

The tonemapCurve consist of three curves for each of red, green, and blue channels respectively.

KeyTONEMAP_GAMMA

Tonemapping curve to use when CaptureRequest#TONEMAP_MODE android.tonemap.mode is GAMMA_VALUE

The tonemap curve will be defined the following formula: * OUT = pow(IN, 1.0 / gamma) where IN and OUT is the input pixel value scaled to range [0.0, 1.0], pow is the power function and gamma is the gamma value specified by this key.

The same curve will be applied to all color channels.

Method

ObjectgetTag()
Retrieve the tag for this request, if any.