Пример #1
0
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()
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()