Helpful Posts Helpful Posts:  0
Results 1 to 3 of 3

Thread: How to get the distance between lens and image plane for compact digital camera?

  1. #1
    New Member
    Join Date
    Jul 2010
    Posts
    1

    How to get the distance between lens and image plane for compact digital camera?

    Hi all,

    For image defocus, when we want to calculate the depth map, we use formula:
    do = f * D / (D - f - 2*r*f_number)
    f is focal length, f and f_number can be retrieved from EXIF infromation.
    but How to get D (the distance between lens and image plane) ?

    BS
    Thanks!

  2. #2

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,662
    Real Name
    Have a guess :)

    Re: How to get the distance between lens and image plane for compact digital camera?

    DEFINATELY one for Sean!

    ... But welcome to CiC anyway - great to have you with us!
    Last edited by McQ; 23rd July 2010 at 09:50 PM.

  3. #3
    Administrator
    Join Date
    Apr 2008
    Location
    California, USA
    Posts
    1,473
    Real Name
    Sean

    Re: How to get the distance between lens and image plane for compact digital camera?

    It looks like you're trying to use a formula to calculate front/rear depth of field. It appears to be that equation in a different form than I'm used to seeing. In that case, by "r" you are referring to the circle of confusion radius...? More clarification on exactly what you're trying to do (in words) would be helpful. Almost all equations have assumptions, such as low vs high magnification, so knowing the situation will tell us which equations will be most accurate...

    Regardless, the (i) focal length, (ii) distance to subject from the lens and (iii) distance from the lens to the sensor are all related according to:

    1/f = 1/d[lens to subject] + 1/d[lens to sensor]

    Most cameras record both the focal length and the focusing distance (at least roughly). The focusing distance can be approximated as being equal to d[lens to subject] as long as you're not taking the photo at high magnification. You can therefore use these to calculate d[lens to sensor] as follows:

    d[lens to sensor] = f * d[lens to subject] / ( d[lens to subject] - f )

    Is this what you had in mind...?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •