Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

test_image_reshape.py: warp/undistort/interp2d tests are empty stubs

Aperta
#53 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Inizia in tests/test_image_reshape.py e confronta gli stub vuoti test_warp, test_warp_affine, test_warp_perspective, test_undistort e test_interp2d con i metodi corrispondenti in ImageReshape.py. Usa gli input e le trasformazioni sintetici suggeriti nell’issue, quindi aggiungi asserzioni basate su tolleranze per la correttezza geometrica. Il lavoro è completato quando ogni metodo ha una copertura reale senza dipendere dall’uguaglianza esatta dei pixel tra le versioni di OpenCV.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

tech-debt

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.

Lingua principale
Python
Stelle
223
Fork
30
Merge medio
1h 4m
PR unite (30g)
9

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di petercorke/machinevision-toolbox-python

Tutte le issue di petercorke/machinevision-toolbox-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.