piv_peak_locking — PIV assess op

Data kinds: flow2dtable

Call: import pivops; pivops.piv_peak_locking(flow, bins=20) (or opspiv.get("piv_peak_locking"))

Usage

> This operator's description has not been translated yet. The original text follows as it is.

ピークロッキングの強さ。小数部の分布が一様からどれだけ外れているか。

サブピクセル推定は、真の変位の小数部が 0 や 0.5 のときにそこへ引き寄せられる

偏りを持つ(相関ピークの形と当てはめる関数の形が違うことから来る、PIV の

教科書的な系統誤差)。流れが一様でなければ小数部は一様分布に近いはずで、

そこからのずれを測る。

指標 `c0` は標本数に依らないカイ二乗型のずれ:

`sum((n_i - n_bar)^2 / n_bar) / (bins - 1)`。一様分布から標本を取ると

期待値 1 になるので、1 前後なら一様と区別できない、大きいほど偏っている。

★ ただしこの指標は「真の変位の小数部が一様である」ことを仮定する。窓の数が

少ない場や、変位がゆっくり変わる場では真値そのものの c0 も大きくなる

(実測: 線形ランプの真値で 82 —— 窓格子が 19 列しか無く小数部が離散的に

しか現れないため)。したがって c0 は同じ入力の真値と比べて読むこと。

決定的な診断は別にある —— 一様並進の小数部を 0 から 0.9 まで振り、

推定値が対角線に乗るかを見る。実測(win=32、density 0.02):

========== ================= ==================

推定法 小数部誤差の RMS 最大絶対誤差

========== ================= ==================

gauss3 0.0037 px 0.0088 px

parabolic 0.0104 px 0.0151 px

centroid 0.2259 px 0.3701 px

========== ================= ==================

`centroid` は真値 0.1 を 0.02、0.9 を 0.98 と答える —— 整数へ引き寄せる

教科書どおりの S 字。出るはずのものが出たことの確認であって、

実装の不具合ではない(だから 3 つとも残してある)。

Args:

flow: `(2, h, w)`。

bins: 小数部のヒストグラムの階級数。

Returns:

dict: `c0(両成分合わせた指標)、hist((2, bins)`)、

`frac_mean / frac_stdbins`。

Detailed usage guide

piv_displacement family guide

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.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• (none yet)

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

Same category (assess)

piv_sample_at_windows · piv_error_stats · piv_time_statistics


*Provenance: pivops.py — PIV 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.