Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Digital Photography > Software to compute focal length of an image

Reply
Thread Tools

Software to compute focal length of an image

 
 
Alfred Molon
Guest
Posts: n/a
 
      07-13-2007
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
 
Reply With Quote
 
 
 
 
ASAAR
Guest
Posts: n/a
 
      07-13-2007
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to compute length of arbitrary dimension vector? Gabriel Python 9 06-03-2011 11:12 PM
FAQ 4.43 How do I compute the difference of two arrays? How do I compute the intersection of two arrays? PerlFAQ Server Perl Misc 0 02-02-2011 05:00 AM
Why does software want focal length? Click Digital Photography 1 09-30-2003 04:14 PM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM
Focal length - digital v. 35mm. Peter Billinghurst Digital Photography 3 09-05-2003 01:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57