surface_fit op• 데이터 종류: image2d × image2d × image2d → poly_surface
• 호출: import fullseye as fs; fs.ledger.fit_poly_surface(x, y, z, degree=2)(구현을 직접 호출하려면 import match3d; match3d.fit_poly_surface(x, y, z, degree=2), 원장에서 가져오려면 ops3d.get("fit_poly_surface"))
산포 (x,y,z) → z=f(x,y) 다항 최소제곱. 반환값 model(coef/powers/degree/rms/pv).
기저 {x^i·y^j : i + j <= degree}(항 수 (degree+1)(degree+2)/2. degree=1이면 3항의 평면, 2이면 6항의 2차 곡면)를 lstsq로 맞춘다. x, y, z는 요소 수가 같으면 형태는 상관없다(내부에서 ravel. 격자라면 np.mgrid의 출력을 그대로). 반환값 dict: coef (T,) 계수, powers는 각 계수의 (i, j)(항 x**i * y**j), degree, rms는 잔차 RMS, pv는 잔차의 peak-to-valley(max − min). 단위는 z.
• 점 수가 항 수보다 적으면 최소 노름 해가 조용히 반환된다. x, y의 자릿수가 크면 고차에서 조건이 나빠진다
(좌표를 중심화, 정규화한 뒤에). NaN 검증은 없다.
후단: eval_poly_surface(model, x, y)로 임의 점을 평가. 격자의 높이장이라면 surface_form_error / background_flatten이 이것을 내부에서 호출한다.
• blas_threads_and_memory — 행렬 분해가 느린 이유 — BLAS 스레드·캐시·메모리 배치
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• contours_to_terrain — py -3.11 examples_3d/contours_to_terrain.py
poly_surface 를 입력으로 받는 것)fuse_to_voxel · eval_poly_surface
surface_fit)eval_poly_surface · surface_form_error · background_flatten
*Provenance: match3d.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.