我无法运行,因为我收到“ NameError:未定义名称'get_sec'”

时间:2019-04-30 02:49:36

标签: python jupyter-notebook

from imutils.video import VideoStream
from imutils.video import FPS
import argparse
import imutils
import time
import cv2
import numpy as np

cap = cv2.VideoCapture('C4-13.mp4')
fps = cap.get(cv2.CAP_PROP_FPS)
length = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
stime = get_sec(args.s)
starttime = args.s  
etime = get_sec(args.e)
sframe=int(float(fps)*float(stime))
eframe=int(float(fps)*float(etime))
cap.set(1,sframe)

0 个答案:

没有答案