fit_line_3d — 3D geometry op

데이터 종류: pointsprimitive

호출: import fullseye as fs; fs.ledger.fit_line_3d(points)(구현을 직접 호출하려면 import match3d; match3d.fit_line_3d(points), 원장에서 가져오려면 ops3d.get("fit_line_3d"))

사용법

점군 → 최소제곱 직선(통과점=무게중심, 방향=최대 주축). 반환값 (point, direction).

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

`(N,3) の点群(数値・列数 3 でなければ ValueError、2 点未満も ValueError)の重心 c` と

散布行列 `(P−c)ᵀ(P−c)` の最大固有値の固有ベクトルを返す(直交距離の二乗和を最小化する直線。

z=f(x) 型の回帰ではない)。`direction は単位ベクトルで **符号は任意**(eigh` 次第。向きを

揃えるなら `(P[-1] − P[0]) @ direction` の符号で反転)。

2 点だけなら 2 点を通る直線。点が平面状に広がっていると最大軸は「最も長い方向」になるだけで

直線とは限らない(残差は返さないので `distance_point_line` で確かめる)。外れ値に弱い

(ロバストには `ransac_line`)。3-D 専用(2-D 点は ValueError)。

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

geometry_metrologypy -3.11 examples_3d/geometry_metrology.py

타입이 이어지는 다음 연산자(primitive 를 입력으로 받는 것)

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

같은 카테고리(geometry)

line_from_2points · plane_from_3points · angle_3points · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line


*Provenance: match3d.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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