Python
Shan 彡
越努力越幸运!
展开
-
OpenCV读取海康4G摄像头
读取海康威视C5W-4G摄像头的视频数据 首先将电脑与摄像头连接在同一路由器下,路由器配置固定IP地址,然后通过以下代码获取视频 import os import cv2 img_save_dir = “Video” if not os.path.exists(img_save_dir): os.makedirs(img_save_dir) source = “rtsp://admin:(password)@(password)@(password)@(ip addr)/Streaming/Channels原创 2020-12-22 15:41:24 · 1187 阅读 · 0 评论 -
Python --入门小程序
1、输入某年某月某日,判断这一天是这一年中的第几天? import datetime dtstr = input('Enter the datetime:(20191219):') dt = datetime.datetime.strptime(dtstr,"%Y%m%d") another_dtstr = dtstr[:4]+'0101' another_dt = datetime.dateti...原创 2019-12-19 20:50:42 · 181 阅读 · 0 评论