contour op• Data kinds: image → contour
• Call: fullseye.apply(img, "lines_gauss", a=0.5, b=0.5) (the 2-D model is one image plus two scalar knobs a,b∈[0,1])
• HALCON equivalent: lines_gauss (the HALCON reference is a useful guide to its meaning and parameters)
• GPU: none (CPU reference implementation only)

*The figure is the actual output on a synthetic 128×128 input. Left: input, right: output. Point clouds are drawn as a top-down scatter (brightness = z), 1-D series as a line plot, volumes as the maximum-intensity projection along z, videos as the middle frame, complex images as magnitude; return values that are not pictures are shown as the values themselves.*
Sweeping knob a (0.1 / 0.5 / 0.9, the other knob at its default):
▸ lines_gauss: knob a sweep (docs site)
Sweeping knob b (0.1 / 0.5 / 0.9, the other knob at its default):
▸ lines_gauss: knob b sweep (docs site)
On other images (synthetic scene / photo / coins. Top row: inputs, bottom row: their outputs. Knobs at default):
▸ lines_gauss: other inputs (docs site)
*The 4th column is a colour (H,W,3) input. This op handles colour without crossing channels (it does not convolve the colour channel as a third spatial axis).*
Line (ridge) structure detection. Binarizes the response of skimage.filters.frangi (a vessel-like ridge-enhancement filter) with a threshold (0.1+0.4*a) and returns the connected components as contour point sets. This is simplified to thresholding the ridge-enhanced image, rather than the "line centerline + width estimation" that HALCON's lines_gauss (Detect lines and their width.) originally performs (an approximation in which line-width information is not returned).
★The default contour (b < 0.75) is the set of pixels of the band above the threshold in np.where raster order, not ordered along the line — quantities that depend on point order such as length_xld are meaningless (a scratch 2 px wide and 40 / 60 px long gives length_xld 117 / 177 px). To measure the length or shape of a line use the centre-line mode b >= 0.75: the band is thinned and ordered along the line, and each point is moved to the sub-pixel line centre by Steger's (1998) formula (Gaussian derivatives with σ = 1.5 px, to the intensity extremum along the Hessian's normal direction) (this corresponds to HALCON's centre line; the line width is still not returned; the ends shrink by about half the line width through thinning).
a sets the ridge-detection threshold. b >= 0.75 selects the centre-line mode (the default 0.5 returns the band's pixels). Without scikit-image it stops with MissingDependencyError (saying what to install) — it does not return a different answer.
It does not return polarity either (measured 2026-09-15): a dark line on a bright background (0.1 on 0.6, 2 px wide) and a bright line on a dark background (1.0 on 0.6) passed with the same a both give contours (a=0.5: 3 contours / 280 points and 3 / 276) and cannot be told apart from the result. If you need only dark lines apply bothat first (the white top-hat tophat returns 0 on dark lines); for bright lines only, tophat. Width is measured by another op: lay measurement lines perpendicular to the line with gen_measure_rectangle2 and take both edges with measure_pairs (measure1d family). Widths of 1–3 px are that op's danger zone (edge distance / PSF width < 3.09 biases it upward), so measure sub-pixel widths by integrating the intensity deficit (examples/example_scratch_width.py, poc_crack_width). The table of which to use when is in 2d/guides/gallery2d_contour_measure.md.
• gallery2d_contour_measure family guide
• 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.
The program below has been verified to run (same input as the figure). In Studio's help this block becomes buttons that load and run it on the spot.
lines_gauss 0.50 0.50
▸ Load this pipeline · Load & run
• example_scratch_width — py -3.11 examples/example_scratch_width.py
• gallery2d_contour_measure — py -3.11 examples/gallery2d_contour_measure.py
• poc_solar_el_inspection — py -3.11 examples/poc_solar_el_inspection.py
• poc_weld_bead_scan_angle — py -3.11 examples/poc_weld_bead_scan_angle.py
contour as input)identity · select_contours · smooth_contours · fit_line_contours · contours_to_region · count_contours · total_length · select_contours_xld
contour)select_contours · smooth_contours · fit_line_contours · contours_to_region · sk_find_contours · edges_sub_pix · select_contours_xld · smooth_contours_xld
*Provenance: ops.py — 2D 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.