def video_click(self,e, x, y, flags, param):
if e == cv2.EVENT_LBUTTONDOWN:
self.video_stat.is_drug = 1
self.video_stat.p0 = (x, y)
print("rect start", x, y)
elif e == cv2.EVENT_LBUTTONUP:
self.video_stat.is_drug = 0
self.video_stat.p1 = (x, y)
print("rect end", x, y)
self.video_stat.append_box(self.label_stat.get_label_name())
elif e== cv2.EVENT_RBUTTONDOWN:
self.video_stat.remove_point_box((x,y))
self.video_stat.p=(x,y)
评论列表
文章目录