cojosef96 / OpenSfM_sift_gpu

BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Hello, I've checked your code and got an error. #1

Open kjkim-kr opened 3 years ago

kjkim-kr commented 3 years ago

when I run test_sift_gpu.py and got an error. I added a code at line 50, print('c: ', c, type(c))

and here is output

kj@kj-H270M-D3H:~/OpenSfM_gpu/OpenSfM$ python3 test_sift_gpu.py Feature Extraction took 0.09842777252197266 sec Feature Matching took took 0.08807730674743652 sec c: [199 190 196] <class 'numpy.ndarray'> Traceback (most recent call last): File "test_sift_gpu.py", line 92, in draw_matches(img1, cv_kp1, img2, cv_kp2, matches[:N]) File "test_sift_gpu.py", line 51, in draw_matches cv2.line(new_img, end1, end2, c, thickness) TypeError: Scalar value for argument 'color' is not numeric

I modified color c as c = (0, 255, 255) temporarily, then that code ran successfully.

any problems in here?

cojosef96 commented 3 years ago

added below line 45 c = c.astype(int) this should fix the problem

kjkim-kr commented 3 years ago

I added code c = c.astype(int) , and got same error again, (but this is not too important as the testcase opensfm run_all data/berlin_gpu works fine.)