print_layer_defect_map — PRINTPATH inspect op

• Data kinds: image2d × image2d → image2d

• Call: import fullseye as fs; fs.ledger.print_layer_defect_map(observed: 'Any', expected: 'Any', tolerance_px: 'int' = 2, threshold: 'float' = 0.5) -> 'np.ndarray' (to call the implementation directly, import printpath; printpath.print_layer_defect_map(observed: 'Any', expected: 'Any', tolerance_px: 'int' = 2, threshold: 'float' = 0.5) -> 'np.ndarray'; from the registry, opsprintpath.get("print_layer_defect_map"))

Usage

Signed defect map image2d comparing an observed layer image with the expected layer image (gcode_layer_image): +1 = missing where material should be (gaps, clogs), −1 = present where nothing should be (stringing, overflow, spaghetti), 0 = match.

Both are binarised with threshold, and only pixels not contained in the other image dilated by tolerance_px count as defects (tolerating misalignment and line-width wobble). No registration is done -- map the camera image onto the same pixel grid as gcode_layer_image first.

Detailed usage guide

• printpath family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_print_layer_inspection — py -3.11 examples/poc_print_layer_inspection.py

Ops the type connects to (they accept image2d as input)

stipple_points_from_image · stipple_energy · stroke_tone_error · halftone_screen · engrave_lines · hatch_field · mosaic_tiles_sites · mosaic_tiles_render

Same category (inspect)

—


*Provenance: printpath.py — PRINTPATH operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.