UPDATE Vision 更新行人检测方法
This commit is contained in:
@ -51,17 +51,23 @@ def take_photo_position_test():
|
||||
|
||||
def detectionPerson_test():
|
||||
detectionPerson = DetectionPerson()
|
||||
video_path = ''.join([os.getcwd(), '/Vision/model/data/1.mp4'])
|
||||
cam = cv2.VideoCapture(video_path)
|
||||
while cam.isOpened():
|
||||
ret, frame = cam.read()
|
||||
if ret:
|
||||
person, img = detectionPerson.get_person(frame)
|
||||
print(person)
|
||||
cv2.imshow('img', img)
|
||||
while True:
|
||||
person, img_src = detectionPerson.get_person()
|
||||
if img_src is not None:
|
||||
cv2.imshow('detectPerson', img_src)
|
||||
cv2.waitKey(1)
|
||||
else:
|
||||
break
|
||||
print("person", person)
|
||||
# video_path = ''.join([os.getcwd(), '/Vision/model/data/1.mp4'])
|
||||
# cam = cv2.VideoCapture(video_path)
|
||||
# while cam.isOpened():
|
||||
# ret, frame = cam.read()
|
||||
# if ret:
|
||||
# person, img = detectionPerson.get_person(frame)
|
||||
# print(person)
|
||||
# cv2.imshow('img', img)
|
||||
# cv2.waitKey(1)
|
||||
# else:
|
||||
# break
|
||||
|
||||
def HIK_Camera_test():
|
||||
MY_CAMERA = camera_HIK("192.168.1.121", 554, "admin", "zlzk.123")
|
||||
@ -87,4 +93,4 @@ def detectionBagNum_test():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
detectionBagNum_test()
|
||||
detectionPerson_test()
|
||||
Reference in New Issue
Block a user