# Print output for @column tags ?>
public
final
class
CameraExtensionCharacteristics
extends Object
java.lang.Object | |
↳ | android.hardware.camera2.CameraExtensionCharacteristics |
Allows clients to query availability and supported resolutions of camera extensions.
Camera extensions give camera clients access to device-specific algorithms and sequences that can improve the overall image quality of snapshots in various cases such as low light, selfies, portraits, and scenes that can benefit from enhanced dynamic range. Often such sophisticated processing sequences will rely on multiple camera frames as input and will produce a single output.
Camera extensions are not guaranteed to be present on all devices so camera clients must
query for their availability via CameraExtensionCharacteristics#getSupportedExtensions()
.
In order to use any available camera extension, camera clients must create a corresponding
CameraExtensionSession
via
CameraDevice#createExtensionSession(ExtensionSessionConfiguration)
Camera clients must be aware that device-specific camera extensions may support only a
subset of the available camera resolutions and must first query
CameraExtensionCharacteristics#getExtensionSupportedSizes(int, int)
for supported
single high-quality request output sizes and
CameraExtensionCharacteristics#getExtensionSupportedSizes(int, Class)
for supported
repeating request output sizes.
The extension characteristics for a given device are expected to remain static under normal operating conditions.
Constants | |
---|---|
int |
EXTENSION_AUTOMATIC
Device-specific extension implementation for automatic selection of particular extension such as HDR or NIGHT depending on the current lighting and environment conditions. |
int |
EXTENSION_BEAUTY
Device-specific extension implementation which tends to smooth the skin and apply other cosmetic effects to people's faces. |
int |
EXTENSION_BOKEH
Device-specific extension implementation which can blur certain regions of the final image thereby "enhancing" focus for all remaining non-blurred parts. |
int |
EXTENSION_HDR
Device-specific extension implementation for enhancing the dynamic range of the final image. |
int |
EXTENSION_NIGHT
Device-specific extension implementation that aims to suppress noise and improve the overall image quality under low light conditions. |
Public methods | |
---|---|
Range<Long>
|
getEstimatedCaptureLatencyRangeMillis(int extension, Size captureOutputSize, int format)
Returns the estimated capture latency range in milliseconds for the
target capture resolution during the calls to |
List<Size>
|
getExtensionSupportedSizes(int extension, int format)
Check whether a given extension is available and return the
supported output surface resolutions that can be used for high-quality capture
requests via |
<T>
List<Size>
|
getExtensionSupportedSizes(int extension, Class<T> klass)
Get a list of sizes compatible with |
List<Integer>
|
getSupportedExtensions()
Return a list of supported device-specific extensions for a given camera device. |
Inherited methods | |
---|---|
public static final int EXTENSION_AUTOMATIC
Device-specific extension implementation for automatic selection of particular extension such as HDR or NIGHT depending on the current lighting and environment conditions.
Constant Value: 0 (0x00000000)
public static final int EXTENSION_BEAUTY
Device-specific extension implementation which tends to smooth the skin and apply other cosmetic effects to people's faces.
Constant Value: 1 (0x00000001)
public static final int EXTENSION_BOKEH
Device-specific extension implementation which can blur certain regions of the final image thereby "enhancing" focus for all remaining non-blurred parts.
Constant Value: 2 (0x00000002)
public static final int EXTENSION_HDR
Device-specific extension implementation for enhancing the dynamic range of the final image.
Constant Value: 3 (0x00000003)
public static final int EXTENSION_NIGHT
Device-specific extension implementation that aims to suppress noise and improve the overall image quality under low light conditions.
Constant Value: 4 (0x00000004)
public Range<Long> getEstimatedCaptureLatencyRangeMillis (int extension, Size captureOutputSize, int format)
Returns the estimated capture latency range in milliseconds for the
target capture resolution during the calls to CameraExtensionSession#capture
. This
includes the time spent processing the multi-frame capture request along with any additional
time for encoding of the processed buffer if necessary.
Returns | |
---|---|
Range<Long> |
the range of estimated minimal and maximal capture latency in milliseconds or null if no capture latency info can be provided |
Throws | |
---|---|
IllegalArgumentException |
in case of format different from ImageFormat#JPEG /
ImageFormat#YUV_420_888 ; or unsupported extension. |
public List<Size> getExtensionSupportedSizes (int extension, int format)
Check whether a given extension is available and return the
supported output surface resolutions that can be used for high-quality capture
requests via CameraExtensionSession#capture
.
Note that device-specific extensions are allowed to support only a subset
of the camera resolutions advertised by
StreamConfigurationMap#getOutputSizes
.
Device-specific extensions currently support at most two multi-frame capture surface formats. ImageFormat.JPEG will be supported by all extensions and ImageFormat.YUV_420_888 may or may not be supported.
Parameters | |
---|---|
extension |
int : the extension type
Value is either 0 or a combination of EXTENSION_AUTOMATIC , EXTENSION_BEAUTY , EXTENSION_BOKEH , EXTENSION_HDR , and EXTENSION_NIGHT |
format |
int : device-specific extension output format |
Returns | |
---|---|
List<Size> |
non-modifiable list of available sizes or an empty list if the format is not
supported.
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
in case of format different from ImageFormat.JPEG / ImageFormat.YUV_420_888; or unsupported extension. |
public List<Size> getExtensionSupportedSizes (int extension, Class<T> klass)
Get a list of sizes compatible with klass
to use as an output for the
repeating request
CameraExtensionSession#setRepeatingRequest
.
Note that device-specific extensions are allowed to support only a subset
of the camera output surfaces and resolutions.
The SurfaceTexture
class is guaranteed at least one size for
backward compatible cameras whereas other output classes are not guaranteed to be supported.
Parameters | |
---|---|
extension |
int : the extension type
Value is either 0 or a combination of EXTENSION_AUTOMATIC , EXTENSION_BEAUTY , EXTENSION_BOKEH , EXTENSION_HDR , and EXTENSION_NIGHT |
klass |
Class : a non-null Class object reference
This value cannot be null . |
Returns | |
---|---|
List<Size> |
non-modifiable list of available sizes or an empty list if the Surface output is not supported |
Throws | |
---|---|
NullPointerException |
if klass was null |
IllegalArgumentException |
in case of unsupported extension. |