tennis-tracking icon indicating copy to clipboard operation
tennis-tracking copied to clipboard

Testing on my video getting an error

Open FranciscoPark opened this issue 4 months ago • 0 comments

hey, i am trying run this program only for court detection. It seems to work with your video_samples, however, when I try using my video, I get:

Traceback (most recent call last): File "/home/isco/Desktop/ambient/opencv_court/predict_video.py", line 24, in lines = court_detector.detect(frame) File "/home/isco/Desktop/ambient/opencv_court/court_detector.py", line 71, in detect return self.find_lines_location() File "/home/isco/Desktop/ambient/opencv_court/court_detector.py", line 292, in find_lines_location self.lines = cv2.perspectiveTransform(self.p, self.court_warp_matrix[-1]).reshape(-1) cv2.error: OpenCV(4.9.0) /io/opencv/modules/core/src/matmul.dispatch.cpp:550: error: (-215:Assertion failed) scn + 1 == m.cols in function 'perspectiveTransform'

It seems it can not calculate court_warp_matrix correctly. I get None for this result. My video is not dramatically different from yours so I do not understand what the problem might be.

FranciscoPark avatar Feb 15 '24 08:02 FranciscoPark