Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#53 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
computer-vision, testing

Hướng nghiên cứu

Bắt đầu trong tests/test_image_reshape.py và so sánh các stub rỗng test_warp, test_warp_affine, test_warp_perspective, test_undistort và test_interp2d với các phương thức tương ứng trong ImageReshape.py. Sử dụng các đầu vào và phép biến đổi tổng hợp được đề xuất trong issue, sau đó thêm các assertion dựa trên dung sai để kiểm tra tính đúng đắn hình học. Được xem là hoàn tất khi mỗi phương thức có độ bao phủ thực tế mà không phụ thuộc vào việc các pixel phải giống hệt nhau giữa các phiên bản OpenCV.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
220
Fork
30
Merge trung bình
12 ngày 23 giờ
Pull request đã merge (30 ngày)
5

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của petercorke/machinevision-toolbox-python

Tất cả issue của petercorke/machinevision-toolbox-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.