python-3.x - 如何在 Open CV Python 中从文本文件中提供视频源
问题描述
我想在 Opencv 中使用视频捕获并从文本文件中提供视频路径或相机路径,他们是否有可能在 Open CV Python 中从文本文件中提供视频源
解决方案
cap = cv2.VideoCapture(open('file.txt').read())
在文本文件中只需写下您的 : -
带有 extn 的视频文件名。: - 视频.mp4
或者
摄像头路径: - rtsp://User_Name:Password@127.0.0.1/Streaming/Channels/501
推荐阅读
- elasticsearch - Elasticsearch curator 删除整个索引而不是旧文档
- c++ - 为什么 C++ 不尝试使用第二个模板重载?
- javascript - 疑难解答:比较两个地图的键(Javascript)
- php - get_template_part 不工作,我有正确的文件路径
- powershell - 10-15 个用户后 Move-CSUser 批量移动提示
- docker - Github 操作在容器中运行步骤
- scip - 在 PySCIPOpt 中向节点添加约束
- python - 无法从数据库记录中读取sqlite3 python
- html - 如何用白色笔画制作圆角梯形?
- c# - CS0116 命名空间不能直接包含成员,例如字段或方法 C# Microsoft.Office.Interop.Excel