warp_by_plane — 3D plane_sweep_stereo op

데이터 종류: image2dimage2d

호출: import fullseye as fs; fs.ledger.warp_by_plane(img: 'np.ndarray', H: 'np.ndarray', order: 'int' = 1, cval: 'float' = nan) -> 'np.ndarray'(구현을 직접 호출하려면 import plane_sweep; plane_sweep.warp_by_plane(img: 'np.ndarray', H: 'np.ndarray', order: 'int' = 1, cval: 'float' = nan) -> 'np.ndarray', 원장에서 가져오려면 ops3d.get("warp_by_plane"))

사용법

호모그래피 H 로 img 를 역워프. → out[y,x] = img(H·(x,y,1))(bilinear).

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

H は出力(ref)画素 → 入力(src)画素の写像。視野外は cval(既定 NaN)。

出力画素 (x=列, y=行) ごとに `q = H @ (x, y, 1)(sx, sy) = (q0/q2, q1/q2)` を求め、

`scipy.ndimage.map_coordinates` で入力画像の (行 sy, 列 sx) を補間して埋める(逆ワープなので

穴が空かない)。出力の形は入力と同じ (h,w)。同モジュールの `plane_homography` が返す H

(ref 画素 → src 画素)をそのまま渡すと「src を ref 視点へ持ってきた画像」になる。

• `img: (H,W) の 2-D グレースケール(float に変換)。空・非 2-D は ValueError`。

• `H: (3,3) 以外は ValueError`。

• `order: 補間次数(既定 1 = bilinear)。prefilter=False` で呼ぶため、2 以上を指定しても

スプライン前処理を省いた近似(平滑化寄り)になる。

• `cval: 入力の範囲外に写った画素、および |q2| < 1e-12`(無限遠に飛ぶ画素)に入れる値。

既定 NaN なので、後段で `np.isfinite` により「対応が取れなかった画素」を区別できる。

`plane_sweep_depth は候補深度ごとにこの関数で src をワープし、|I_ref - warp(I_src)|` を

photo-consistency コストにしている。

배경 지식 가이드(이 연산자 앞에 있는 물리·규약)

depth_sensors — 深度センサの知識 — 測距原理・実機の値・欠測の出方

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

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

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

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

motion_scenepy -3.11 examples_3d/motion_scene.py

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

fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade

같은 카테고리(plane_sweep_stereo)

plane_sweep_depth


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

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