The feature dimensions of the demo program are inconsistent
Closed this issue · 5 comments
Hi,
I cannot reproduce your error. The tensors pts1
and pts2
have the wrong dimensions. They should be (1,2000,2).
Lines 130 to 135 in 8cd278b
The code above should result in pts1
and pts2
being lists with 2000 entries.
Lines 139 to 140 in 8cd278b
The code above should turn pts1
and pts2
into tensors of shape (1,2000,2). Particularly, wrapping pts1
in a list [pts1]
before passing it to np.array
should create a tensor with the first axis being one-dimensional. In your case, the first axis is 2000-dimensional. Did you alter the code?
Hi,
I think i find where is wrong,
pts1 = cv2.undistortPoints(pts1, K1, None) pts2 = cv2.undistortPoints(pts2, K2, None)
those two lines of code will turn pts1
and pts2
from (1,2000,2) to (2000,1,2)
Thanks for the update. Interesting. Which version of OpenCV are you using?
opencv-python 4.4.0.42
At the moment, we can only confirm compatibility to OpenCV 3.4. You might encounter other problems when using Opencv 4.x.