Software to compute focal length of an image

Discussion in 'Digital Photography' started by Alfred Molon, Jul 13, 2007.

  1. Alfred Molon

    Alfred Molon Guest

    Is there a software which allows you to compute the focal length (or
    angle of view) of an image which has no exif? You would enter
    assumptions about the size of objects in the photo and the distance
    between them. You'd probably be unable to guess the position of the
    photographer though.

    I remember that years ago there was a procedure that allowed you to
    compute the image and lens paramaters out of a photo taken of a special
    test target (a white board with a grid of black squares), because the
    exact size of the board and squares was known.
    --

    Alfred Molon
    ------------------------------
    Olympus 50X0, 7070, 8080, E3X0, E4X0 and E5X0 forum at
    http://tech.groups.yahoo.com/group/MyOlympus/
    http://myolympus.org/ photo sharing site
     
    Alfred Molon, Jul 13, 2007
    #1
    1. Advertising

  2. Alfred Molon

    ASAAR Guest

    On Fri, 13 Jul 2007 08:29:22 +0200, Alfred Molon wrote:

    > Is there a software which allows you to compute the focal length (or
    > angle of view) of an image which has no exif? You would enter
    > assumptions about the size of objects in the photo and the distance
    > between them. You'd probably be unable to guess the position of the
    > photographer though.
    >
    > I remember that years ago there was a procedure that allowed you to
    > compute the image and lens paramaters out of a photo taken of a special
    > test target (a white board with a grid of black squares), because the
    > exact size of the board and squares was known.


    There was a thread about a month ago that answered a similar
    question. It contained these replies :

    > From: "Randy Berbaum" <>
    > Newsgroups: rec.photo.digital
    > Subject: Re: Estimating distance?
    > Date: Thu, 7 Jun 2007 23:38:41 -0500
    > Message-ID: <f4amgh$jli$>
    >
    > I know of a cleaver way but it has many requirements that may not be worth
    > getting. First you need to find something on the subject that you can
    > measure the length of in real life. Then you need to measure the image of
    > that object in pixels. Then using the actual focal length of the lens (not
    > the "35mm equiv") and use the formula for FOV to find the angle represented
    > by the measured subject. Now with the angle and the length of the side
    > opposite the angle you can use geometry to calculate the length of side
    > adjacent to the angle which would be the distance the camera was from the
    > subject. There will be a magine of error. Also the measured subject must be
    > perpendicular to a line from the camera to the subject for full accuracy.
    >
    > So as you see, there is a way to get an estimate if you have all the
    > required info (object measurement, lens length, length of object from image)
    > and have the required geometry formulas. I do know the FOV/angle formula
    > (tho I don't have it with me at the moment), but if you still want it I'll
    > try to remember to bring it with me tomorriow and can reply if you ask here.
    > It has been WAY too many years since I took a geometry course to give you
    > the formula for using an angle and an opposite side to find the length of an
    > adjacent side of a triangle. But that formula should be fairly easy to find
    > (or ask a 15 year old). :)
    >
    > Randy
    >
    > ==========
    > Randy Berbaum
    > Champaign, IL



    > From: "Randy Berbaum" <>
    > Newsgroups: rec.photo.digital
    > Subject: Re: Estimating distance?
    > Date: Fri, 8 Jun 2007 04:04:33 -0500
    > Message-ID: <f4b63n$phn$>
    >
    >> Thanks, Randy, that's exactly the sort of thing I had in mind. And
    >> yes, I would appreciate the formula please. I think I can handle any
    >> basic trigonometry that might also be involved. Although hopefully
    >> there is a formula around that pulls it all together for convenience?

    >
    > Ok, Here's the formula for the FOV of your entire image:
    > A=2*arctan(D/(L/2))
    > where
    > A=angle of FOV along the apropriate axis
    > D=Dimension of the sensor along that axis (in mm)
    > L=Focal length of the lens (in mm)
    >
    > So if your camera has a horizontal dimension of 23.5mm and the lens is a
    > 50mm lens you would divide 23.5 (D) by 25 (half the focal length) and take
    > the arctan (on many calculators this is "tan-1") and double the result. This
    > will be the FOV of the entire image. You want the angle of each pixel along
    > that axis so you would divide A by the number of pixels along that axis. So
    > if your image has 2000 pixels along the horizontal axis you would divide the
    > angle by 2000. Then by counting the number of horizontal pixels representing
    > the object and multiply the angle for each pixel by that length. This will
    > tell you how many degrees represent this object. This is where the formula
    > for finding the adjacent side of a triangle with an angle and an opposite
    > side would come in (which I don't have infront of me).
    >
    > But the problem is that each pixel represents a finite angle so your
    > accuracy is going to be plus or minus that angle per pixel. And if you
    > additionally estimate the length of the subject, you are adding to the
    > inaccuracy. You need the best accuracy in every aspect to get a meaningful
    > result. Even with your best odds you are going to have a 3-5% variance. And
    > if we are talking a distance to the object of a kilometer a 1% variance
    > would give you an answer that will be plus or minus 10 meters. So a very
    > good result will likely be +-30 to 50 meters. And if you just eyeball or
    > estimate anything along the way you could easily be talking +-100 meters.
    > This kind of variance could be simply be from estimating a 5' tall person as
    > 6' or estimating the bridge height as 19' when the actual height is 18' on
    > that day. It's amazing how a single foot of estimation error at a distance
    > of a kilometer can bloom into a major calculation error.
    >
    > So to do this right you'll have to go out onto that bridge with a long tape
    > measure and get an accurate measurement. That's why I said that there IS a
    > way to make the calculations but it may not be worth the bother to do it
    > right.
    >
    > Randy
    >
    > ==========
    > Randy Berbaum
    > Champaign, IL
     
    ASAAR, Jul 13, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter  Billinghurst

    Focal length - digital v. 35mm.

    Peter Billinghurst, Sep 3, 2003, in forum: Digital Photography
    Replies:
    3
    Views:
    1,000
  2. zuuum

    focal length of dSLR body/lens combination

    zuuum, Sep 5, 2003, in forum: Digital Photography
    Replies:
    7
    Views:
    768
    zuuum
    Sep 6, 2003
  3. Len

    Lens focal length table

    Len, Sep 24, 2003, in forum: Digital Photography
    Replies:
    4
    Views:
    3,538
  4. Click

    Why does software want focal length?

    Click, Sep 30, 2003, in forum: Digital Photography
    Replies:
    1
    Views:
    464
    Phil Stripling
    Sep 30, 2003
  5. Dick Campbell

    WHat is "Noram" or "Natural" Focal Length

    Dick Campbell, Oct 6, 2003, in forum: Digital Photography
    Replies:
    11
    Views:
    828
    Dick Campbell
    Oct 7, 2003
Loading...

Share This Page