Package com.digimarc.capture.camera
Class Metadata
java.lang.Object
com.digimarc.capture.camera.Metadata
The Metadata class allows access to a the camera metadata associated with an image frame. Retrieval of camera
metadata is supported on both legacy Camera and Camera2 devices. Use the
CameraHelper.getMetadata()
method to get a Metadata object.
Currently only a subset of metadata fields are available through this interface. If there are additional metadata values that your application needs access to contact Digimarc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Note in the definitions below that the actual values for the constants can be different between Camera1 and Camera2, even though the constant names appear similar. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the exposure compensation index.float
Get the exposure compensation step.Get the device flash mode.
-
Method Details
-
getExposureCompensation
public int getExposureCompensation()Get the exposure compensation index. This value is multiplied by thegetExposureCompensationStep()
value to get the actual exposure compensation value (EV). For instance, if this method returns +6 and the exposure compensation step is 0.33f this would correspond to +2 EV.- Returns:
- Exposure compensation index. If this value is not available then 0 will be returned.
-
getExposureCompensationStep
public float getExposureCompensationStep()Get the exposure compensation step. This value is multiplied by thegetExposureCompensation()
value to get the actual exposure compensation value (EV). For instance, if this method returns 0.33f and the exposure compensation is 6 it would correspond to +2 EV.- Returns:
- Exposure compensation step. If this value is not available then 0f will be returned.
-
getFlashMode
Get the device flash mode. In Camera1 this will return an enum equivalent to the Camera.Parameters method getFlashMode(). In Camera2 it will return a value based on CaptureResult.FLASH_MODE. Note that there is a difference between the information returned from each API (see the docs onMetadata.FlashMode
for more detail. On Camera1 the return value contains more information on overall camera configuration (for instance whether red eye reduction mode is enabled), while on Camera2 the return value indicates what happened with the flash on the last frame.- Returns:
- Flash mode or
Metadata.FlashMode.None
if the flash mode is not available.
-