caliper op• Data kinds: none → measurehandle (an op determined by its arguments alone — it takes no image or data input)
• Call: import fullseye as fs; fs.ledger.gen_measure_rectangle2(row, col, phi, length1, length2, shape) (to call the implementation directly, import measuring1d; measuring1d.gen_measure_rectangle2(row, col, phi, length1, length2, shape); from the registry, opsmeasure1d.get("gen_measure_rectangle2"))
• HALCON equivalent: gen_measure_rectangle2 (the HALCON reference is a useful guide to its meaning and parameters)
• GPU: none (CPU reference implementation only)
Defines a rotated measurement rectangle (the profile is sampled at 1 px spacing along the major axis in direction phi) (gen_measure_rectangle2). Number of samples n = max(2, round(2*length1)+1); the start point lies -(n-1)/2 px from the center. length2 is the averaging width across the profile [px].
> The detailed description below is the original text — the summary and the headings are translated.
★長さの意味(2026-11-09 に実装へ合わせて明記。値は変えていない):
• length1 は半長(プロファイルは中心 ± length1)。HALCON の Length1 と同じ。
• length2 は全幅: measure_pos は法線方向の np.linspace(-w/2, w/2, max(2, w)) (w = int(length2))の w 本を平均し、w ≤ 1 なら平均しない。HALCON の Length2 は 半高(Half height of the rectangle、HALCON の reference)で、同じライブラリの gen_rectangle2_contour_xld も length2 を半幅(角が ±length2)として描く —— 同じ数字を渡すと、ここでは半分の幅しか平均しない。★HALCON の整数 offset −L2..+L2(2·L2+1 本)をそのまま作る length2 は無い: length2 = 2·L2 + 1 を渡すと本数は 2·L2+1 だが、offset は ±(L2 + 0.5) の範囲に間隔 (2·L2+1)/(2·L2) で並ぶ(L2=2 → w=5 で −2.5, −1.25, 0, 1.25, 2.5)—— 整数でなく幅も 1 画素広い。辺が測定線に直交していれば平均の結果は近いが、幅方向に構造があると別の矩形を測る。
• w が偶数のとき標本は中心の行を通らない(w=2 は offset ±1 の 2 本だけ、w=4 は ±2, ±0.67)。中心を含めたいなら奇数の w。
★角の向き: プロファイルは (row + t·sin φ, col + t·cos φ) に進む。行が下向きの画像座標で φ を時計回りに数える(φ = +π/2 は画面の下向き)。HALCON の Phi は水平からの「数学的に正」の角(gen_rectangle2 の reference)で、行が下向きの画像では反時計回り(φ = π/2 は上向き)と読める —— 符号が逆。HALCON の Phi を移すなら phi = −Phi (極性 positive/negative と並び順が HALCON と揃う)。★HALCON の実機での照合はしていない(reference の文言からの読み)。ライブラリ内では gen_rectangle2_contour_xld も同じ +sin で一貫している。
• subpixel_measuring 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.
• example_scratch_width — py -3.11 examples/example_scratch_width.py
• poc_barcode_1d — py -3.11 examples/poc_barcode_1d.py
• poc_battery_electrode_breathing — py -3.11 examples/poc_battery_electrode_breathing.py
• poc_calipers_under_illusion — py -3.11 examples/poc_calipers_under_illusion.py
• poc_dimensional_inspection — py -3.11 examples/poc_dimensional_inspection.py
• poc_screw_thread_metrology — py -3.11 examples/poc_screw_thread_metrology.py
• poc_solar_limb_darkening — py -3.11 examples/poc_solar_limb_darkening.py
• poc_telecentric_metrology — py -3.11 examples/poc_telecentric_metrology.py
• poc_tree_ring_dendro — py -3.11 examples/poc_tree_ring_dendro.py
• poc_water_level — py -3.11 examples/poc_water_level.py
• poc_weld_bead_profile — py -3.11 examples/poc_weld_bead_profile.py
• poc_weld_radiograph_porosity — py -3.11 examples/poc_weld_radiograph_porosity.py
measurehandle as input)translate_measure · measure_pos · measure_pairs · fuzzy_measure_pairing
caliper)gen_measure_arc · translate_measure · measure_pos · measure_pairs · fuzzy_measure_pairing
*Provenance: measuring1d.py — MEASURE1D 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.