12345678910111213141516171819 |
- # -*- coding: UTF-8 -*-
- # '''=================================================
- # @Project -> File :swin_transformer -> demo.py
- # @IDE :PyCharm
- # @Version:
- # @Author : Bochao Zheng
- # @Time : 2024-04-16 19:44
- # @Email : seu_zbc@hotmail.com
- # @Desc :
- # '''=================================================
- import cv2
- # videowriter = cv2.writer
- video_path = "/data/fengyang/sunwin/code/swin_conda_env/video/fire.mp4"
- vid = cv2.VideoCapture("video_path")
- for frame in vid.get():
- width = frame.shape[0]
- height = frame.shape[1]
|