Ask Your Question
0

Calculating intrinsic parameters from current optical zoom

asked 2019-06-30 06:06:05 -0600

fraye gravatar image

updated 2019-06-30 06:08:00 -0600

Hi,

I was wondering – is it possible to achieve a decent approximation of the intrinsic parameters of a camera by using the fact taht you know the the current (optical) zoom of a camera? AFAIK the intrinsic parameters represent the principal point and the focal points in pixels. I.e.

focal_length = zoom_level * minimum_focal_length

From my understanding, the current focal length can be calculated by multiplying the zoom level by the minimum focal length. After that one can calculate the focal length in pixels by using the following formula (horizontally in this case):

focal_pixel = (focal_mm / sensor_width_mm) * image_width_in_pixels

Analogically one can find out the vertical focal length. Further more, assuming that the principal point is through the middle of the screen and that the camera has 0 skew, would that result in a wrong intrinsic matrix?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-07-01 05:42:16 -0600

Witek gravatar image

You can get an approximated camera matrix if you know the FOV angle of the camera and the image dimensions. Then you can calculate the focal length from the following formula:

    image_size/2
f=---------------
     tan(FOV/2)

where image_size is the horizontal, vertical or diagonal image_size in pixels that corresponds to the FOV (horizontal, vertical or diagonal). Note that if not stated otherwise, the FOV angle given in the camera specification most often refers to the diagonal FOV angle. Unfortunately, for cheap cameras (webcams) you might not be able to find any specifications or they will not include the FOV angle. In such a case you can determine the focal length of your camera by taking a picture of an object of known length from a known distance. Then, based on the pinhole camera model:

object_length_in_mm        object_length_in_pixels
---------------------- = --------------------------
object_distance_in_mm           focal_length

you can easily calculate f.

As for the principal point you simply assume the center of the image and no skew and no lens distortions.

edit flag offensive delete link more

Comments

Thanks! Do you know any good way to find out the current FOV or focal length of a camera, given e.g. the current zoom level?

fraye gravatar imagefraye ( 2019-07-01 05:45:02 -0600 )edit

Well, I don't know if this is going to be satisfactory, but I needed this for my project, that is to know my camera parameteres at a number of zoom levels, so I simply followed the above mentioned procedure for these zoom levels and stored the results. I never bothered to check, though, the relation between the zoom level and the focal length...Somehow I doubt it is linear, but that is just a guess

Witek gravatar imageWitek ( 2019-07-01 19:17:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-06-30 06:06:05 -0600

Seen: 1,563 times

Last updated: Jul 01 '19