UPDATE Vision 更新数据采集方法
This commit is contained in:
@ -14,6 +14,7 @@ from Vision.tool.utils import remove_nan_mean_value
|
||||
from Vision.detect_person import DetectionPerson
|
||||
from Vision.detect_bag_num import DetectionBagNum
|
||||
from Vision.tool.CameraHIK import camera_HIK
|
||||
from Vision.bag_collection import DetectionBag
|
||||
import platform
|
||||
import cv2
|
||||
import os
|
||||
@ -97,6 +98,19 @@ def detectionBagNum_test():
|
||||
else:
|
||||
break
|
||||
|
||||
def bag_collection_test():
|
||||
save_bag_img_point = DetectionBag()
|
||||
# video_path = ''.join([os.getcwd(), '/Vision/model/data/2.mp4'])
|
||||
# cam = cv2.VideoCapture(video_path)
|
||||
while True:
|
||||
Bag, img_src = save_bag_img_point.detect_bag(save_img_point=2)
|
||||
if Bag:
|
||||
cv2.imshow('img', img_src)
|
||||
cv2.waitKey(1)
|
||||
else:
|
||||
break
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
detectionPerson_test()
|
||||
bag_collection_test()
|
||||
Reference in New Issue
Block a user