test_image_reshape.py: warp/undistort/interp2d tests are empty stubs
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- python
调研方向
从 tests/test_image_reshape.py 开始,将空的 test_warp、test_warp_affine、test_warp_perspective、test_undistort 和 test_interp2d stub 与 ImageReshape.py 中对应的方法进行比较。使用 issue 中建议的合成输入和变换,然后添加基于容差的断言来验证几何正确性。完成的标准是每个方法都有实际覆盖,且不依赖不同 OpenCV 版本之间的像素完全相等。
由索引模型根据 Issue 内容生成。
描述
Found 2026-08-03 while auditing warpAffine/warpPerspective/remap-based methods for OpenCV 4/5 numeric-drift issues (see #44). `tests/test_image_reshape.py`'s `test_warp`, `test_warp_affine`, `test_warp_perspective`, `test_undistort`, and `test_interp2d` are all empty stubs (`# Add test cases for the decimate method` / `pass`) -- zero real assertions, for five distinct methods in `ImageReshape.py` that wrap `cv2.warpAffine`/`cv2.warpPerspective`/`cv2.remap`/`cv2.undistort`.
`test_rotate` (same file) does have real coverage and was specifically checked against a real OpenCV 5.0.0.93 install as part of #44 -- its one exact-equality assertion (`rotate(0)`, an identity transform) is confirmed safe on both versions, no drift. But the five methods above have no coverage at all to check.
Fix
Write real tests for each: a known input + expected transform (e.g. `warp_affine` with a translation matrix, `undistort` with known distortion coefficients on a synthetic pattern), asserting geometric correctness with a tolerance rather than exact pixel equality -- OpenCV's own migration notes describe revised interpolation between versions 4 and 5, so any assertion here should tolerate small numeric drift by construction, not just by accident.
- 主要语言
- 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 天 新手友好度 76/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 条评论 ·