refine_rotation_z — 3D refine op

数据种类:voxel × voxel × angleangle

调用: import fullseye as fs; fs.ledger.refine_rotation_z(scene, template, init_angle_deg=0.0, device='cpu', iters=40, tol=0.001, max_step_deg=5.0)(要直接调用实现,import match3d; match3d.refine_rotation_z(scene, template, init_angle_deg=0.0, device='cpu', iters=40, tol=0.001, max_step_deg=5.0);从台账取用则 ops3d.get("refine_rotation_z"))

经台账调用的返回值: fullseye.ledger.refine_rotation_z(...) 只返回**声明的 out 类型 angle 的值**(底层函数还会返回辅助信息)。需要被丢弃的部分时,使用 fullseye.ledger.refine_rotation_z.raw(...),或直接调用 match3d.refine_rotation_z

GPU:该算子有 GPU 路径(device="cuda")

用法

z 轴旋转角的 Gauss-Newton 精化(SSD 上的 Lucas-Kanade,单参数)。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

Fourier-Mellin 等の粗い z 軸回転推定(±3° 級)を、SSD を回転角 θ だけで最小化して高精度化

する下流精緻化器。scene ≈ rotate_z(template, θ_true) を仮定し、warp_z(template, θ) が scene に

一致する θ を求める。返り値の角は match_logpolar_z と同符号(scene = template を θ 回転)。

定式化: 残差 r(θ)=T_warp(θ)−S を θ で線形化。回転の steepest-descent image(解析ヤコビアン)

は、中心化格子 (X=W−cx, Y=H−cy) と warp 済みテンプレの空間勾配 (gx,gy) から

J = ∂T_warp/∂θ = (−gx·Y + gy·X)(rad あたり)。1 パラメータ GN 更新は Δθ = −(JᵀWr)/(JᵀWJ)。

回転で 0 詰めされた隅は valid マスク W で除外。step は max_step_deg で制限し発散を防ぐ。

実測(48³ 非対称 volume, CPU, 別補間器 scipy order=3 で scene 生成=inverse crime 回避):

clean 誤差 ~0.0006°、5% ノイズ 0.009°、10% ノイズ 0.017°(いずれも <0.3°)。捕捉レンジは

最低 ±10°、収束 3-5 反復・~12ms。粗推定 ±3° をそのまま使う場合(誤差 3°)比で ~5000 倍改善。

Parameters

----------

scene : array_like (D,H,W) 基準 volume(この姿勢へ template を合わせる)。

template : array_like (D,H,W) 回転させて scene に合わせるテンプレ volume。同一格子・同一中心。

init_angle_deg : float 粗推定角(deg)。Fourier-Mellin 等の初期値。

device : str "cpu" / "cuda"。device 非依存。

iters : int 最大反復数。

tol : float |Δθ|(deg)がこれ未満で収束打ち切り。

max_step_deg : float 1 反復あたりの角ステップ上限(deg、発散防止)。

Returns

-------

(angle_deg, n_iters) : (float, int) 精緻化角(deg)と実行反復数。

参考(示例数据・文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

refinementpy -3.11 examples_3d/refinement.py

类型可衔接的下一个算子(可接受 angle 作为输入)

fuse_to_voxel

同类别(refine)

refine_peak_newton · refine_translation_lk · refine_lm · icp_point2point_3d · icp_point2plane


*Provenance: match3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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