手机端配置
1、下载一个IP摄像头,配置好密码。
2、打开app后,点击下方的“打开IP摄像头服务器”(连上wifi,确保电脑与手机处在同一局域网内)。
电脑端
OPENCV代码(python)
其中open函数后面admin是账户名称12345是密码,在手机端可以设置;@后面是局域网IP地址,手机上显示。
import cv2 as cv
cap = cv.VideoCapture()
cap.open("http://admin:12345@192.168.191.4:8081")
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
#gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
if ret == True:
# Display the resulting frame
cv.imshow('frame',frame)
if cv.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv.destroyAllWindows()
本文介绍如何通过手机端应用配置IP摄像头,并使用Python与OpenCV在电脑端实现视频流的获取与展示。具体步骤包括:下载并配置IP摄像头应用程序,确保手机与电脑处于同一局域网,然后利用Python代码捕获摄像头的视频流。
&spm=1001.2101.3001.5002&articleId=88782231&d=1&t=3&u=99fccb57e5e942a9892b881bf59ea007)
1万+

被折叠的 条评论
为什么被折叠?



