Class CameraCharacteristics¶
- java.lang.Object
-
- com.iristick.smartglass.core.camera.CameraCharacteristics
public abstract class CameraCharacteristics extends Object
This class describes the properties of a camera.
These properties are fixed for a given camera, and can be queried through
Headset.getCameraCharacteristics(String)
.
CameraCharacteristics
objects are immutable.
Nested Class Summary¶
Modifier and Type | Class and Description |
---|---|
static class |
CameraCharacteristics.Key<T>
This class allows to define type-safe keys to designate camera characteristics fields.
|
static class |
CameraCharacteristics.StreamConfigurationMap
This immutable class contains available stream configurations to set up
Surfaces for use in CaptureRequests . |
Field Summary¶
Modifier and Type | Field and Description |
---|---|
static CameraCharacteristics.Key<int[]> |
CONTROL_AE_AVAILABLE_MODES
Available modes for the camera's auto-exposure routine.
|
static CameraCharacteristics.Key<int[]> |
CONTROL_AF_AVAILABLE_MODES
Available modes for the camera's auto-focus routine.
|
static CameraCharacteristics.Key<int[]> |
CONTROL_AWB_AVAILABLE_MODES
Available modes for the camera's auto-white balance routine.
|
static CameraCharacteristics.Key<Float> |
LENS_SHORTEST_FOCUS_DISTANCE
Shortest distance from front-most surface of the lens that can be brought into sharp focus,
i.e., the maximum value for
CaptureRequest.LENS_FOCUS_DISTANCE . |
static CameraCharacteristics.Key<String[]> |
POSTPROCESS_AVAILABLE_BARCODE_FORMATS
Available barcode formats for the camera's barcode detection and decoding post processing routine.
|
static CameraCharacteristics.Key<Integer> |
POSTPROCESS_MAXIMUM_BARCODE_COUNT
Maximum number of barcodes that can be decoded in a single camera frame.
|
static CameraCharacteristics.Key<Point> |
SCALER_MAX_OFFSET
Maximum offset of digitally zoomed image.
|
static CameraCharacteristics.Key<Float> |
SCALER_MAX_ZOOM
Maximum digital zoom level.
|
static CameraCharacteristics.Key<CameraCharacteristics.StreamConfigurationMap> |
SCALER_STREAM_CONFIGURATION_MAP
The available stream configurations that this camera supports; also includes the minimum
frame durations for each format/size combination.
|
static CameraCharacteristics.Key<Long> |
SENSOR_MAX_EXPOSURE_TIME
The maximum image exposure time.
|
static CameraCharacteristics.Key<Long> |
SENSOR_MAX_FRAME_DURATION
The maximum frame duration (i.e., minimum frame rate).
|
static CameraCharacteristics.Key<Float> |
SENSOR_MAX_GAIN
Maximum analog gain.
|
static CameraCharacteristics.Key<Long> |
SENSOR_MIN_EXPOSURE_TIME
The minimum image exposure time.
|
static int |
TYPE_WIDE_ANGLE
Type of camera with a wide field of view.
|
static int |
TYPE_ZOOM
Type of camera with a narrow field of view.
|
static CameraCharacteristics.Key<int[]> |
TYPES
A set of type tags describing this camera.
|
Constructor Summary¶
Constructor and Description |
---|
CameraCharacteristics() |
Method Summary¶
Modifier and Type | Method and Description |
---|---|
abstract boolean |
containsKey(CameraCharacteristics.Key<?> key)
Determines whether this map has a value set for
key . |
abstract <T> T |
get(CameraCharacteristics.Key<T> key)
Gets a camera characteristics field value.
|
<T> T |
get(CameraCharacteristics.Key<T> key,
T defaultValue)
Gets a camera characteristics field value.
|
abstract List<CaptureRequest.Key<?>> |
getAvailableCaptureRequestKeys()
Returns the list of keys supported by this
CameraDevice for
querying with a CaptureRequest . |
abstract List<CaptureResult.Key<?>> |
getAvailableCaptureResultKeys()
Returns the list of keys supported by this
CameraDevice for
querying with a CaptureResult . |
abstract List<CameraCharacteristics.Key<?>> |
getKeys()
Returns a list of the keys contained in this map.
|
Methods inherited from class java.lang.Object¶
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail¶
TYPES¶
public static final CameraCharacteristics.Key<int[]> TYPES
Possible values:
- Since:
- 1.2
TYPE_WIDE_ANGLE¶
public static final int TYPE_WIDE_ANGLE
- Since:
- 1.2
- See Also:
TYPES
TYPE_ZOOM¶
public static final int TYPE_ZOOM
- Since:
- 1.2
- See Also:
TYPES
SCALER_STREAM_CONFIGURATION_MAP¶
public static final CameraCharacteristics.Key<CameraCharacteristics.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP
SCALER_MAX_ZOOM¶
public static final CameraCharacteristics.Key<Float> SCALER_MAX_ZOOM
- See Also:
CaptureRequest.SCALER_ZOOM
SCALER_MAX_OFFSET¶
public static final CameraCharacteristics.Key<Point> SCALER_MAX_OFFSET
- See Also:
CaptureRequest.SCALER_OFFSET
SENSOR_MAX_FRAME_DURATION¶
public static final CameraCharacteristics.Key<Long> SENSOR_MAX_FRAME_DURATION
The maximum frame duration (i.e., minimum frame rate).
Attempting to use frame durations beyond the maximum will result in the frame duration being clipped to the maximum.
Refer to SCALER_STREAM_CONFIGURATION_MAP
for the minimum frame duration values.
Units:
Nanoseconds
- See Also:
CaptureRequest.SENSOR_FRAME_DURATION
CONTROL_AWB_AVAILABLE_MODES¶
public static final CameraCharacteristics.Key<int[]> CONTROL_AWB_AVAILABLE_MODES
- Since:
- 1.2
- See Also:
CaptureRequest.CONTROL_AWB_MODE
CONTROL_AE_AVAILABLE_MODES¶
public static final CameraCharacteristics.Key<int[]> CONTROL_AE_AVAILABLE_MODES
- See Also:
CaptureRequest.CONTROL_AE_MODE
SENSOR_MIN_EXPOSURE_TIME¶
public static final CameraCharacteristics.Key<Long> SENSOR_MIN_EXPOSURE_TIME
The minimum image exposure time.
Units:
Nanoseconds
- See Also:
CaptureRequest.SENSOR_EXPOSURE_TIME
SENSOR_MAX_EXPOSURE_TIME¶
public static final CameraCharacteristics.Key<Long> SENSOR_MAX_EXPOSURE_TIME
The maximum image exposure time.
Units:
Nanoseconds
- See Also:
CaptureRequest.SENSOR_EXPOSURE_TIME
SENSOR_MAX_GAIN¶
public static final CameraCharacteristics.Key<Float> SENSOR_MAX_GAIN
Maximum analog gain.
Units:
Unit-less (multiplier)
- See Also:
CaptureRequest.SENSOR_GAIN
CONTROL_AF_AVAILABLE_MODES¶
public static final CameraCharacteristics.Key<int[]> CONTROL_AF_AVAILABLE_MODES
LENS_SHORTEST_FOCUS_DISTANCE¶
public static final CameraCharacteristics.Key<Float> LENS_SHORTEST_FOCUS_DISTANCE
CaptureRequest.LENS_FOCUS_DISTANCE
.
If the lens is fixed-focus, this will be 0
.
Units:
Diopters (1/meter)
- See Also:
CaptureRequest.LENS_FOCUS_DISTANCE
POSTPROCESS_MAXIMUM_BARCODE_COUNT¶
public static final CameraCharacteristics.Key<Integer> POSTPROCESS_MAXIMUM_BARCODE_COUNT
- Since:
- 1.2
- See Also:
CaptureRequest.POSTPROCESS_BARCODE_COUNT
POSTPROCESS_AVAILABLE_BARCODE_FORMATS¶
public static final CameraCharacteristics.Key<String[]> POSTPROCESS_AVAILABLE_BARCODE_FORMATS
- Since:
- 1.2
- See Also:
CaptureRequest.POSTPROCESS_BARCODE_FORMATS
Constructor Detail¶
CameraCharacteristics¶
public CameraCharacteristics()
Method Detail¶
get¶
@CheckResult @Nullable public abstract <T> T get(@NonNull CameraCharacteristics.Key<T> key)
- Type Parameters:
T
- The key type.- Parameters:
key
- The field to read (keys are defined as constants inCameraCharacteristics
.- Returns:
- The value of the key, or
null
if the field is not set.
get¶
@CheckResult @NonNull public <T> T get(@NonNull CameraCharacteristics.Key<T> key, @NonNull T defaultValue)
- Type Parameters:
T
- The key type.- Parameters:
key
- The field to read (keys are defined as constants inCameraCharacteristics
.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. - Since:
- 1.2
getAvailableCaptureRequestKeys¶
@CheckResult @NonNull public abstract List<CaptureRequest.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 an
UnsupportedOperationException
.
Each key is only listed once in the list. The order of the keys is unspecified.
- Returns:
- A list of the keys supported by this camera device for capture requests.
getAvailableCaptureResultKeys¶
@CheckResult @NonNull public abstract List<CaptureResult.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 an
UnsupportedOperationException
.
Each key is only listed once in the list. The order of the keys is unspecified.
- Returns:
- A list of the keys supported by this camera device for capture results.
getKeys¶
@CheckResult @NonNull public abstract List<CameraCharacteristics.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 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
unspecified.
- Returns:
- A list of the keys contained in this mapping.
containsKey¶
@CheckResult public abstract boolean containsKey(@NonNull CameraCharacteristics.Key<?> key)
key
.- Parameters:
key
- The field to check.- Returns:
- Whether this map contains a value for key.