optics
5 posts · browse all tags
Fundamentals Image Formation: How a Camera Flattens the World Onto a Sensor
How to predict where any point in the world lands in a photograph, and undo what the lens did on the way. One pipeline, from a point to its ray to the lens's bend to a pixel, with focus as a side question, measured on public photographs: a real lens moves a corner 51 px, and a fisheye fitted with the wrong model misses by 7.3 px against 0.64 px with the right one.
Fundamentals Lens Distortion: Where the Straight-Line Model Actually Fails
Lesson 3 of the Image Formation unit. Real glass images the edges of the frame at a different scale from the centre, and the error climbs steeply with radius. Measured on OpenCV's calibration set: the top-left pixel of a 640x480 frame belongs 51.22 px from where the pinhole model puts it, and adding the Brown-Conrady terms drops the mean reprojection error of one view from 2.55 px to 0.170 px. Straightening it back costs field of view rather than pixels: 61.67 degrees becomes 67.32.
Fundamentals Lenses and Depth of Field: What You Buy With Light, and What It Costs
Lesson 2 of the Image Formation unit. A lens buys the brightness a pinhole cannot have and charges a plane of focus for it. Worked on a published scene: 93 mm at f/4 focused at 1.52 m is sharp from 1.500 m to 1.550 m, a band 5 cm deep. Stopping down to f/22 widens it to 0.277 m, a factor of 5.54 against an aperture ratio of 5.50, and the circle of confusion behind those numbers comes out at 0.0248 mm.
Fundamentals The Pinhole Model: Why a Hole Makes a Picture, and Where the Prediction Fails
Lesson 1 of the Image Formation unit. A pinhole projects a scene point to a pixel by similar triangles, and that is a prediction you can check. Worked on one board corner from OpenCV's calibration set: the model puts it at (523.98, 77.94) and the detector found it at (513.77, 86.53), 13.34 px apart. Across the view the error is 0.29 px in the middle third of the frame and 5.75 px in the outer third, which is the shape of the problem the rest of the unit solves.
Fundamentals Fisheye Models: When Correcting the Lens Stops Working
Lesson 4 of the Image Formation unit. The pinhole model puts a ray at f·tan θ, which runs to infinity at 90 degrees, and past about 120 degrees of field the stretch toward the edges makes it impractical. Fitted to the same 15 photographs of one fisheye lens, pinhole plus Brown-Conrady reaches 7.326 px RMS and Kannala-Brandt reaches 0.644 px. At 80 degrees the first model predicts a radius of -35,572 px, a sign flip; the second predicts 458.8 px, which is on the sensor.