test_image_reshape.py: warp/undistort/interp2d tests are empty stubs
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- computer-vision, testing
Research direction
Start in tests/test_image_reshape.py and compare the empty test_warp, test_warp_affine, test_warp_perspective, test_undistort, and test_interp2d stubs with the corresponding methods in ImageReshape.py. Use the issue's suggested synthetic inputs and transforms, then add tolerance-based assertions for geometric correctness. Done means each method has real coverage without relying on exact pixel equality across OpenCV versions.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 220
- Forks
- 30
- Avg merge
- 12d 23h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from petercorke/machinevision-toolbox-python
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
tech-debt
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
tech-debt
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
tech-debt
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in petercorke/machinevision-toolbox-python
Similar issues
-
agent-ready documentation needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
instance instance add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
searxng/searx-instances#939 · 1 comment ·
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100