PeauProductions

m12 Lens and Distance Calculator [FORMULAS]

by on Jul.23, 2009, under Uncategorized


So I have had a ton of questions about how to figure out which lenses at my online store would work the best when modifying the ps3 cameras. Rather than just keep supplying the necessary formulas out to the select people who keep asking for it, I thought I’d just create an excel sheet to do the work.

I decided to research the math from a bunch of different sites which calculated the answers for you, and was surprised to find that some sites differed slightly. With that in mind, I took the formulas that most of them used to work with. When someone advertises that a lens has say 160 degree field of view (FOV), what they are not telling you is that since m12 lenses can be used in 1/3 inch and 1/4 inch camera sensor bearing cameras, their advertised FOV may be different than what you get. The reason is that the PS3 Eye Camera has a 1/4 inch sensor, but calculating the FOV with a 1/3 inch sensor in mind yields a larger FOV. Also, the FOV usually listed is a diagonal FOV, not the horizontal or vertical FOV that most people care about (which reminds me of the headache back when I worked retail at Best Buy on explaining to people that a 19″ wide LCD didn’t mean that the screen was horizontally 19″). So say you see the m12 160 degree 2.1mm lens advertised. What that really means for the ps3 camera is a 116 degree horizontal FOV…confusing, arg.

The excel chart can be downloaded below:
Microsoft Excel 2007 (.xlsx)
Microsoft Excel 2003 (.xls)
If you think a correction is needed or have a suggestion on how to make it better I’d love to hear it.


10 Comments for this entry

  • filip911

    which proram opens this excel chart

  • Peau

    Well, we are coming up on 3 years of it being out, so I am assuming everyone has the most recent Microsoft Office Excel 2007. If you don’t , download the compatibility pack. Guess I’ll have to put up a 2003 version for all of you late adopters.
    Excel 2007 file extension = .xlsx
    Excel 2003 file extension = .xls

  • filip911

    before i posted a comment it was zip, not xml

  • Peau

    Not trying to argue with you man, but it was .xlsx. Let me know how it goes

  • Fernando

    Hi Peau, first of all, thanks for all the work that you share with all the MT community

    I have a question, maybe a little obvious, but a make it just to be sure

    In the excel, what it means exactly ‘Target’? The rectangle formed by Horizontal and Vertical lenght of the image projeted? or the rectangle formed by the edges of the surface? (in some cases, this could not be the same)

    Thanks in advance, regards

  • Peau

    The camera is in charge of seeing the touch surface where the blobs will be formed, so you want to put in only the area which you want the camera to track. This usually is the area that the image is projected, as that is the area that the user is wanting to manipulate.

  • Julian

    Ha! Math class (trig) :P triangle, with 116 degrees (PS3 camera) on angle A, side a is the horizontal view so say 17.5″ (widescreen 19″). Assuming the camera is in the middle the other two angles are 32 degrees. Use Sine law to determine the sides, and then basic trig to solve for distance from angle A to side a

    Am I right?

  • Peau

    Well, yes, but the angle of FOV is just a number that is usually given by the manufacturer, so you can’t really figure too much out using that number. See the excel sheet, it shows you the correct formulas on it.

  • Greg

    Awesome man!!! Thanks a lot for these formulas! I didn’t know about how the CMOS size can alter FOV! Excellent!
    Greg

  • Prince of Darkness

    I know this is a little late coming in on this , but someone asked “which program opens this excel chart”.
    If you don’t have excel, you could try Open office. It’s free:-)

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!