camera-calibration
9 posts · browse all tags
Fundamentals Camera Geometry: From a 3-D Point to a Pixel, and Back to the Camera
How a camera sends any point of the world to a pixel with one matrix, and how running that matrix backwards gives you the camera's focal length and where it stood. One pipeline, from a point on a chessboard to a pixel to a calibration and a pose, measured on OpenCV's own thirteen photographs of a board.
Fundamentals What Is Camera Calibration? Finding K from Photos of a Chessboard
Lesson 3 of Camera Geometry. Calibration measures a camera's focal length, image centre and lens bend by fitting the camera model to photos of a flat board whose corners are known. On OpenCV's thirteen chessboard photos: 0.41 px of reprojection error, a held-out photo that scores like the fitted ones, and a focal length anywhere from 520 to 568 px if only three photos are used.
Fundamentals What Is PnP? Finding Where the Camera Is from Known Points
Lesson 4 of Camera Geometry. PnP finds where a calibrated camera stood and which way it faced from points whose positions are known and where they appear in one photo. On OpenCV's chessboard photos it returns the calibration's own pose to 0.00002°, four corners are enough for 0.27 px, and with five corners found wrong a plain fit moves the camera 2.5 squares where RANSAC moves it 0.008.
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.
Fundamentals The Camera Matrix: K, [R|t] and P, Worked on a Real Chessboard
Lesson 2 of Camera Geometry. A camera is one 3×4 matrix: the focal lengths and image centre in K, where the camera stands in [R|t], and their product P, which sends any point of the world to a pixel. Worked on one corner of a chessboard in OpenCV's own calibration photos, checked against cv2.projectPoints, and taken apart again.