Does the true focal length of a lens equal to the numbers written on the lens?
For Example, is the focal length of 70 mm or 200 mm really 70 mm or 200 mm or smaller? Example: 69.5 and 199.7.
Oh, it is worse than that. Many lenses designed for still photography exhibit focus breathing, where the angle of view varies over the range of distances the lens can focus. Normally this isn't an issue for still photography, but lenses designed for cine use (video) will normally try to minimize focus breathing.
Lenses, at their heart, are mass produced optical/mechanical devices and have manufacturing tolerances. The aperture settings, minimum focusing distances, exact focal length, even things like the alignment of the lens elements and how parallel the lens mount will be to the sensor are all subject to manufacturing tolerances and variability. A good insight into this world is the company blog at lensrentals.com, they tear down lenses and talk about how they are made and what makes individual lenses different (among other things).
I know nothing about AR / VR, but I imagine that fixing things in software would be the easiest path.
Published focal length is rounded in some degree, normally to nearest 5 or 10, or in some short cases, to the nearest 1.
More precision would not be realistic, because the marked focal length is only applicable to focus at infinity. The focal length (defined as the distance to the image plane) changes and becomes longer for any focused distance less than infinity. Zooming of course changes it too. In some cases, internal focusing changes it in unexpected ways. Some internal focusing zooms actually get shorter focused up close. Shifting the internal elements around always changes things.
At 1:1 macro (equal distance behind and in front of the lens), the Thin Lens Equation says focal length becomes 2x at 1:1.
But in that way (measuring object and image sizes, at the actual focused distances behind and in front of lens), it is theoretically possible to calculate exact focal length for the situation, in the unlikely event that it would serve any purpose.
EDIT: We hear: "Focal length does not change." Really? The focal length marked on lenses is the focus point for an object at infinity. Focus at other distances cannot change the marked focal length writing, but that's just a name, semantics. The same lens does focus at other distances, which of course necessarily changes focus point.
The definition of focal length is the point where focus is brought to a point, which varies with subject distance. This is the reason we have to focus. If focal length in fact never changed, we would never have to refocus.
If instead of infinity, if you instead focus up close, focus is brought to a new point, and there will definitely be a change in focal length. This change affects f/stop number calculation too, but which is considered minor enough until magnification reaches 0.1x (at maybe a foot or so, depending). But closer, at 1x (called 1:1), the focal length doubles, causing a two stop increase in marked f/stop numbers. Most lenses will not focus that close, to avoid that complication.
In a word, no. The numbers on a lens [except the serial number ;) ] are an approximation for practical use for photography. Individual pieces can be calibrated to varying degrees of precision for specialized purposes.
A "24mm lens" is a designation for a lens that has a focal length of 24 mm more or less.
This is less of a problem than marketing a line of 24.001mm, 24.329mm, 23.918mm, 23.988mm, 24.199mm, etc.
Which one would you choose if you had to select one?
Would you recalculate your need for each of your AR-VR applications? Do you anticipate your job involves more than one device at that accuracy? Engineers get fired for spending more company resources pursuing unnecessary accuracy and detail. That's why a manufacturing tolerance is so valuable. Our stuff is affordable and practical.
If you do any kind of computer vision work, you need to calibrate your lens to get accurate result. And I would strongly recommend using a fixed focus lens (rather than a zoom lens) because it's going to be almost impossible to return to the same zoom setting every time (or to calibrate for every zoom setting).
With that said, this is a good introduction to camera calibration - it shows there are many factors that need to be measured and corrected before you can use a camera for measurements. And that is really the only time you need to know the focal distance very precisely.
Of course the focal length is only one parameter of interest when you do computer vision: there are many kinds of distortion introduced by different lens constructions, and you really need to know your lens properties well (much better than just the focal length) if you are going to do anything with precision.
The focal length of a lens is a measurement made when the lens is imaging an object at infinity, symbol ∞. Infinity translates to “as far as the eye can see”. The best object to use to make this measurement is a star. However, if the object is 1000 yards/meters away, the error is less than 0.001 inches (0.025mm). This measurement is taken from a point called the rear nodal. One might think this point is close to the middle of the lens barrel. Its actual location is likely moved forward or back of the mid-point due to fact that a camera lens is a complex grouping of lenses, some with positive power (convex) and some with negative power (concave). It takes seven elements or more to mitigate lens aberrations that plague.
A true telephoto has a rear nodal shifted forward of center. This design shortens the lens barrel thus the camera and lens will be less awkward to use and carry. A wide-angle will likely have the rear nodal shifted rearward, this backs the lens away from the film or sensor. The idea is to increase the back focus distance to allow clearance for a reflex mirror.
The values engraved on the lens barrel are likely accurate to 1 thru 1 ½ %. When you focus on objects closer than ∞; the focal length increases. When close focused to achieve life-size (unity or 1:1), the lens will be positioned one complete focal length forward. This means, a 50mm lens working at 1:1 is functioning like a 100mm, the light loss is two f-stop (4X). A true macro lens is designed to work in close and not suffer such a light loss.
Lots to learn about lenses – I call this stuff gobbledygook!
As one example, I learned some years ago that the actual focal length of Hasselblad V System lenses does not necessarily match what is etched onto the lens. Take a look at the datasheets on Hasselblad Historical for the details.
It's just not important to that degree of accuracy. The ultimate consumer will be a human eye, and no one will be able to tell the difference between a 24.001mm lens and one that's 23.9998mm