Create a calibration target at an exact size, print it directly from the browser, and verify its scale with the reference ruler.
OpenCV 4.13: replace target.png with an image of the target. Dimensions in the code are in millimeters. The parameters and this code are printed on the sheet.
A printer can distort scale unevenly across the sheet, so a single correction factor will not fix the target.
The tool generates a calibration target of exact size and prints it straight from the browser: a checkerboard, a circle grid (symmetric and asymmetric), a ChArUco board and a ruler for scale verification. All dimensions are set in millimetres; the target parameters and ready-to-run OpenCV code are printed alongside so that the calibration software receives the same numbers.
Example 1. Field of view 100 × 75 mm. A 9 × 7 checkerboard with 10 mm squares gives 8 × 6 inner corners and occupies 90 × 70 mm — almost the whole field, while each square gets enough pixels with any camera from 1.3 MP.
Example 2. Field 500 × 400 mm and a 2448 × 2048 px camera: about 4.9 px/mm. A 25 mm square spans 122 px — robust corner detection; a 19 × 15 board with 25 mm squares covers 475 × 375 mm.
Example 3. The target is printed on A4 with “fit to page”: the ruler reads 97 mm instead of 100. Print again at 100 % scale, otherwise the calibration receives wrong dimensions.
A checkerboard for most tasks. A circle grid when centre accuracy under perspective matters. ChArUco when the target may be partially occluded or captured at a steep angle: the markers identify every square.
Measure the printed ruler with callipers or a steel rule: the reference distance must match the printed label. If it differs, disable scaling in the print dialog.
Large enough that it spans at least a few dozen pixels in the frame, while the whole target fills a substantial part of the field of view. The resolution on the object can be computed in the optics calculator.
A ready Python snippet for OpenCV 4.13 with the parameters of this exact target in millimetres. Replace the image file name and run it.