juangallostra / augmented-reality

Augmented reality proof of concept project with Python and OpenCV
MIT License
335 stars 118 forks source link

An error occurred when running ar_main.py. How to resolve it #23

Open kungfumaster5 opened 8 months ago

kungfumaster5 commented 8 months ago
matches = bf.match(des_model, des_frame)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

cv2.error: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\core\src\batch_distance.cpp:275: error: (-215:Assertion failed) type == src2.type() && src1.cols == src2.cols && (type == CV_32F || type == CV_8U) in function 'cv::batchDistance'

kungfumaster5 commented 8 months ago

Another background for the occurrence of this error is that when a small card is not detected or the card is unclear, the program will automatically stop running and the same error will be displayed afterwards