You captured 150 frames of a checkerboard and the calibration tool kept 21. Before touching camera settings, look at the target itself: most printed boards carry thin white seams where the black squares should meet, and those seams break exactly the corners the detector needs. This page shows how to confirm the defect with a zoom test, print a board whose four squares meet at true cross corners, light and mount the target so every frame is sharp, and move from a 14% acceptance rate to a set where nearly every frame passes. It is for anyone preparing camera, stereo or hand-eye calibration who is losing frames to detection.
Why did only 21 of my 150 calibration images pass corner detection?
Because the detector succeeded on 21 of 150 frames — 21 ÷ 150 ≈ 0.14, a 14% pass rate — and the set workflow then accepted only the frames whose detected board size matched the size it saw most often. The other 129 images were culled, not badly captured.
Detectors of this family, such as the detectCheckerboardPoints function, scan each frame, find the grid and return a board size together with the corners. Run on a set, they tally the sizes, pick the most common and keep the matching frames only. On a sound board every frame reports the same size. On a seam-defective board the number of junctions the detector can bridge shifts with focus, tilt and exposure, so the sizes scatter and most frames lose the vote.
The index error in the plotting line is a symptom, not a cause: failed frames return an empty points array, and plotting column 1 of an empty array throws. The camera, the lens and the capture code were fine; the print was not. For a decision tree that goes beyond the print itself, see Checkerboard calibration not detecting corners: what to check.
Are there white gaps where four squares should meet?
Zoom to 100% on a junction where four squares meet: a valid target puts two black and two white squares against a single point — a cross corner — and any white seam separating the black corners breaks it.
Detectors lock onto cross corners because the black-to-white edge crosses the junction in both directions, which pins the point in x and y to a fraction of a pixel. Where a seam cuts the black corners apart, the detector sees smaller squares offset from their neighbours, and it reports a smaller board or nothing at all. A frame that reads 5 x 4 where the board is 5 x 5 has lost a whole row of junctions — the signature of a seam running along that row.
Two quick tests separate a print defect from a capture defect. First, run the detector on single frames rather than the set: sizes that differ between frames point at unstable geometry, which means the print. Then inspect the paper directly: at 300 dpi one printer pixel measures 25.4 ÷ 300 ≈ 0.085 mm, so a seam you can see without magnification is many printer pixels wide and well past what a cross corner tolerates.
How do I print a checkerboard with true cross corners?
Draw the grid as vector art with squares that share exact edges, export a PDF, print it at 100% scale with fit-to-page disabled, and check one junction under a loupe before shooting a single frame.
- Draw each square at exact coordinates with a solid black or white fill and no cell borders, so black cells share edges end to end.
- Export to vector PDF and print at actual size. Print dialogs rescale by default, and a silent few-percent shrink changes the pitch you then feed the calibrator.
- Leave a white margin of at least one square width around the grid. The detector resolves the outer junctions against a plain border, and a tighter margin leaves them ambiguous.
- Print on matte paper and mount it flat on glass or aluminium composite. Curl and glare both cost junctions.
- Inspect two or three junctions under a 10x loupe: the black corners must touch at one point. Then measure the printed pitch with calipers and feed the measured value to the calibrator.
If a clean, gap-free board still calibrates badly, the pitch is the next suspect: fixing checkerboard calibration error by checking grid pitch walks that diagnosis.
How many pixels does each square need?
Keep each square at 20 pixels per side as a working floor and aim for 50 or more: below about 20 px the junction spans too few pixels for the detector to separate the four arms and refine the corner.
The floor comes from the corner step itself: the detector first labels cells black or white, then fits each junction to the intensity gradient around it, and both stages need pixels to work with. The frame that matters is the worst one in the set — the most tilted, most off-centre shot — not the straight-on frame.
Worked example: a camera with 2448 px across views a field 300 mm wide at the target. The scale is 300 mm ÷ 2448 px ≈ 0.1225 mm per pixel, so a 30 mm square spans 30 ÷ 0.1225 ≈ 245 px. Tilt trims that: at 45° the projected pitch scales by cos 45°, leaving 245 × 0.71 ≈ 174 px, still well above the floor. This budget assumes an area scan camera framing the whole board; when the board must sit farther away, why checkerboard calibration fails at distance picks up exactly this constraint.
Corner coordinates come back refined to fractions of a pixel, and how those fractions map onto pixel centres is its own convention — see interpreting subpixel corner coordinate conventions.
Which lighting keeps the corners detectable?
Light the board evenly and hold the white squares just below saturation, around 200 to 230 out of 255 in the histogram, because clipped white erases the black-to-white gradient the sub-pixel corner fit needs.
Overexposure alone can empty an otherwise sound set: junctions blown to 255 lose their gradient and the detector reports nothing, a failure reported repeatedly under too-bright lighting. Read the histogram of one straight-on frame and cut exposure or aperture until the whites sit in range. Focus carries equal weight, since a junction blurred by a pixel or two fails the same way; the lighting and focus fixes for an undetected chessboard cover that diagnosis.
Plain matte paper under diffuse light is the simplest reliable surface. If the target must be durable, do not laminate it: gloss whites out the junctions from most viewing angles. Either mount the matte print under a clear flat plate or cross-polarize, fitting a polarizer on the light and the analyzer at 90° on the lens; the crossed-polarized lighting method shows the arrangement.
For the sharpest junctions of all, print the grid on translucent film and backlight it. Light through the film turns every white square into an even emitter and every black square into a clean blocker, the same principle as a backlit dot calibration plate. Red emission suits monochrome sensors, which respond more strongly to red than to blue. Three backlights cover the common target sizes:
- Size
- 100-200 mm
- Type
- Standard
- Size
- 100-200 mm
- Type
- Collimated
- Size
- 100-200 mm
- Type
- Standard
The LS-BKL-1468 is a 150 x 150 mm red flat backlight. A 9 x 7 grid of 15 mm squares spans 135 x 105 mm, which fits inside with margin.
The LS-BKL-0830 is a 120 x 120 mm collimated backlight. Collimation gives the tightest edge through film; the trade is less lit area. The LS-BKL-0750 is a 180 x 100 mm high-luminance backlight. The higher output buys shorter exposures when the set is shot quickly. For other sizes, colours and wavelengths, browse the backlights or the lights finder.
How should I mount the camera and the target?
Fix the camera on a stand such as the LS-MNT-0040, which has a 700 mm height and a 400 x 450 mm base, and glue the print to a flat rigid plate. Handheld capture adds tilt and refocus drift that cost junctions frame by frame.
Square the camera to the board for the reference frame, then vary the pose across the set: tilt the board in both axes up to roughly ±45° and park it toward each corner of the frame. Set the working distance so the board fills a third to two thirds of the frame width. Keep the print flat — a board that bows lifts its outer junctions off the plane the world model assumes. Hold the exposure short and fire with a remote or timer, because motion blur past a pixel costs junctions the same way defocus does.
If the lens autofocuses, lock the focus before the first frame and leave it alone for the whole set; locking the focus first when calibrating an autofocus camera explains why the lock matters. For other heights, stage types and mounting brackets, browse the camera stands range.
A stand with a slide table lets you re-space frames between shots without knocking the focus:
- Type
- Camera stands
When is the target not the problem?
If the zoom test shows clean cross corners and frames still return different board sizes, check in this order: focus blur, saturation, the white margin, then frames where the grid touches the image border.
- Blur first. A junction needs its gradient, so a frame focused a few centimetres off fails while its neighbours pass. Open rejected frames at 100% before blaming the detector.
- Saturation second. Whites clipped at 255 remove corners as surely as seams do; re-read the histogram.
- Margin third. A grid printed to the paper's edge, or parked against the frame border, leaves the outer junctions unresolved. Keep one square of margin and the whole grid inside the frame.
- Cull deliberately last. Once sizes are consistent, the remaining rejects are usually genuine defects; deciding whether to discard a bad calibration image or retake the pose gives the criteria.
Judge the result by the calibration's own numbers: compare the average and maximum residual values against targets before trusting the solve.
What does a healthy capture set look like?
Reshoot with the corrected target and expect essentially every frame to be accepted; the few rejects left should each show an obvious defect such as blur, clipping or a partly visible board, not a size mismatch.
- Junctions touch. Two black and two white squares meet at one point at 100% zoom; nothing else in the set matters without this.
- One-square margin. Plain white border around the grid and the whole grid inside the frame, so the outer junctions resolve.
- 20 px on the worst frame. The most tilted frame decides the pixel budget, not the straight-on one.
- Whites at 200-230. One histogram check on a straight-on frame confirms no clipping at 255.
- Matte and flat. No lamination glare, no curl under the mounting plate.
- Poses varied. Tilt in both axes and a frame with the board toward each corner of the image.
- Same size everywhere. Run the detector per frame first; every frame should report the same board size before the set run goes through.
With those boxes ticked, the calibrator should use nearly all of your images, and the difference shows up immediately in the acceptance list. When you are ready to build the bench around the target, the stand configurator steps through camera, lens, light and stand in order, and more capture-and-calibration guides sit on the systems topic page.
Questions
Why does my plotting line throw an index error on the failed frames?
The detection returned an empty points array for those frames, so the line that plots the first column of results indexes past the end of an empty matrix. Guard the plot with a size check on the array before drawing. Treat the error as evidence of a rejected frame rather than a separate bug: once the target prints cleanly and detections return, the error disappears on its own.
Can I backlight a checkerboard printed on ordinary office paper?
No. Office paper scatters and blocks too much light for a backlight to trace the squares behind it. Print the grid on translucent film or a thin frosted sheet instead, hold it flat against a clear plate, and mask around the grid so light escapes only through the printed area. A diffuser between the backlight and the film evens out hot spots from the LED rows.
How many calibration images should I aim for once detection works?
Between 10 and 30 well-spread frames is the working range for a camera calibration: the board tilted in both axes and placed toward each corner of the frame. Past that, extra frames add little. Watch the reported residuals after each run and stop adding images when the average stops falling, because more frames of the same pose add no information.
Is a bought calibration target better than a printed one?
For camera intrinsics, a clean home print is usually good enough once the junctions touch and the board sits flat. For work that feeds robot guidance or dimensional measurements, a lithographically printed film or glass target keeps its pitch and edge sharpness through handling and time. Whichever you choose, measure the real square pitch and feed the measured value to the calibrator rather than the nominal one.
Should I keep frames where a whole row of corners is missing?
No. A board read one row short means a full line of junctions failed, almost always along a print seam, and those corners sit where the world model expects points. A frame with a mismatched size gets culled by the set workflow anyway, so fix the print and retake the frame rather than bending the set around a partial detection.



