Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 如何在Open CV Python中从文本文件提供视频源_Python 3.x_Opencv_Artificial Intelligence - Fatal编程技术网

Python 3.x 如何在Open CV Python中从文本文件提供视频源

Python 3.x 如何在Open CV Python中从文本文件提供视频源,python-3.x,opencv,artificial-intelligence,Python 3.x,Opencv,Artificial Intelligence,我想在Opencv中使用视频捕获,从文本文件中提供视频路径或相机路径, 他们是否有可能从OpenCV Python中的文本文件提供视频源 cap = cv2.VideoCapture(open('file.txt').read()) 在文本文件中只需写下您的:- 带有extn.:-Video.mp4 或 摄像机路径:-rtsp://User_Name:Password@127.0.0.1/Streaming/Channels/501摄像机路径到底是什么样子的?摄像机路径的意思是:-vs

我想在Opencv中使用视频捕获,从文本文件中提供视频路径或相机路径, 他们是否有可能从OpenCV Python中的文本文件提供视频源

    cap = cv2.VideoCapture(open('file.txt').read())
在文本文件中只需写下您的:-
带有extn.:-Video.mp4


摄像机路径:-rtsp://User_Name:Password@127.0.0.1/Streaming/Channels/501

摄像机路径到底是什么样子的?摄像机路径的意思是:-vs=cv2.VideoCapture('rtsp://user:password@183.82.121.207:554/Streaming/Channels/101/’)或cv2.VideoCapture('0')视频路径的意思是:-vs=cv2.VideoCapture('video.mp4')我想提供这个('rtsp://user:password@183.82.121.207:554/Streaming/Channels/101/”)从文本文件: