UPDATE Vision 更新行人检测方法

This commit is contained in:
HJW
2024-10-26 11:39:52 +08:00
parent 343e24bccd
commit 60f145c608
3 changed files with 49 additions and 34 deletions

View File

@ -23,14 +23,14 @@ class camera_HIK():
def __init__(self, ip, port, name, pw):
# "rtsp://admin:zlzk.123@192.168.1.64:554"
self.camera_url = "rtsp://" + name + ":" + pw + "@" + ip + ":" + str(port)
ret = portisopen(ip, port)
self.camera_url = "rtsp://" + str(name) + ":" + str(pw) + "@" + str(ip) + ":" + str(port)
self.ip = ip
self.port = port
self.init_success = False
if ret:
self.cap = cv2.VideoCapture(self.camera_url)
self.init_sucess = True
self.init_success = True
else:
print('海康摄像头网络错误请检测IP')