本文整理汇总了Python中video.Video.writeToVideo方法的典型用法代码示例。如果您正苦于以下问题:Python Video.writeToVideo方法的具体用法?Python Video.writeToVideo怎么用?Python Video.writeToVideo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类video.Video
的用法示例。
在下文中一共展示了Video.writeToVideo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: goGetEm
# 需要导入模块: from video import Video [as 别名]
# 或者: from video.Video import writeToVideo [as 别名]
def goGetEm():
minRemovalScore = 0.25
timeOut = 10
cleanThresh = 5
binNumber = 100
distanceWeight = 0.5
timeWeight = 0.0
sizeWeight = 0.5
weights = (distanceWeight, timeWeight, sizeWeight)
writingToFiles = True
distDev = 200
timeDev = 1
sizeDev = 0.25
devs = (distDev, timeDev, sizeDev)
framesback = 5
# minRemovals = [0.0001, 0.1, 0.25]
# weightDev = [((0.5,0,0.5),(100,0.34,0.15)),((0.5,0,0.5),(200,0.34,0.25)),((0.45,0.2,0.35),(100,0.34,0.15)),((0.45,0.2,0.35),(200,0.34,0.25))]
i = 0
# for minRemovalScore in minRemovals:
# for setting in weightDev:
# weights = setting[0]
# devs = setting[1]
variables = [minRemovalScore, timeOut, cleanThresh, binNumber, weights, writingToFiles, devs, framesback]
vidFile = "datums/outvideo"+str(i)+".avi"
vid = Video("Testvideos/Movie1.mov", variables, False)
vid.openVidWrite(vidFile)
success = vid.readFrame()
while (success):
vid.findFaces()
vid.writeToVideo()
success = vid.readFrame()
vid.endWindow()
示例2: goGetEm
# 需要导入模块: from video import Video [as 别名]
# 或者: from video.Video import writeToVideo [as 别名]
def goGetEm():
minRemovalScore = 0.25
timeOut = 10
cleanThresh = 5
binNumber = 100
distanceWeight = 0.5
sizeWeight = 0.0
timeWeight = 0.5
weights = (distanceWeight, timeWeight, sizeWeight)
writingToFiles = True
distDev = 200
timeDev = 0.34
sizeDev = 0.25
devs = (distDev, timeDev, sizeDev)
framesback = 2
variables = [minRemovalScore, timeOut, cleanThresh, binNumber, weights, writingToFiles, devs, framesback]
vid = Video(0, variables)
writeVideo = False
if writeVideo:
vidFile = "outvid.avi"
vid.openVidWrite(vidFile)
while (True):
vid.readFrame()
vid.findFaces()
vid.display()
if writeVideo:
vid.writeToVideo()
# exit on escape key
key = cv2.waitKey(1)
if key == 27:
break
vid.endWindow()