Thin plate spline transform gives solid color for certain inputs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- opencv, python
- Lĩnh vực
- computer-vision
Hướng nghiên cứu
Bắt đầu bằng cách chạy bản tái hiện Python được cung cấp với test.png và các phiên bản Python 3.13.5 và OpenCV 4.12.0.88 đã báo cáo. So sánh các phép biến đổi chín điểm và tám điểm, sau đó xác định lỗi nằm ở đâu và xác minh rằng phép biến đổi đồng nhất chín điểm không còn tạo ra hình ảnh một màu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Certain combinations of points for a thin plate spline transformation cause the transformed image to be one solid color. Removing the offending combination of points will cause the image to transform as expected.
Below is code that reads the attached image and applys a transformation which should do nothing to the image. The first transformation erroneously turns the whole image a single color. The second transformation uses one less point and correctly does nothing to the image. Im not sure what makes combinations of points not compatible with each other. The points in the code are outside of the uploaded image, since the points were originally being used on a much larger image. I can't upload that here due to file size restrictions. However behavior on the smaller image is the same. Versions are Python 3.13.5, opencv-contrib-python 4.12.0.88, opencv-python 4.12.0.88, Windows 10.
import cv2
import numpy
# Variable initilization
img = cv2.imread('test.png')
base_points = numpy.array([[ 121, 5213],
[6197, 5197],
[1627, 3481],
[3146, 3477],
[4668, 3473],
[1616, 1752],
[4655, 1744],
[6179, 1742],
[ 87, 29]])
# In this example a tps transformation is done.
# The input and output points are the same so the image shouldn't change.
# The whole image will be the color of the one of the corner pixels.
points = base_points[:]
points = points.reshape((-1,points.shape[0],2)).astype(numpy.int32)
tps = cv2.createThinPlateSplineShapeTransformer()
matches = [cv2.DMatch(i, i, 0) for i in range(points.shape[1])]
tps.estimateTransformation(points, points, matches)
warped1 = tps.warpImage(img)
cv2.imshow('Whole image is one color', warped1)
# This example uses one less point.
# The output is the input image, which is what would be expected.
points = base_points[1:]
points = points.reshape((-1,points.shape[0],2)).astype(numpy.int32)
tps = cv2.createThinPlateSplineShapeTransformer()
matches = [cv2.DMatch(i, i, 0) for i in range(points.shape[1])]
tps.estimateTransformation(points, points, matches)
warped2 = tps.warpImage(img)
cv2.imshow('Image is as expected', warped2)
cv2.waitKey(0)
Correct image:
Single color image:
- Ngôn ngữ chính
- Python
- Star
- 5.4k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của opencv/opencv-python
-
[DOC] README fileCó thể làm lại được @jadhavroshani713-sys đã nhận 76 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
opencv/opencv-python#1217 · 3 bình luận ·
-
Dependency specification missing for python3.14Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
opencv/opencv-python#1165 · 2 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
opencv/opencv-python#1276 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
opencv/opencv-python#1273 · 1 bình luận ·
-
FFMPEG v8.1.1 vulnerabilitiesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
opencv/opencv-python#1272 · 2 bình luận ·
Tất cả issue của opencv/opencv-python
Issue tương tự
-
Claiming namespace `jft63`Đang mởnamespace operations
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
EclipseFdn/open-vsx.org#14043 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
netbox status: needs triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
netbox-community/netbox#23376 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feedback simulation workshop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
githubnext/gh-aw-workshop#4455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Triage 🩺
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_waitĐang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
krkn-chaos/krkn#1627 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày