0

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"
}
omega
  • 111
  • 1
  • 6
  • 1
    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? – inkista Jul 17 '16 at 19:27
  • I am trying to work out some calculations in order to figure out real object height from the image. The original thread was here http://photo.stackexchange.com/questions/80195/calculation-for-getting-dimension-of-object-in-image-not-working#80196 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. – omega Jul 17 '16 at 19:32
  • 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. – omega Jul 17 '16 at 19:34
  • 2
    A Samsung Note 4 is a cell phone. It is NOT 35mm film, and NOT 36x24 mm size. – WayneF Jul 17 '16 at 20:27
  • If you look at the specs for a Samsung Galaxy Note 4, they all say the rear-facing camera's sensor is 1/2.6"-format. Which is roughly 5mm x 4mm in size, with ~6mm diagonal. Your lens is wide angle, with a focal length of 4.8mm. The focal length of the lens is independent of the sensor diagonal dimension. The diagonal = focal length comparison is only to see if the lens has what's called a "normal" field of view. Most phone cameras use a wide-angle lens of around 28mm equivalency. – inkista Jul 17 '16 at 21:55
  • This is too confusing lol. I know the note 4 specifically has a ~6mm sensor diagonal length, but is there a way to determine the sensor diagonal length from the exif data only and assuming you don't know what phone it was? – omega Jul 17 '16 at 22:32
  • 5

2 Answers2

2

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
xiota
  • 26,951
  • 4
  • 39
  • 126
Alan Marcus
  • 39,160
  • 3
  • 48
  • 91
  • 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? – omega Jul 17 '16 at 19:54
  • @omega -- this is the size of a 35mm full frame. The crop factor is based on this data. – Alan Marcus Jul 17 '16 at 20:26
  • 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? – omega Jul 17 '16 at 20:29
  • 2
    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. – WayneF Jul 17 '16 at 20:33
  • @omega It was not 35mm full frame. – Zenit Jul 17 '16 at 21:37
  • From the exif data alone, is there a way to determine sensor diagonal length (not knowing it is a note 4)? – omega Jul 17 '16 at 22:35
  • The published data for this 1/2.6 sensor is 4.1mm height by 5.5 length with a crop (magnification) factor of 6.8. We use the crop factor to calculates what focal length would be the equivalent focal length on a full frame angle of view.The published focal length for this camera lens is 4.8mm thus 4.8 X 6.3 = 30mm. The published diagonal is 6.86mm. – Alan Marcus Jul 17 '16 at 23:47
  • I may be misunderstanding, but no where on the exif data am I seeing the values 1/2.6, 4.1 or 5.5... – omega Jul 18 '16 at 00:14
  • @omega -- This data is the published technical data for your phone camera - not in the exif data. – Alan Marcus Jul 18 '16 at 00:46
  • So my question is, for strictly using the exif data, can the sensor diagonal length be determined? But if its published technical data, is the answer no? – omega Jul 18 '16 at 00:48
  • Using only exif data: Ratio height to length is 5312/2988=1.778. The focal length is 4.8mm = equivalent of 31mm on 35mm camera. Crop factor = 31/4.8=6.4583. I know the height of the 35mm frame is 24mm. This is the space available between sprocket holes. The equivalent length must be 24 X 1.778=42.672mm. The diagonal of this rectangle is 49mm. The diagonal of the phone camera sensor must be 49/6.4583=7.6mm. Best I can do using exif data and know height of 35mm frame. Hope this helps! – Alan Marcus Jul 18 '16 at 03:37
  • @Alan Marcus... >The published data for this 1/2.6 sensor is 4.1mm height by 5.5 length with a crop (magnification) factor of 6.8. ---- Curious, where are these specifications available? The camera Exif posted here reports crop is 4.8mm to 31mm, or 6.46 – WayneF Jul 18 '16 at 15:18
  • 1
    https://en.wikipedia.org/wiki/Exmor lists their 1/2.6 sensor 5312 X 2988 diagonal = 6.828mm – Alan Marcus Jul 18 '16 at 17:10
1

@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.
Michael C
  • 175,039
  • 10
  • 209
  • 561