ransac_homography — MATCHREG featmatch op

• 数据种类:table → table

• 调用: import fullseye as fs; fs.ledger.ransac_homography(matches, thresh=2.0, confidence=0.999, max_iters=5000, score='msac', local_optimization=True, min_inliers=8, seed=0, model='projective')(要直接调用实现,import featmatch; featmatch.ransac_homography(matches, thresh=2.0, confidence=0.999, max_iters=5000, score='msac', local_optimization=True, min_inliers=8, seed=0, model='projective');从台账取用则 opsmatchreg.get("ransac_homography"))

• GPU:无(仅 CPU 参考实现)

用法

从匹配对稳健地估计单应矩阵(pts1 → pts2,(x, y) 的齐次坐标)。→ table(kind="homography")。

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

4 点の最小標本を引き、前向きの転送誤差 |H p1 - p2| で採点する。既定の採点は MSAC (打ち切り二乗 min(r², thresh²) の和、Torr & Zisserman 2000)で、内れ値の数だけ数える素の RANSAC(score="ransac")より閾値の近くの点の扱いが滑らか。必要な試行回数は内れ値の割合から都度見積もり(confidence)、良い仮説が出るたびに内れ値で当てはめ直す(local_optimization、LO-RANSAC)。行列の当てはめは正規化 DLT(twoview._homography_dlt、Hartley の正規化)を再利用し、退化した標本(3 点が一直線)は捨てる。

★既存の mosaic.proj_match_points_ransac は (row, col) の点・正規化なしの DLT・固定回数で、これは (x, y)・正規化 DLT・適応回数・MSAC・LO。座標の順が逆なので混ぜないこと。

★自由度の少ない模型(model="translation" 1 点 / "similarity" 2 点 / "affine" 3 点)を選べる。返りはどれも 3×3。正しい組が狭い帯にしか無い(貼り合わせの重なりが細い)とき、8 自由度の射影はその帯の組には合うのに帯の外へ大きく外挿を外す(examples/poc_part_locate_features.py の 5 節: 重なり 80 px・正しい組 9 で、射影は原点の並進を 15 px 外し、相似は 0.1 px 以内)。

Args:

matches: features_match の表。

thresh: 内れ値の転送誤差の上限 [px]。

confidence: 外れ値を含まない標本を少なくとも 1 回引く確率(< 1)。

max_iters: 試行回数の上限。

score: "msac" / "ransac"。

local_optimization: 内れ値で当てはめ直すか。

min_inliers: これ未満の内れ値しか集まらなければ失敗(ValueError)。

seed: 標本の乱数の種(同じ種で同じ結果)。

model: "projective"(既定、8 自由度)/ "affine" / "similarity" / "translation"。

Returns:

dict(kind="homography")。H (3,3)(H[2,2] = 1)/ model / inliers (M,) bool /

n_inliers / inlier_ratio / rms_px(内れ値の転送誤差の rms)/ iterations /

score / thresh / image_shape1 / image_shape2。

Raises:

ValueError: 表の種類が違う / 模型の最小標本より少ない / 非有限 / 引数が値域外 / 内れ値が min_inliers 未満

(「いちばんましな H」を成功として返さない)。

详细使用指南

• matching_registration 族使用指南

参考(示例数据、文献)

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

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

• 算法的正典(作者、年份)与用途见上面的族使用指南。

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

• poc_part_locate_features — py -3.11 examples/poc_part_locate_features.py

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

features_match · ransac_fundamental · registration_to_flow2d

同类别(featmatch)

features_sift · features_orb · features_match · ransac_fundamental · features_accuracy_table


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

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