Class Metadata

java.lang.Object
com.digimarc.capture.camera.Metadata

public class Metadata extends Object
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.

  • Method Details

    • getExposureCompensation

      public int getExposureCompensation()
      Get the exposure compensation index. This value is multiplied by the getExposureCompensationStep() 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 the getExposureCompensation() 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

      @NonNull public Metadata.FlashMode 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 on Metadata.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.