0
\$\begingroup\$

I took an image from my phone and got its exif data below. It was a samsung note 4, which uses a 35mm film size (24x36) with a 43.27 diagonal. But what I am trying to figure out is the sensor diagonal length value. To get that I divided the full frame length (43.27) by the scale factor value. The scale factor I got by dividing the FocalLengthIn35mmFilm by the focal length value.

But right now I have hardcoded in my code 43.27 for full frame length, but was wondering if there was a way to determine what the full frame length is based only on the data below? This is because I plan to use the same code but from the exif data of any phone camera.

Does anyone know?

Thanks

{
    "ImageWidth": 5312,
    "ImageHeight": 2988,
    "Make": "samsung",
    "Model": "SM-N910W8",
    "Orientation": 6,
    "XResolution": 72,
    "YResolution": 72,
    "ResolutionUnit": 2,
    "Software": "N910W8VLU1DPE2",
    "DateTime": "2016:07:16 16:26:34",
    "YCbCrPositioning": 1,
    "ExifIFDPointer": 240,
    "GPSInfoIFDPointer": 3158,
    "ExposureTime": 0.04,
    "FNumber": 2.2,
    "ExposureProgram": "Normal program",
    "ISOSpeedRatings": 320,
    "ExifVersion": "0220",
    "DateTimeOriginal": "2016:07:16 16:26:34",
    "DateTimeDigitized": "2016:07:16 16:26:34",
    "ComponentsConfiguration": "YCbCr",
    "ShutterSpeedValue": 4.64,
    "ApertureValue": 2.27,
    "BrightnessValue": 0.45,
    "ExposureBias": 0,
    "MaxApertureValue": 2.28,
    "MeteringMode": "CenterWeightedAverage",
    "LightSource": "Unknown",
    "Flash": "Flash did not fire",
    "FocalLength": 4.8,
    "FlashpixVersion": "0100",
    "ColorSpace": 1,
    "PixelXDimension": 5312,
    "PixelYDimension": 2988,
    "InteroperabilityIFDPointer": 3128,
    "SensingMethod": "One-chip color area sensor",
    "SceneType": "Directly photographed",
    "ExposureMode": 0,
    "WhiteBalance": "Auto white balance",
    "FocalLengthIn35mmFilm": 31,
    "SceneCaptureType": "Standard",
    "ImageUniqueID": "H16USHH04S",
    "GPSVersionID": "2.2.0.0"
}
\$\endgroup\$
8
  • 1
    \$\begingroup\$ What exactly are you trying to find out? The film-equivalency of your camera's focal length? Your actual focal length? The crop factor? Or the diagonal dimension of your sensor? I'm a little confused, here. What's the task you're trying to do? \$\endgroup\$
    – inkista
    Jul 17, 2016 at 19:27
  • \$\begingroup\$ I am trying to work out some calculations in order to figure out real object height from the image. The original thread was here photo.stackexchange.com/questions/80195/… but the only thing I don't get is how to determine the sensor diagonal length from the exif data and not just assume its 43.27 is the full frame diagonal length. \$\endgroup\$
    – omega
    Jul 17, 2016 at 19:32
  • \$\begingroup\$ In all the calculations from that post, they just assumed the 35mm (24x36) (43.27 diagonal) size for the phone camera (which it probably is) but I was looking for a better way to determine that it should be this value from the exif data. \$\endgroup\$
    – omega
    Jul 17, 2016 at 19:34
  • 2
    \$\begingroup\$ A Samsung Note 4 is a cell phone. It is NOT 35mm film, and NOT 36x24 mm size. \$\endgroup\$
    – WayneF
    Jul 17, 2016 at 20:27
  • 5
    \$\begingroup\$ Possible duplicate of Calculation for getting dimension of object in image not working \$\endgroup\$
    – Michael C
    Jul 18, 2018 at 2:05

2 Answers 2

2
\$\begingroup\$

From the Exif data: Image size is 2988 pixels height by 5412 pixel length. The file states the actual focal length is 4.8mm. The file states this value is the equivalent of a 31mm lens mounted on a full frame. From this we can calculate the crop factor = 31 ÷ 4.8 = 6.4583.

"ImageWidth": 5312
"ImageHeight": 2988
"FocalLength": 4.8
"FocalLengthIn35mmFilm": 31

The diagonal of a full frame, 24mm height by 36mm length = 43.27mm. The diagonal of this sensor = 43.27 ÷ 6.4583 = 6.7mm.

These are only approximate calculations because the Exif contains rounded values. The image sensor specifications are published:

Height = 4.1mm
Length = 5.5mm
Diagonal = 6.86mm
Crop factor = 6.3X
\$\endgroup\$
13
  • \$\begingroup\$ I understand this calculations, but what I am trying to figure out is how you got the 24x36? I am trying to figure out how to get that only from the exif data through calculations. What if you didn't know what phone took the image, how would you know its 24x36? \$\endgroup\$
    – omega
    Jul 17, 2016 at 19:54
  • \$\begingroup\$ @omega -- this is the size of a 35mm full frame. The crop factor is based on this data. \$\endgroup\$ Jul 17, 2016 at 20:26
  • \$\begingroup\$ ok but then how did you know it was a 35mm full frame if you didn't know the phone but only knew the exif data? \$\endgroup\$
    – omega
    Jul 17, 2016 at 20:29
  • 2
    \$\begingroup\$ Alan, there are different numbers, but your 5.5x4.1 mm size seems reasonable, and it is 4:3 ratio, common for cell phones. However, this Exif says image size is 5312x2988, which is 16:9 format. So if 5.5mm is correct sensor width, then height would be 5.5x9/16 = 3.09mm. \$\endgroup\$
    – WayneF
    Jul 17, 2016 at 20:33
  • 1
    \$\begingroup\$ en.wikipedia.org/wiki/Exmor lists their 1/2.6 sensor 5312 X 2988 diagonal = 6.828mm \$\endgroup\$ Jul 18, 2016 at 17:10
1
\$\begingroup\$

@omega Here's what you are not getting: The 36x24 measurement is the size a classic photo negative taken with 35mm film.

It is a well known and accepted measurement. 35mm film was a very commonly used film for 60+ years. Because format size (sensor or film size) determines angle of view for a particular focal length lens, and because 35mm film was so common for so long, many photographers associate a particular focal length when used with 35mm film with a particular angle of view.

The 43.27mm diagonal of a frame of 35mm film divided by the diagonal of any sensor (or film) gives the camera's "crop factor".

  • If the EXIF gives the actual focal length of the lens and also gives the (35mm) equivalent focal length of the lens then dividing the EFL by the FL will give you the camera's "crop factor".
  • You can then divide the 43.27mm diagonal of a 35mm film frame by the camera's "crop factor" to get the diagonal measurement of the camera's sensor.
  • You can derive the ratio of the sensor's width and height by comparing the number of vertical and horizontal pixels in the EXIF info (Image Width/Image Height)
  • You can then use trigonometry to derive the measurements of the sensor's vertical and horizontal dimensions because you now know the length of the diagonal of the right triangle formed by the length, height, and diagonal of the sensor and you know the ratio of the width to height of the sensor.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.