Freigeben über


CaptureRequest Class

Definition

An immutable package of settings and outputs needed to capture a single image from the camera device.

[Android.Runtime.Register("android/hardware/camera2/CaptureRequest", DoNotGenerateAcw=true)]
public sealed class CaptureRequest : Android.Hardware.Camera2.CameraMetadata, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/hardware/camera2/CaptureRequest", DoNotGenerateAcw=true)>]
type CaptureRequest = class
    inherit CameraMetadata
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
CaptureRequest
Attributes
Implements

Remarks

An immutable package of settings and outputs needed to capture a single image from the camera device.

Contains the configuration for the capture hardware (sensor, lens, flash), the processing pipeline, the control algorithms, and the output buffers. Also contains the list of target Surfaces to send image data to for this capture.

CaptureRequests can be created by using a Builder instance, obtained by calling CameraDevice#createCaptureRequest

CaptureRequests are given to CameraCaptureSession#capture or CameraCaptureSession#setRepeatingRequest to capture images from a camera.

Each request can specify a different subset of target Surfaces for the camera to send the captured data to. All the surfaces used in a request must be part of the surface list given to the last call to CameraDevice#createCaptureSession, when the request is submitted to the session.

For example, a request meant for repeating preview might only include the Surface for the preview SurfaceView or SurfaceTexture, while a high-resolution still capture would also include a Surface from a ImageReader configured for high-resolution JPEG images.

A reprocess capture request allows a previously-captured image from the camera device to be sent back to the device for further processing. It can be created with CameraDevice#createReprocessCaptureRequest, and used with a reprocessable capture session created with CameraDevice#createReprocessableCaptureSession.

Java documentation for android.hardware.camera2.CaptureRequest.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

AutomotiveLensFacingExteriorFront
Obsolete.

The camera device faces the front of the vehicle body frame.

(Inherited from CameraMetadata)
AutomotiveLensFacingExteriorLeft
Obsolete.

The camera device faces the left side of the vehicle body frame.

(Inherited from CameraMetadata)
AutomotiveLensFacingExteriorOther
Obsolete.

The camera device faces the outside of the vehicle body frame but not exactly one of the exterior sides defined by this enum.

(Inherited from CameraMetadata)
AutomotiveLensFacingExteriorRear
Obsolete.

The camera device faces the rear of the vehicle body frame.

(Inherited from CameraMetadata)
AutomotiveLensFacingExteriorRight
Obsolete.

The camera device faces the right side of the vehicle body frame.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorOther
Obsolete.

The camera device faces the inside of the vehicle body frame but not exactly one of seats described by this enum.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow1Center
Obsolete.

The camera device faces the center seat of the first row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow1Left
Obsolete.

The camera device faces the left side seat of the first row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow1Right
Obsolete.

The camera device faces the right seat of the first row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow2Center
Obsolete.

The camera device faces the center seat of the second row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow2Left
Obsolete.

The camera device faces the left side seat of the second row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow2Right
Obsolete.

The camera device faces the right side seat of the second row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow3Center
Obsolete.

The camera device faces the center seat of the third row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow3Left
Obsolete.

The camera device faces the left side seat of the third row.

(Inherited from CameraMetadata)
AutomotiveLensFacingInteriorSeatRow3Right
Obsolete.

The camera device faces the right seat of the third row.

(Inherited from CameraMetadata)
AutomotiveLocationExteriorFront
Obsolete.

The camera device exists outside of the vehicle body frame and on its front side.

(Inherited from CameraMetadata)
AutomotiveLocationExteriorLeft
Obsolete.

The camera device exists outside and on left side of the vehicle body frame.

(Inherited from CameraMetadata)
AutomotiveLocationExteriorOther
Obsolete.

The camera exists outside of the vehicle body frame but not exactly on one of the exterior locations this enum defines.

(Inherited from CameraMetadata)
AutomotiveLocationExteriorRear
Obsolete.

The camera device exists outside of the vehicle body frame and on its rear side.

(Inherited from CameraMetadata)
AutomotiveLocationExteriorRight
Obsolete.

The camera device exists outside and on right side of the vehicle body frame.

(Inherited from CameraMetadata)
AutomotiveLocationExtraFront
Obsolete.

The camera device exists outside of the extra vehicle's body frame and on its front side.

(Inherited from CameraMetadata)
AutomotiveLocationExtraLeft
Obsolete.

The camera device exists outside and on left side of the extra vehicle body.

(Inherited from CameraMetadata)
AutomotiveLocationExtraOther
Obsolete.

The camera device exists on an extra vehicle, such as the trailer, but not exactly on one of front, rear, left, or right side.

(Inherited from CameraMetadata)
AutomotiveLocationExtraRear
Obsolete.

The camera device exists outside of the extra vehicle's body frame and on its rear side.

(Inherited from CameraMetadata)
AutomotiveLocationExtraRight
Obsolete.

The camera device exists outside and on right side of the extra vehicle body.

(Inherited from CameraMetadata)
AutomotiveLocationInterior
Obsolete.

The camera device exists inside of the vehicle cabin.

(Inherited from CameraMetadata)
ControlAfSceneChangeDetected

Scene change is detected within the AF region(s).

(Inherited from CameraMetadata)
ControlAfSceneChangeNotDetected

Scene change is not detected within the AF region(s).

(Inherited from CameraMetadata)
ControlAutoframingOff
Obsolete.

Disable autoframing.

(Inherited from CameraMetadata)
ControlAutoframingOn
Obsolete.

Enable autoframing to keep people in the frame's field of view.

(Inherited from CameraMetadata)
ControlAutoframingStateConverged
Obsolete.

Auto-framing has reached a stable state (frame/fov is not being adjusted).

(Inherited from CameraMetadata)
ControlAutoframingStateFraming
Obsolete.

Auto-framing is in process - either zooming in, zooming out or pan is taking place.

(Inherited from CameraMetadata)
ControlAutoframingStateInactive
Obsolete.

Auto-framing is inactive.

(Inherited from CameraMetadata)
ControlExtendedSceneModeBokehContinuous
Obsolete.

Bokeh effect must not slow down capture rate relative to sensor raw output, and the effect is applied to all processed streams no larger than the maximum streaming dimension.

(Inherited from CameraMetadata)
ControlExtendedSceneModeBokehStillCapture
Obsolete.

High quality bokeh mode is enabled for all non-raw streams (including YUV, JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE.

(Inherited from CameraMetadata)
ControlExtendedSceneModeDisabled
Obsolete.

Extended scene mode is disabled.

(Inherited from CameraMetadata)
ControlModeUseExtendedSceneMode
Obsolete.

Use a specific extended scene mode.

(Inherited from CameraMetadata)
ControlSettingsOverrideOff
Obsolete.

No keys are applied sooner than the other keys when applying CaptureRequest settings to the camera device.

(Inherited from CameraMetadata)
ControlSettingsOverrideZoom
Obsolete.

Zoom related keys are applied sooner than the other keys in the CaptureRequest.

(Inherited from CameraMetadata)
ControlVideoStabilizationModePreviewStabilization
Obsolete.

Preview stabilization, where the preview in addition to all other non-RAW streams are stabilized with the same quality of stabilization, is enabled.

(Inherited from CameraMetadata)
DistortionCorrectionModeFast

Lens distortion correction is applied without reducing frame rate relative to sensor output.

(Inherited from CameraMetadata)
DistortionCorrectionModeHighQuality

High-quality distortion correction is applied, at the cost of possibly reduced frame rate relative to sensor output.

(Inherited from CameraMetadata)
DistortionCorrectionModeOff

No distortion correction is applied.

(Inherited from CameraMetadata)
LensPoseReferenceAutomotive

The value of CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation is relative to the origin of the automotive sensor coordinate system, which is at the center of the rear axle.

(Inherited from CameraMetadata)
LensPoseReferenceGyroscope

The value of CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation is relative to the position of the primary gyroscope of this Android device.

(Inherited from CameraMetadata)
LensPoseReferencePrimaryCamera

The value of CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation is relative to the optical center of the largest camera device facing the same direction as this camera.

(Inherited from CameraMetadata)
LensPoseReferenceUndefined

The camera device cannot represent the values of CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation and CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation accurately enough.

(Inherited from CameraMetadata)
LogicalMultiCameraSensorSyncTypeApproximate

A software mechanism is used to synchronize between the physical cameras.

(Inherited from CameraMetadata)
LogicalMultiCameraSensorSyncTypeCalibrated

The camera device supports frame timestamp synchronization at the hardware level, and the timestamp of a physical stream image accurately reflects its start-of-exposure time.

(Inherited from CameraMetadata)
RequestAvailableCapabilitiesColorSpaceProfiles
Obsolete.

The device supports querying the possible combinations of color spaces, image formats, and dynamic range profiles supported by the camera and requesting a particular color space for a session via android.hardware.camera2.params.SessionConfiguration#setColorSpace .

(Inherited from CameraMetadata)
RequestAvailableCapabilitiesDynamicRangeTenBit
Obsolete.

The device supports one or more 10-bit camera outputs according to the dynamic range profiles specified in android.hardware.camera2.params.DynamicRangeProfiles#getSupportedProfiles .

(Inherited from CameraMetadata)
RequestAvailableCapabilitiesOfflineProcessing
Obsolete.

The camera device supports the OFFLINE_PROCESSING use case.

(Inherited from CameraMetadata)
RequestAvailableCapabilitiesRemosaicReprocessing
Obsolete.

The device supports reprocessing from the RAW_SENSOR format with a bayer pattern given by CameraCharacteristics#SENSOR_INFO_BINNING_FACTOR android.sensor.info.binningFactor (m x n group of pixels with the same color filter) to a remosaiced regular bayer pattern.

(Inherited from CameraMetadata)
RequestAvailableCapabilitiesStreamUseCase
Obsolete.

The camera device supports selecting a per-stream use case via android.hardware.camera2.params.OutputConfiguration#setStreamUseCase so that the device can optimize camera pipeline parameters such as tuning, sensor mode, or ISP settings for a specific user scenario.

(Inherited from CameraMetadata)
RequestAvailableCapabilitiesSystemCamera
Obsolete.

The camera device is only accessible by Android's system components and privileged applications.

(Inherited from CameraMetadata)
RequestAvailableCapabilitiesUltraHighResolutionSensor
Obsolete.

This camera device is capable of producing ultra high resolution images in addition to the image sizes described in the CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap.

(Inherited from CameraMetadata)
ScalerAvailableStreamUseCasesCroppedRaw
Obsolete.

Cropped RAW stream when the client chooses to crop the field of view.

(Inherited from CameraMetadata)
ScalerAvailableStreamUseCasesDefault
Obsolete.

Default stream use case.

(Inherited from CameraMetadata)
ScalerAvailableStreamUseCasesPreview
Obsolete.

Live stream shown to the user.

(Inherited from CameraMetadata)
ScalerAvailableStreamUseCasesPreviewVideoStill
Obsolete.

One single stream used for combined purposes of preview, video, and still capture.

(Inherited from CameraMetadata)
ScalerAvailableStreamUseCasesStillCapture
Obsolete.

Still photo capture.

(Inherited from CameraMetadata)
ScalerAvailableStreamUseCasesVideoCall
Obsolete.

Long-running video call optimized for both power efficiency and video quality.

(Inherited from CameraMetadata)
ScalerAvailableStreamUseCasesVideoRecord
Obsolete.

Recording video clips.

(Inherited from CameraMetadata)
ScalerRotateAndCrop180
Obsolete.

Processed images are rotated by 180 degrees.

(Inherited from CameraMetadata)
ScalerRotateAndCrop270
Obsolete.

Processed images are rotated by 270 degrees clockwise, and then cropped to the original aspect ratio.

(Inherited from CameraMetadata)
ScalerRotateAndCrop90
Obsolete.

Processed images are rotated by 90 degrees clockwise, and then cropped to the original aspect ratio.

(Inherited from CameraMetadata)
ScalerRotateAndCropAuto
Obsolete.

The camera API automatically selects the best concrete value for rotate-and-crop based on the application's support for resizability and the current multi-window mode.

(Inherited from CameraMetadata)
ScalerRotateAndCropNone
Obsolete.

No rotate and crop is applied.

(Inherited from CameraMetadata)
SensorPixelModeDefault
Obsolete.

This is the default sensor pixel mode.

(Inherited from CameraMetadata)
SensorPixelModeMaximumResolution
Obsolete.

In this mode, sensors typically do not bin pixels, as a result can offer larger image sizes.

(Inherited from CameraMetadata)
SensorReadoutTimestampHardware
Obsolete.

This camera device supports the onReadoutStarted callback as well as outputting readout timestamps.

(Inherited from CameraMetadata)
SensorReadoutTimestampNotSupported
Obsolete.

This camera device doesn't support readout timestamp and onReadoutStarted callback.

(Inherited from CameraMetadata)
StatisticsOisDataModeOff

Do not include OIS data in the capture result.

(Inherited from CameraMetadata)
StatisticsOisDataModeOn

Include OIS data in the capture result.

(Inherited from CameraMetadata)

Properties

BlackLevelLock

Whether black-level compensation is locked to its current values, or is free to vary.

Class

Returns the runtime class of this Object.

(Inherited from Object)
ColorCorrectionAberrationMode

Mode of operation for the chromatic aberration correction algorithm.

ColorCorrectionGains

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

ColorCorrectionMode

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

ColorCorrectionTransform

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

ControlAeAntibandingMode

The desired setting for the camera device's auto-exposure algorithm's antibanding compensation.

ControlAeExposureCompensation

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

ControlAeLock

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

ControlAeMode

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

ControlAePrecaptureTrigger

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

ControlAeRegions

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

ControlAeTargetFpsRange

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

ControlAfMode

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

ControlAfRegions

List of metering areas to use for auto-focus.

ControlAfTrigger

Whether the camera device will trigger autofocus for this request.

ControlAutoframing
ControlAwbLock

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

ControlAwbMode

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

ControlAwbRegions

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

ControlCaptureIntent

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.

ControlEffectMode

A special color effect to apply.

ControlEnableZsl

Allow camera device to enable zero-shutter-lag mode for requests with CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent == STILL_CAPTURE.

ControlExtendedSceneMode

Whether extended scene mode is enabled for a particular capture request.

ControlMode

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

ControlPostRawSensitivityBoost

The amount of additional sensitivity boost applied to output images after RAW sensor data is captured.

ControlSceneMode

Control for which scene mode is currently active.

ControlSettingsOverride
ControlVideoStabilizationMode

Whether video stabilization is active.

ControlZoomRatio

The desired zoom ratio

Creator
DistortionCorrectionMode

Mode of operation for the lens distortion correction block.

EdgeMode

Operation mode for edge enhancement.

ExtensionStrength
FlashMode

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

Handle

The handle to the underlying Android instance.

(Inherited from Object)
HotPixelMode

Operational mode for hot pixel correction.

IsReprocess

Determine if this is a reprocess capture request.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
JpegGpsLocation

A location object to use when generating image GPS metadata.

JpegOrientation

The orientation for a JPEG image.

JpegQuality

Compression quality of the final JPEG image.

JpegThumbnailQuality

Compression quality of JPEG thumbnail.

JpegThumbnailSize

Resolution of embedded JPEG thumbnail.

Keys

Returns a list of the keys contained in this map.

(Inherited from CameraMetadata)
LensAperture

The desired lens aperture size, as a ratio of lens focal length to the effective aperture diameter.

LensFilterDensity

The desired setting for the lens neutral density filter(s).

LensFocalLength

The desired lens focal length; used for optical zoom.

LensFocusDistance

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

LensOpticalStabilizationMode

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

NoiseReductionMode

Mode of operation for the noise reduction algorithm.

PeerReference (Inherited from Object)
ReprocessEffectiveExposureFactor

The amount of exposure time increase factor applied to the original output frame by the application processing before sending for reprocessing.

ScalerCropRegion

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

ScalerRotateAndCrop

Whether a rotation-and-crop operation is applied to processed outputs from the camera.

SensorExposureTime

Duration each pixel is exposed to light.

SensorFrameDuration

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

SensorPixelMode

Switches sensor pixel mode between maximum resolution mode and default mode.

SensorSensitivity

The amount of gain applied to sensor data before processing.

SensorTestPatternData

A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern when CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode is SOLID_COLOR.

SensorTestPatternMode

When enabled, the sensor sends a test pattern instead of doing a real exposure from the camera.

ShadingMode

Quality of lens shading correction applied to the image data.

StatisticsFaceDetectMode

Operating mode for the face detector unit.

StatisticsHotPixelMapMode

Operating mode for hot pixel map generation.

StatisticsLensShadingMapMode

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

StatisticsOisDataMode

A control for selecting whether optical stabilization (OIS) position information is included in output result metadata.

Tag

Retrieve the tag for this request, if any.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from CameraMetadata)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from CameraMetadata)
TonemapCurve

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

TonemapGamma

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

TonemapMode

High-level global contrast/gamma/tonemapping control.

TonemapPresetCurve

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

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
DescribeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Get(CaptureRequest+Key)

Get a capture request field value.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Flatten this object in to a Parcel.

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to