1
votes

I'm trying to execute this python sample: http://docs.opencv.org/trunk/doc/py_tutorials/py_feature2d/py_feature_homography/py_feature_homography.html

But it always fails on

    M, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0)

Error is:

OpenCV Error: Image step is wrong (Step must be a multiple of esz1) in setSize, file /home/jbd/src/opencv-3.0.0-beta/modules/core/src/matrix.cpp, line 297

terminate called after throwing an instance of 'cv::Exception'

what(): /home/jbd/src/opencv-3.0.0-beta/modules/core/src/matrix.cpp:297: error: (-13) Step must be a multiple of esz1 in function setSize

Do you think it's due to my installation?

1
In fact, it seems to not be due to findHomography but to: > cv2.perspectiveTransform I have no clue why - jbdemonte

1 Answers

0
votes

I met with the same problem. I think the problem is your numpy. For me, my numpy is linked to openBlas, and it will cause this problem Uninstalling it and reinstalling it from repository, i.e., pip install numpy would solve this problem. The price is you have to sacrifice the numpy speed...