Skip to content
com.iristick.smartglass.core.camera

Class CaptureRequest


public abstract class CaptureRequest
extends Object

This class contains all the settings and outputs needed to capture a single image from a camera.

Objects of this class are immutable. To construct one object, use a CaptureRequest.Builder obtained from CameraDevice.createCaptureRequest(int).

Nested Class Summary

Modifier and Type Class and Description
static class  CaptureRequest.Builder
This class allows to construct immutable capture requests.
static class  CaptureRequest.Key<T>
This class allows to define type-safe keys to designate capture request fields.

Field Summary

Modifier and Type Field and Description
static CaptureRequest.Key<Float> COLOR_CORRECTION_GAIN_BLUE
Gain applied to the blue Bayer raw color channel for white-balance.
static CaptureRequest.Key<Float> COLOR_CORRECTION_GAIN_RED
Gain applied to the red Bayer raw color channel for white-balance.
static CaptureRequest.Key<Integer> CONTROL_AE_MODE
The desired mode for the camera's auto-exposure routine.
static int CONTROL_AE_MODE_OFF
Disables the camera's auto-exposure routine.
static int CONTROL_AE_MODE_ON
Enables the camera's auto-exposure routine.
static CaptureRequest.Key<Integer> CONTROL_AF_MODE
The desired mode for the camera device's auto-focus routine.
static int CONTROL_AF_MODE_AUTO
Basic automatic focus mode.
static int CONTROL_AF_MODE_CONTINUOUS_PICTURE
In this mode, the AF algorithm modifies the lens position continually to attempt to provide a constantly-in-focus image stream.
static int CONTROL_AF_MODE_LASER_ASSISTED
Laser-assisted automatic focus mode.
static int CONTROL_AF_MODE_OFF
The auto-focus routine does not control the lens; LENS_FOCUS_DISTANCE is controlled by the application.
static CaptureRequest.Key<Integer> CONTROL_AF_TRIGGER
Whether the camera device will trigger autofocus for this request.
static int CONTROL_AF_TRIGGER_CANCEL
Autofocus will return to its initial state, and cancel any currently active trigger.
static int CONTROL_AF_TRIGGER_IDLE
The trigger is idle.
static int CONTROL_AF_TRIGGER_START
Autofocus will trigger now.
static CaptureRequest.Key<Integer> CONTROL_AWB_MODE
The desired mode for the camera's auto-white balance routine.
static int CONTROL_AWB_MODE_AUTO
Enables the camera's auto-white balance routine.
static int CONTROL_AWB_MODE_OFF
Disables the camera's auto-white balance routine.
static CaptureRequest.Key<Integer> CONTROL_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.
static int CONTROL_CAPTURE_INTENT_CUSTOM
The goal of this request doesn't fall into the other categories.
static int CONTROL_CAPTURE_INTENT_PREVIEW
This request is for a preview-like use case.
static int CONTROL_CAPTURE_INTENT_STILL_CAPTURE
This request is for a still capture-type use case.
static int CONTROL_CAPTURE_INTENT_VIDEO_RECORD
This request is for a video recording use case.
static CaptureRequest.Key<Integer> FORMAT
Deprecated. 
The use of the RAW_PRIVATE surface format is deprecated.
static int FORMAT_JPEG
Deprecated. 
The use of the RAW_PRIVATE surface format is deprecated.
static int FORMAT_Y8
Deprecated. 
The use of the RAW_PRIVATE surface format is deprecated.
static int FORMAT_YUY2
Deprecated. 
The use of the RAW_PRIVATE surface format is deprecated.
static CaptureRequest.Key<Float> LENS_FOCUS_DISTANCE
Desired distance to plane of sharpest focus.
static CaptureRequest.Key<Integer> POSTPROCESS_BARCODE_COUNT
Whether the camera device should try to discover and decode barcodes for this request.
static String POSTPROCESS_BARCODE_FORMAT_AZTEC
Format value for Aztec barcodes.
static String POSTPROCESS_BARCODE_FORMAT_CODABAR
Format value for Codabar barcodes.
static String POSTPROCESS_BARCODE_FORMAT_CODE_128
Format value for Code 128 barcodes.
static String POSTPROCESS_BARCODE_FORMAT_CODE_39
Format value for Code 39 barcodes.
static String POSTPROCESS_BARCODE_FORMAT_CODE_93
Format value for Code 93 barcodes.
static String POSTPROCESS_BARCODE_FORMAT_DATA_MATRIX
Format value for Data Matrix codes.
static String POSTPROCESS_BARCODE_FORMAT_EAN_13
Format value for EAN-13 barcodes.
static String POSTPROCESS_BARCODE_FORMAT_EAN_8
Format value for EAN-8 barcodes.
static String POSTPROCESS_BARCODE_FORMAT_ITF
Format value for ITF barcodes.
static String POSTPROCESS_BARCODE_FORMAT_PDF_417
Format value for PDF 417 barcodes.
static String POSTPROCESS_BARCODE_FORMAT_QR_CODE
Format value for QR codes.
static String POSTPROCESS_BARCODE_FORMAT_RSS_14
Format value for RSS-14 barcodes.
static String POSTPROCESS_BARCODE_FORMAT_RSS_EXPANDED
Format value for RSS-Expanded barcodes.
static String POSTPROCESS_BARCODE_FORMAT_UPC_A
Format value for UPC-A barcodes.
static String POSTPROCESS_BARCODE_FORMAT_UPC_E
Format value for UPC-E barcodes.
static CaptureRequest.Key<String[]> POSTPROCESS_BARCODE_FORMATS
Set of barcode formats the camera should try to decode for this request.
static CaptureRequest.Key<Point> POSTPROCESS_BARCODE_TARGET
Target location for barcode discovery.
static CaptureRequest.Key<Float> POSTPROCESS_BARCODE_TARGET_TOLERANCE
Tolerance for the target location for barcode discovery.
static CaptureRequest.Key<Integer> POSTPROCESS_MODE
How the camera device will perform post processing operations for this request.
static int POSTPROCESS_MODE_ASYNCHRONOUS
Value for asynchronous post processing mode
static int POSTPROCESS_MODE_IMMEDIATE
Value for immediate post processing mode
static CaptureRequest.Key<Point> SCALER_OFFSET
Offset of the digitally zoomed image with respect to the sensor center.
static CaptureRequest.Key<Float> SCALER_ZOOM
Digital zoom level.
static CaptureRequest.Key<Long> SENSOR_EXPOSURE_TIME
Duration each pixel is exposed to light.
static CaptureRequest.Key<Long> SENSOR_FRAME_DURATION
Desired duration from start of frame exposure to start of next frame exposure.
static CaptureRequest.Key<Float> SENSOR_GAIN
Analog gain.

Constructor Summary

Constructor and Description
CaptureRequest() 

Method Summary

Modifier and Type Method and Description
abstract boolean containsKey(CaptureRequest.Key<?> key)
Determine whether this capture request has a value set for key.
abstract <T> T get(CaptureRequest.Key<T> key)
Get a capture request field value.
<T> T get(CaptureRequest.Key<T> key, T defaultValue)
Get a capture request field value.
abstract List<CaptureRequest.Key<?>> getKeys()
Return a list of the keys contained in this map.
abstract Object getTag()
Retrieve the tag for this request, if any.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

CONTROL_CAPTURE_INTENT

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

Possible values:

CONTROL_CAPTURE_INTENT_CUSTOM

public static final int CONTROL_CAPTURE_INTENT_CUSTOM
The goal of this request doesn't fall into the other categories. The camera device will default to preview-like behavior.
See Also:
CONTROL_CAPTURE_INTENT

CONTROL_CAPTURE_INTENT_PREVIEW

public static final int CONTROL_CAPTURE_INTENT_PREVIEW
This request is for a preview-like use case.
See Also:
CONTROL_CAPTURE_INTENT

CONTROL_CAPTURE_INTENT_STILL_CAPTURE

public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE
This request is for a still capture-type use case.
See Also:
CONTROL_CAPTURE_INTENT

CONTROL_CAPTURE_INTENT_VIDEO_RECORD

public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD
This request is for a video recording use case.
See Also:
CONTROL_CAPTURE_INTENT

FORMAT

@Deprecated
public static final CaptureRequest.Key<Integer> FORMAT
Deprecated. The use of the RAW_PRIVATE surface format is deprecated.

The format to output to any surface with format RAW_PRIVATE.

This field should only be set when one of the targets is an ImageReader configured with format RAW_PRIVATE.

Possible values:

FORMAT_JPEG

@Deprecated
public static final int FORMAT_JPEG
Deprecated. The use of the RAW_PRIVATE surface format is deprecated.
Compressed JPEG format.
See Also:
FORMAT

FORMAT_YUY2

@Deprecated
public static final int FORMAT_YUY2
Deprecated. The use of the RAW_PRIVATE surface format is deprecated.
Uncompressed YUYV (YUY2) format, i.e., 4:2:2 interleaved YCbCr.
See Also:
FORMAT

FORMAT_Y8

@Deprecated
public static final int FORMAT_Y8
Deprecated. The use of the RAW_PRIVATE surface format is deprecated.
Single-channel luminance only (8 bits per pixel).
See Also:
FORMAT

SCALER_ZOOM

public static final CaptureRequest.Key<Float> SCALER_ZOOM

Digital zoom level.

See Also:
CameraCharacteristics.SCALER_MAX_ZOOM

SCALER_OFFSET

public static final CaptureRequest.Key<Point> SCALER_OFFSET

Offset of the digitally zoomed image with respect to the sensor center.

Units:
Pixels

SENSOR_FRAME_DURATION

public static final CaptureRequest.Key<Long> SENSOR_FRAME_DURATION

Desired duration from start of frame exposure to start of next frame exposure. The real frame duration might be higher or lower.

Units:
Nanoseconds

See Also:
CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP, CameraCharacteristics.SENSOR_MAX_FRAME_DURATION

CONTROL_AWB_MODE

public static final CaptureRequest.Key<Integer> CONTROL_AWB_MODE

The desired mode for the camera's auto-white balance routine.

When set to the AUTO mode, the camera's auto-white balance routine is enabled, overriding the application's selected COLOR_CORRECTION_GAIN_BLUE and COLOR_CORRECTION_GAIN_RED.

When set to the OFF mode, the camera's auto-white balance routine is disabled. The application manually controls the white balance with COLOR_CORRECTION_GAIN_BLUE and COLOR_CORRECTION_GAIN_RED.

Possible values:

Since:
1.2
See Also:
CameraCharacteristics.CONTROL_AWB_AVAILABLE_MODES

CONTROL_AWB_MODE_OFF

public static final int CONTROL_AWB_MODE_OFF
Disables the camera's auto-white balance routine.
Since:
1.2
See Also:
CONTROL_AWB_MODE

CONTROL_AWB_MODE_AUTO

public static final int CONTROL_AWB_MODE_AUTO
Enables the camera's auto-white balance routine.
Since:
1.2
See Also:
CONTROL_AWB_MODE

COLOR_CORRECTION_GAIN_BLUE

public static final CaptureRequest.Key<Float> COLOR_CORRECTION_GAIN_BLUE

Gain applied to the blue Bayer raw color channel for white-balance.

This gain value is relative to the gain applied to the green Bayer raw color channel. If this control is set, COLOR_CORRECTION_GAIN_RED should also be set.

This control is ignored if CONTROL_AWB_MODE is not OFF.

Units:
Unit-less (multiplier)

Since:
1.2

COLOR_CORRECTION_GAIN_RED

public static final CaptureRequest.Key<Float> COLOR_CORRECTION_GAIN_RED

Gain applied to the red Bayer raw color channel for white-balance.

This gain value is relative to the gain applied to the green Bayer raw color channel. If this control is set, COLOR_CORRECTION_GAIN_BLUE should also be set.

This control is ignored if CONTROL_AWB_MODE is not OFF.

Units:
Unit-less (multiplier)

Since:
1.2

CONTROL_AE_MODE

public static final CaptureRequest.Key<Integer> CONTROL_AE_MODE

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

Possible values:

See Also:
CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES

CONTROL_AE_MODE_OFF

public static final int CONTROL_AE_MODE_OFF
Disables the camera's auto-exposure routine.
See Also:
CONTROL_AE_MODE

CONTROL_AE_MODE_ON

public static final int CONTROL_AE_MODE_ON
Enables the camera's auto-exposure routine.
See Also:
CONTROL_AE_MODE

SENSOR_EXPOSURE_TIME

public static final CaptureRequest.Key<Long> SENSOR_EXPOSURE_TIME

Duration each pixel is exposed to light.

This control is ignored if CONTROL_AE_MODE is ON.

Units:
Nanoseconds

See Also:
CameraCharacteristics.SENSOR_MIN_EXPOSURE_TIME, CameraCharacteristics.SENSOR_MAX_EXPOSURE_TIME

SENSOR_GAIN

public static final CaptureRequest.Key<Float> SENSOR_GAIN

Analog gain.

This control is ignored if CONTROL_AE_MODE is ON.

Units:
Unit-less (multiplier)

See Also:
CameraCharacteristics.SENSOR_MAX_GAIN

CONTROL_AF_MODE

public static final CaptureRequest.Key<Integer> CONTROL_AF_MODE

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

Possible values:

See Also:
CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES

CONTROL_AF_MODE_OFF

public static final int CONTROL_AF_MODE_OFF
The auto-focus routine does not control the lens; LENS_FOCUS_DISTANCE is controlled by the application.
See Also:
CONTROL_AF_MODE

CONTROL_AF_MODE_AUTO

public static final int CONTROL_AF_MODE_AUTO

Basic automatic focus mode.

In this mode, the lens does not move unless the autofocus trigger action is called.

See Also:
CONTROL_AF_MODE

CONTROL_AF_MODE_CONTINUOUS_PICTURE

public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE

In this mode, the AF algorithm modifies the lens position continually to attempt to provide a constantly-in-focus image stream.

The focusing behavior is suitable for still image capture. This usually means focusing as fast as possible.

See Also:
CONTROL_AF_MODE

CONTROL_AF_MODE_LASER_ASSISTED

public static final int CONTROL_AF_MODE_LASER_ASSISTED

Laser-assisted automatic focus mode.

In this mode, the lens does not move unless the autofocus trigger action is called. The laser is then briefly fired to estimate the distance to the target object and set focus appropriately.

This mode is not available on all headsets. Always ensure the availability of this mode by checking CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES.

See Also:
CONTROL_AF_MODE

CONTROL_AF_TRIGGER

public static final CaptureRequest.Key<Integer> CONTROL_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. If autofocus is disabled, this trigger has no effect.

When set to CANCEL, the camera device will cancel any active trigger, and return to its initial AF state.

Generally, applications should set this entry to START or CANCEL for only a single capture, and then return it to IDLE (or not set at all). Specifying START for multiple captures in a row means restarting the AF operation over and over again.

Autofocus cannot be triggered for still captures (i.e., CONTROL_CAPTURE_INTENT set to STILL_CAPTURE).

See CONTROL_AF_STATE for what the trigger means for each AF mode.

Possible values:

See Also:
CaptureResult.CONTROL_AF_STATE

CONTROL_AF_TRIGGER_IDLE

public static final int CONTROL_AF_TRIGGER_IDLE
The trigger is idle.
See Also:
CONTROL_AF_TRIGGER

CONTROL_AF_TRIGGER_START

public static final int CONTROL_AF_TRIGGER_START
Autofocus will trigger now.
See Also:
CONTROL_AF_TRIGGER

CONTROL_AF_TRIGGER_CANCEL

public static final int CONTROL_AF_TRIGGER_CANCEL
Autofocus will return to its initial state, and cancel any currently active trigger.
See Also:
CONTROL_AF_TRIGGER

LENS_FOCUS_DISTANCE

public static final CaptureRequest.Key<Float> LENS_FOCUS_DISTANCE

Desired distance to plane of sharpest focus.

A value of 0.0f means infinity focus.

This control is ignored if CONTROL_AF_MODE is set to AUTO.

Units:
Diopters (1/meter)

See Also:
CameraCharacteristics.LENS_SHORTEST_FOCUS_DISTANCE

POSTPROCESS_MODE

public static final CaptureRequest.Key<Integer> POSTPROCESS_MODE

How the camera device will perform post processing operations for this request.

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

When not included or set to IMMEDIATE, the camera device will immediately post-process a request once its image has been captured. Further requests are postponed until all post-processing is finished. This mode ensures all images are post processed, at the potential cost of dropping frames if processing takes a long time.
Immediate post processing is especially useful when post processing still captures.

When set to ASYNCHRONOUS, post processing jobs are executed asynchronously. In this mode, post processing does not delay the arrival of frames and their delivery to the output surfaces. Frames are enqueued separately for post processing. The post processing queue has a finite capacity. When this queue is full, frames may be skipped for processing. Nonetheless, skipped frames are still delivered to the output surfaces.
Asynchronous post processing is especially useful when post processing repeated captures for recording or showing a camera preview as it avoids stuttering.

Possible values:

Since:
1.2

POSTPROCESS_MODE_IMMEDIATE

public static final int POSTPROCESS_MODE_IMMEDIATE
Value for immediate post processing mode
Since:
1.2
See Also:
POSTPROCESS_MODE

POSTPROCESS_MODE_ASYNCHRONOUS

public static final int POSTPROCESS_MODE_ASYNCHRONOUS
Value for asynchronous post processing mode
Since:
1.2
See Also:
POSTPROCESS_MODE

POSTPROCESS_BARCODE_COUNT

public static final CaptureRequest.Key<Integer> POSTPROCESS_BARCODE_COUNT

Whether the camera device should try to discover and decode barcodes for this request.

When not included or set to 0, the camera device does not try to detect and decode barcodes.

When set to a positive, non-zero integer, the camera device tries to detect and decode barcodes. The expected barcode format may be set with POSTPROCESS_BARCODE_FORMATS.

Possible values: A positive integer up to and including MAXIMUM_BARCODE_COUNT Larger values are silently clamped to MAXIMUM_BARCODE_COUNT.

Since:
1.2

POSTPROCESS_BARCODE_FORMATS

public static final CaptureRequest.Key<String[]> POSTPROCESS_BARCODE_FORMATS

Set of barcode formats the camera should try to decode for this request.

When not included or set to an empty array, a subset of most common bar codes is enabled.

This control is ignored if POSTPROCESS_BARCODE_COUNT is set to 0.

Note

Enabling more formats may increase the required processing time.

Possible values:

Not all formats are available on all headsets. Always ensure the availability of your requested format by checking CameraCharacteristics.POSTPROCESS_AVAILABLE_BARCODE_FORMATS.

Since:
1.2

POSTPROCESS_BARCODE_FORMAT_CODE_39

public static final String POSTPROCESS_BARCODE_FORMAT_CODE_39
Format value for Code 39 barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_CODE_93

public static final String POSTPROCESS_BARCODE_FORMAT_CODE_93
Format value for Code 93 barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_CODE_128

public static final String POSTPROCESS_BARCODE_FORMAT_CODE_128
Format value for Code 128 barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_EAN_8

public static final String POSTPROCESS_BARCODE_FORMAT_EAN_8
Format value for EAN-8 barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_EAN_13

public static final String POSTPROCESS_BARCODE_FORMAT_EAN_13
Format value for EAN-13 barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_UPC_A

public static final String POSTPROCESS_BARCODE_FORMAT_UPC_A
Format value for UPC-A barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_UPC_E

public static final String POSTPROCESS_BARCODE_FORMAT_UPC_E
Format value for UPC-E barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_CODABAR

public static final String POSTPROCESS_BARCODE_FORMAT_CODABAR
Format value for Codabar barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_ITF

public static final String POSTPROCESS_BARCODE_FORMAT_ITF
Format value for ITF barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_RSS_14

public static final String POSTPROCESS_BARCODE_FORMAT_RSS_14
Format value for RSS-14 barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_RSS_EXPANDED

public static final String POSTPROCESS_BARCODE_FORMAT_RSS_EXPANDED
Format value for RSS-Expanded barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_QR_CODE

public static final String POSTPROCESS_BARCODE_FORMAT_QR_CODE
Format value for QR codes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_DATA_MATRIX

public static final String POSTPROCESS_BARCODE_FORMAT_DATA_MATRIX
Format value for Data Matrix codes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_PDF_417

public static final String POSTPROCESS_BARCODE_FORMAT_PDF_417
Format value for PDF 417 barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_FORMAT_AZTEC

public static final String POSTPROCESS_BARCODE_FORMAT_AZTEC
Format value for Aztec barcodes.
Since:
1.2
See Also:
POSTPROCESS_BARCODE_FORMATS

POSTPROCESS_BARCODE_TARGET

public static final CaptureRequest.Key<Point> POSTPROCESS_BARCODE_TARGET

Target location for barcode discovery.

When included, this control defines the location within a camera frame where the barcode discovery routine starts looking for barcodes.

When not included, the target is set to the center of the camera frame.

This control is ignored if POSTPROCESS_BARCODE_COUNT is set to 0.

Possible values: The coordinates must define a valid point within the camera frame.

Since:
1.2
See Also:
POSTPROCESS_BARCODE_COUNT, POSTPROCESS_BARCODE_TARGET_TOLERANCE

POSTPROCESS_BARCODE_TARGET_TOLERANCE

public static final CaptureRequest.Key<Float> POSTPROCESS_BARCODE_TARGET_TOLERANCE

Tolerance for the target location for barcode discovery.

When included, defines the maximum distance between a potential barcode and the target location defined by POSTPROCESS_BARCODE_TARGET. Barcodes that are further away are ignored.

When set to 0, the target location must be within the bounds of the found barcode.

When not included, disables distance checking for potential barcodes. The barcodes may be located anywhere within the camera frame, regardless of their distance to the barcode target.

Possible values: Any positive floating point number, including Float.POSITIVE_INFINITY.

Units:
Unit-less; factor relative to the found barcode size.

Since:
1.2
See Also:
POSTPROCESS_BARCODE_COUNT, POSTPROCESS_BARCODE_TARGET

Constructor Detail

CaptureRequest

public CaptureRequest()

Method Detail

getTag

@CheckResult
 @Nullable
public abstract Object getTag()

Retrieve the tag for this request, if any.

Tags allow easy identification of a capture request. They are not used by the camera device.

Returns:
The last tag object set on this request, or null if no tag has been set.

get

@CheckResult
 @Nullable
public abstract <T> T get(@NonNull
                                                  CaptureRequest.Key<T> key)
Get a capture request field value.
Type Parameters:
T - The key type.
Parameters:
key - The field to read (keys are defined as constants in CaptureRequest.
Returns:
The value of the key, or null if the field is not set.

get

@CheckResult
 @NonNull
public <T> T get(@NonNull
                                        CaptureRequest.Key<T> key,
                                        @NonNull
                                        T defaultValue)
Get a capture request field value.
Type Parameters:
T - The key type.
Parameters:
key - The field to read (keys are defined as constants in CaptureRequest.
defaultValue - The default value to return if the field is not set.
Returns:
The value of the key, or defaultValue if the field is not set.

getKeys

@CheckResult
 @NonNull
public abstract List<CaptureRequest.Key<?>> getKeys()

Return a list of the keys contained in this map.

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

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

Returns:
A list of the keys contained in this capture request.

containsKey

@CheckResult
public abstract boolean containsKey(@NonNull
                                                 CaptureRequest.Key<?> key)
Determine whether this capture request has a value set for key.
Parameters:
key - The field to check.
Returns:
Whether this map contains a value for key.