basileroth75 / covid-social-distancing-detection

Personal social distancing detector using Python, a Tensorflow model and OpenCV
123 stars 54 forks source link

Several 'center' argument in 'circle' functions error #16

Open pop2pop3 opened 2 years ago

pop2pop3 commented 2 years ago

There are several cv2.error: OpenCV(4.5.4) :-1: error: (-5:Bad argument) in function 'circle'

I have previously figured out mistakes in center argument in cv2.circle function where in line 197-199:

x,y = point cv2.circle(bird_view_img, (x, y), BIG_CIRCLE, COLOR_GREEN, 2) cv2.circle(bird_view_img, (x, y), SMALL_CIRCLE, COLOR_GREEN, -1)

into cv2.circle(bird_view_img, (int(x), int(y)), BIG_CIRCLE, COLOR_GREEN, 2) cv2.circle(bird_view_img, (int(x), int(y)), SMALL_CIRCLE, COLOR_GREEN, -1)

where I can just clarify the array into the center argument.

But now I have another similar issue in change_color_on_topview function:

cv2.circle(bird_view_img, (pair[0][0],pair[0][1]), BIG_CIRCLE, COLOR_RED, 2)

Anyone?

Bulinglife commented 2 years ago

me too

Bulinglife commented 2 years ago

把参数改为整形,加int