light_section op• 데이터 종류: image2d → table
• 호출: import fullseye as fs; fs.ledger.laser_line_center_steger(image, sigma=1.5, min_peak_rel=0.1, max_iter=3)(구현을 직접 호출하려면 import lightsection; lightsection.laser_line_center_steger(image, sigma=1.5, min_peak_rel=0.1, max_iter=3), 원장에서 가져오려면 opsoptics.get("laser_line_center_steger"))
• GPU: 없음(CPU 참조 구현만)
Steger의 Hessian 방법에 의한 선 중심의 서브픽셀 위치 (table).
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
ガウスの微分(scipy.ndimage.gaussian_filter、σ = sigma)で 1 次・2 次の微分を取り、Hessian の絶対値最大の固有値(明るい線では負)の固有ベクトル n を線の法線とし、2 次の Taylor 展開の極値 t = −(r_x n_x + r_y n_y) / (r_xx n_x² + 2 r_xy n_x n_y + r_yy n_y²) を線の中心とする(Steger 1998)。列ごとに平滑化した画像の最大の行から始め、t n が画素の外(|·| > 0.5)なら隣の画素へ移って max_iter 回まで繰り返し、|t n|∞ が最小の画素の値を採る(中心がちょうど画素の境にあると Newton の 1 歩の行き過ぎで 2 画素の間を往復するので、0.5 の厳密な判定だけでは拾えない —— 実測)。最小でも |t n|∞ > 1(隣の画素より遠い)・固有値が負でない列は valid=False。中心は 2-D の点(col も実数)。
Steger (1998): with Gaussian-derivative filters of scale sigma the line normal n is the eigenvector of the Hessian's largest-magnitude eigenvalue (negative for a bright line), and the centre is the extremum of the second-order Taylor polynomial along n. The point is 2-D (col is sub-pixel too). Also returns strength (−eigenvalue) and the normal nx, ny.
Ground truth (closed form of one Newton step on a Gaussian): for a Gaussian profile of total variance σ² = σ_line² + sigma² and a start pixel at offset δ from the centre, the error is −δ³ / (σ² − δ²) (≤ 0.125/σ² px for |δ| ≤ 0.5). Steger's condition sigma ≥ w/√3 (w = the line's half-width) keeps the profile's second derivative single-signed.
★Near the border (2026-11-09): the derivative filters extend the image by mode="nearest", which bends the profile across the line — and the estimated normal with it, so the test does not use the normal: every centre within 3·sigma of any image border, and every centre outside the image, is returned with valid=False and near_border=True. Before, such points were valid with errors of up to 1.43 px (σ_line 2, sigma 3, true row 2.2 → 0.774), and a first fix that looked at the estimated normal still let a 45° line through with 0.88 px (the border had turned its normal from 0.71 to 0.43). A horizontal line therefore loses its first and last 3·sigma columns too; render or crop a margin when every column is needed.
optics 의 모든 연산자는 입력을 검증한 뒤에 계산합니다(조용히 통과시키지 않습니다):
• 단위는 인자 이름에 넣습니다 — _mm / _um / _deg / _mrad. mm 와 µm 를 혼동하면 crash 가 아니라 「그럴듯하게 틀린 답」이 나오므로 이름으로 막습니다. 크기로 단위를 추측하는 처리는 일절 하지 않습니다.
• 문자열은 ValueError —— float('50') 은 성공하므로 파싱되지 않은 설정값이 길이로 통과해 버립니다(실측: thin_lens('50', '200') 이 그럴듯한 66.667 mm 를 돌려주고 있었습니다). bool 도 True == 1 의 암묵 승격으로 보고 거부합니다.
• complex / masked array 는 ValueError(실수 슬롯만. 허수부의 무언 절삭·마스크 벗기기를 거부).NaN/Inf 는 모든 입력에서 ValueError.단, 선언된 결측은 예외: bottle_fit_from_pattern 의 u_map 은 측정하지 못한 픽셀을 NaN 으로 받습니다(∞ 는 여전히 거부).
• 0 나눗셈과 그 친척들을 이름을 들어 거부: 초점거리 0, 곡률반경 0, 굴절률 <= 0, 불투명한 조리개(전부 0 이라 정규화가 0/0), 총합 <= 0 인 PSF, S0 = 0 인 스토크스 벡터, 물체가 앞쪽 초점에 있는 경우(상이 무한대).
• 비유한 값을 돌려주는 것은 2 개 연산자뿐이며, 둘 다 계약으로 명시: depth_of_field 의 과초점거리 너머 far_mm = inf(그것이 과초점거리의 정의)와 gaussian_beam 의 허리에서의 wavefront_radius_mm = inf(평면 파면의 곡률반경). 둘 다 유한한 짝(far_is_infinite / curvature_per_mm)을 함께 돌려줍니다. 그 밖의 무언 NaN/Inf 는 내부에서 검출해 ValueError —— 「float64 가 넘쳤다」와 「답이 무한대다」는 다른 주장이므로, 후자의 얼굴로 전자를 돌려주지 않습니다.단, 선언된 결측은 예외: bottle_background_map 은 광선을 쓸 수 없는 픽셀(전반사 등)의 u_mm 을 NaN 으로 돌려주며, valid 마스크와 개수를 함께 돌려줍니다.
• 크기 상한: 생성 격자는 optics.MAX_GRID(4096), 넘겨받은 필드/PSF/조리개는 optics.MAX_FIELD_ELEMENTS(2^24), ABCD 소자열은 optics.MAX_SYSTEM_ELEMENTS(1024), Zernike 는 MAX_ZERNIKE_TERMS(512)/ MAX_ZERNIKE_ORDER(40)/ MAX_ZERNIKE_BASIS(2^25). 작은 인자에서 거대한 내부 할당이 일어나는 경로(실측: n_max=40 × 4096² 로 108 GB)를 fail-closed 로 막습니다.
• 물리적으로 불가능한 상태도 거부: 편광도 > 1 인 스토크스 벡터, 음의 투과율, 음의 강도, n-|m| 이 홀수인 잘못된 Zernike 첨자 등.
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.
• poc_light_section_step_weld_floor — py -3.11 examples/poc_light_section_step_weld_floor.py
table 를 입력으로 받는 것)abcd_matrix · wavefront_stats · sfr_from_edge · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd
light_section)laser_line_center_centroid · laser_line_center_gauss · light_section_rig · light_section_targets · light_section_render · light_plane_calibrate · light_section_profile · light_section_scan
*Provenance: lightsection.py — OPTICS 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.