1

I'm trying to get camera shutter speed when a photo is taken with Android camera. Using this instruction in an image the app creates that contains the taken photo.

double vel = exif.getAttributeDouble(ExifInterface.TAG_SHUTTER_SPEED_VALUE, 0);

This gives some values that change according to the level of luminosity, for example right now if I allow natural light to go through my window fully it offers the value 6.906 and if I don't allow it as much as possible it is 3.882.

But on the other hand I'm using this app to check correctness of the values and for these same cases it offers the values 1/120 and 1/12, which seem to be on a standard format to represent shutter speed as seen here.

I can't grasp if ExifInterface.TAG_SHUTTER_SPEED_VALUE is measuring shutter speed correctly, but in other scale which I don't know how to convert or if it's doing that in a wrong way and using it wouldn't help.

Could anyone tell me how to convert to the 1/x format from the value it gives or tell me if it's measuring any other thing?

user2638180
  • 1,013
  • 16
  • 37
  • 1
    Which `Exifinterface` are you using [androidx.exifinterface.media.ExifInterface](https://developer.android.com/reference/androidx/exifinterface/media/ExifInterface#TAG_SHUTTER_SPEED_VALUE) or [android.media.ExifInterface](https://developer.android.com/reference/android/media/ExifInterface#TAG_SHUTTER_SPEED_VALUE) – Morrison Chang Sep 20 '21 at 07:49
  • @MorrisonChang, it's android.media.ExifInterface. – user2638180 Sep 20 '21 at 07:54
  • The more standard forms like 1/125 and 1/12 are not really speeds to begin with. They are times/durations expressed in seconds. – blackapps Sep 20 '21 at 08:14
  • @blackapps, you are right, but for some reason they usually call that "shutter speed". – user2638180 Sep 20 '21 at 08:18
  • 1
    FYI: [Shutter Speed from the Exif ShutterSpeedValue](https://photo.stackexchange.com/q/108817/67934) – Morrison Chang Sep 20 '21 at 08:20
  • @MorrisonChang, thanks, I will check that. – user2638180 Sep 20 '21 at 08:21

1 Answers1

0

The TAG_SHUTTER_SPEED_VALUE unit is the APEX value.

Not sure about about this source but this is the only answer I found about the APEX value calculation: https://www.dpreview.com/forums/post/54376235

ShutterSpeed=-log2(ExposureTime).

And it matches your values:

-log2(1/120) = 6.907
-log2(1/12) = 3.585

Anyway, if your are looking for the exposure time value in second, you can directly read the TAG_EXPOSURE_TIME instead.

Nit
  • 1,115
  • 9
  • 9