2

first post so please be nice. I am doing an image processing project and my problem is now that I would like to know how big my digital image is in the real world.

I have: digital image: 336x256 pixel

camera focal length: 9mm

camara aperture: f/1,25

camera distance: 40m

pixel pitch: 17 micro m

FOV: 35° x 27°1.889 mr

Is there a way to calculate the real width and height of the image?

  • 5
    I'm voting to close this question as off-topic because it is about using a camera as a measuring device rather than as a photographic tool. – mattdm Mar 06 '19 at 19:30
  • 1
    I was redirected here from stack overflow – Sebastian Ko Mar 06 '19 at 19:42
  • 2
    @SebastianKo That's unfortunate. Can you point to where you were redirected from? – mattdm Mar 06 '19 at 20:38
  • @mattdm What is your definition of a photographic tool? I believe that since there is a science to capturing and processing the light collected that there may be merit to the question. – NotARobot Mar 06 '19 at 21:31
  • 1
    It's not about whether there is merit to the question. It's whether it's relevant to the topic of photography. The line is simple: the goal isn't to produce a photograph. The goal is to produce a measurement. – mattdm Mar 06 '19 at 21:56
  • 4
    How is a question like this not considered part of technical photography? - Not all photography is about 'making pretty pictures', some of us deal with photography as a means to gather data for science and engineering or other purposes. – TheLuckless Mar 06 '19 at 21:57
  • 1
    @TheLuckless Because the community here has specifically been formed to address things related to taking pictures for the purpose of taking pictures, not to address things related to using cameras as measuring tools. This question is basically a geometry question, not a photography question. Having said that, one will be severely disappointed when trying to use a consumer grade camera (this includes even very expensive "pro" models and lenses) designed to produce photographs rather than lab grade equipment designed to produce accurate measurements. – Michael C Mar 06 '19 at 22:31
  • 1
    With cameras designed to take creative or documentary photographs, too many things are approximated to make them accurate measuring instruments: focal lengths when focused to infinity are rounded to the nearest marketing size, focal lengths change as the same lens is focused closer than infinity, focus shift with changing apertures, geometric distortion that makes a lens' focal length slightly different at different points in the image field, etc. all conspire to make scientific measurements inaccurate using such cameras and lenses. That's all just with prime lenses. – Michael C Mar 06 '19 at 22:34
  • For other scientific pursuits, the same is true of exposure time/shutter speed that is not as precise nor as consistent from one shot to the next as needed for scientific observation. Apertures aren't accurate enough or consistent enough from shot to shot, either. – Michael C Mar 06 '19 at 22:43
  • 2
    Even if this question is not off topic, it is certainly a duplicate of dozens of other more or less identical existing questions here. They're not that hard to find, even with SE's poor search engine. – Michael C Mar 06 '19 at 22:44
  • 2
    And yet this sort of question fits well within the realm of "techniques and best practices" for technical photography.

    And if it is a duplicate, then should it not be correctly flagged and linked as such?

    • Calling this off topic sends a rather hostile message of "We don't like your kind" to anyone working in the technical photography field.
    – TheLuckless Mar 06 '19 at 23:13
  • 1
    This is not what is typically meant by "technical photography". Technical cameras are cameras which provide, often via bellows, for 'movements', such as tilt and shift, used to make photographs for the sake of making photographs. They're often also called view cameras. They're not for the purpose of taking "technical" measurements of something. – Michael C Mar 06 '19 at 23:20
  • 2
    I do agree that perhaps it would be more beneficial to flag such questions as duplicates of other existing questions, even if those other questions have also been closed as off topic. But once three close votes have been cast for "off topic", voting to close as a duplicate has no effect on the final outcome - even if the last two votes are as duplicates, it gets closed as "off topic." – Michael C Mar 06 '19 at 23:22
  • 4
    Note: this question is being discussed on Stack Overflow's Meta site: https://meta.stackoverflow.com/q/380966/1709587 – Mark Amery Mar 08 '19 at 00:21

2 Answers2

4

The actual focal length if the lens depends on the focus, so you cannot even trust was is reported in the EXIF data or even the markings on the lens. If the settings are repeatable (prime lens...) your best bet is to calibrate the image by shooting a known object (typically a rule/tape measure), and measuring its size in pixels in the resulting shot, and then apply a ratio when measuring object sizes in pixels in the subsequent shots.

In Gimp (and perhaps in other photo editors), you can specify an arbitrary pixel/physical length ratio, so with the proper ratio set the measure tool can give direct readings in physical units (meters/feet/cubits/furlongs...).

xenoid
  • 21,297
  • 1
  • 28
  • 62
  • Even prime lenses suffer from geometric distortion that make magnification slightly different in different areas of the image field. The also often suffer from focus breathing when different aperture settings are used (which affects the size of slightly out-of-focus objects). – Michael C Mar 06 '19 at 22:39
  • 1
    Yes, but this can be corrected. – xenoid Mar 06 '19 at 23:00
1

In theory, yes (see zillions of other questions on this same topic, like this one), but in practice except in some constrained situations, not usefully. Digital cameras designed for making photographs do not make precise measuring devices.

mattdm
  • 143,140
  • 52
  • 417
  • 741
  • I read a little about cameras now. And as I understand it, can't I just multiple the pixel* pixel pitch to get the sensor size? – Sebastian Ko Mar 06 '19 at 20:51
  • Well, given that you have the focal length and the angle of view, I think you can calculate the sensor size roughly as 5.67mm x 4.32mm... Or, based on pixel pitch and count, approximately 5.71mm x 4.35mm... Which actually agrees more closely than I expected... – twalberg Mar 06 '19 at 20:52
  • That will give you an approximate size. – mattdm Mar 06 '19 at 20:52
  • @twalberg Field of view and pixel pitch were edited into the question after I answered. – mattdm Mar 06 '19 at 20:54
  • Ah... didn't review the edit history. – twalberg Mar 06 '19 at 20:56
  • @twalberg how did you calculate the sensor size with the FOV? – Sebastian Ko Mar 06 '19 at 21:03
  • @SebastianKo Well, there's a formula for angle of view based on focal length and sensor size - simple trigonometry/algebra can turn it into a formula for sensor size based on focal length and angle of view... a = 2 * atan(s / 2f) where a is angle of view (horizontal or vertical, in radians, of course), s is the sensor length in the corresponding direction, and f is the focal length. Turned around it is s = 2f * tan(a / 2). Also note that this breaks down at macro magnification levels, but given the 40m subject distance, it's as good an approximation as the quoted AOV numbers... – twalberg Mar 06 '19 at 21:17