FiducialCollection.estimatePose: ids/cornerss zip misaligns after ID filtering
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- opencv, python
调研方向
从 ImageFiducials.py 中的 FiducialCollection.estimatePose 开始,检查检测到的角点和 ID 是如何被过滤的。为多个板或多余的标记 ID 添加回归测试覆盖,然后验证过滤后的角点和 ID 仍保持对应关系,并且现有测试套件通过。
由索引模型根据 Issue 内容生成。
描述
Found 2026-08-03 while fixing the OpenCV 4/5 `ids` shape compat issue in the same method (see #44). `ImageFiducials.py`'s `FiducialCollection.estimatePose` does:
```python
cornerss = [
corners.T.squeeze()
for corners, id in zip(cornerss, ids)
if id in self._ids
]
ids = [id for corners, id in zip(cornerss, ids) if id in self._ids]
```
The second line's `zip(cornerss, ids)` pairs the already-filtered `cornerss` (reassigned on the line above) against the original, unfiltered `ids`. If any detected marker's ID isn't in `self._ids` (exactly the scenario the docstring calls out -- "filter the markers, useful if there are several ArUco boards in the scene"), the two lists have different lengths and `zip` silently pairs mismatched corners/ids from that point on. Only harmless when every detected marker happens to belong to this board (no actual filtering occurs), which is presumably why it hasn't been caught yet.
Fix
Compute the filtered `cornerss`/`ids` together in a single pass (e.g. one list comprehension producing tuples, then unzip), so both lists are always built from the same original, unfiltered pairing. Needs a test with multiple boards/extraneous marker IDs in view to catch a regression -- there's currently no coverage for the multi-board filtering case at all.
- 主要语言
- Python
- 星标
- 220
- 派生
- 30
- 平均合并
- 12 天 23 小时
- 30 天内合并 PR
- 5
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
petercorke/machinevision-toolbox-python 的其他 Issue
-
tech-debt
难度 2/5 1-3 小时 新手友好度 78/100
-
tech-debt
难度 2/5 1-3 小时 新手友好度 85/100
-
tech-debt
难度 4/5 3-5 天 新手友好度 52/100
-
tech-debt
难度 3/5 1-2 天 新手友好度 72/100
-
tech-debt
难度 5/5 一周以上 新手友好度 25/100
查看 petercorke/machinevision-toolbox-python 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·