refine_peak_newton — 3D refine op

Data kinds: score × positionposition

Call: import fullseye as fs; fs.ledger.refine_peak_newton(score, idx, device='cpu', max_iter=12, tol=0.0001) (to call the implementation directly, import match3d; match3d.refine_peak_newton(score, idx, device='cpu', max_iter=12, tol=0.0001); from the registry, ops3d.get("refine_peak_newton"))

Return value through the ledger: fullseye.ledger.refine_peak_newton(...) returns **only the declared out type position** (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.refine_peak_newton.raw(...) or call match3d.refine_peak_newton directly.

GPU: this op has a GPU path (device="cuda")

Usage

Refine the integer peak of a score/correlation volume to sub-voxel accuracy by 3-D Newton (iterative optimisation).

> The detailed description below is the original text — the summary and the headings are translated.

粗いマッチ(整数 NCC / Fourier-Mellin ±3° / Hough ±0.5voxel)が返す整数ピーク idx を、局所の

2 次モデル f(x)≈f0+gᵀΔ+½ΔᵀHΔ の停留点 Δ=-H⁻¹g へ反復更新して連続座標へ収束させる。

軸別の放物線サブピクセルと違い 全 3x3 Hessian(交差曲率 fzy,fzx,fyx を含む) を使うため、

回転した(相互曲率のある)異方性ピークでも座標軸間の結合バイアスを除去できる。

各反復: 現在位置まわりの 27 近傍を trilinear で取得 → 中心差分で勾配 g と 6 成分 Hessian H を

組み、Δ=solve(H,-g)。各成分を ±1 voxel にクリップ(信頼領域)して位置を更新、|Δ|<tol で収束。

ガウス山では中心差分勾配の零点が真のピークに一致するため停留点へ収束する(単一ステップでは

2 次モデル誤差が残り ±0.05voxel を割れないが、反復で ~0.02voxel まで収束)。H が負定値でない

(=極大でない)real な相関面では上昇方向へ退避(勾配上昇ステップ)して発散を防ぐ。

Parameters

----------

score : array_like または torch.Tensor

3D スコア/相関 volume (D,H,W)。値が大きいほどピーク。

idx : tuple[int,int,int]

整数ピーク座標 (z,y,x)(通常 argmax の unravel 結果)。

device : str

"cpu" / "cuda"。torch 演算の device。

max_iter : int

最大反復回数(既定 12)。

tol : float

収束判定(更新量 L2 ノルム、既定 1e-4)。

Returns

-------

numpy.ndarray

[score_peak, z, y, x] (精緻化後)。score_peak は精緻化位置での trilinear 補間スコア。

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

refinementpy -3.11 examples_3d/refinement.py

Ops the type connects to (they accept position as input)

refine_translation_lk · refine_lm · fuse_to_voxel

Same category (refine)

refine_translation_lk · refine_lm · refine_rotation_z · icp_point2point_3d · icp_point2plane


*Provenance: match3d.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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