-
Notifications
You must be signed in to change notification settings - Fork 999
Open
Description
Hello,
warpAffine has different behaviour in version 4.12 and 4.13.
import numpy as np
import cv2
input = np.ones((100,100))
pts = np.float32([[1,1],
[1,2],
[3,4]])
translation_factor = 50
t_cv2 = cv2.getAffineTransform(pts, pts+translation_factor)
out = cv2.warpAffine(
input,
t_cv2,
(200,200),
flags=cv2.INTER_NEAREST,
borderMode=cv2.BORDER_CONSTANT,
borderValue=(0.0,),
)with:
Package Version
------------- ---------
numpy 2.2.6
opencv-python 4.12.0.88
pip 24.0
setuptools 79.0.1
with:
Package Version
------------- ---------
numpy 2.4.2
opencv-python 4.13.0.92
pip 24.0
setuptools 79.0.1
The issue is that in version 4.13, warpAffine translates the image by -translation_factor.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

