mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
Several small changes in the files.
Starts searching why video gets sometimes messy. Seems like it is related with the video size. Check for OpenCV bugs when at home
This commit is contained in:
@@ -41,8 +41,8 @@ class FaceParams(object):
|
||||
self.input_folder = input_folder
|
||||
self.output_folder = output_folder
|
||||
self.speed = 1 # between 0 and 2
|
||||
self.mode = "conservative" # conservative or crop
|
||||
self.sort = "name" # name or exif
|
||||
self.mode = mode # conservative or crop
|
||||
self.sort = sort # name or exif
|
||||
|
||||
cascade_name = training_types.simple_set[training_type] + ".xml"
|
||||
# Setting up some default parameters for Face Detection
|
||||
|
||||
@@ -283,9 +283,15 @@ class FaceMovie(object):
|
||||
if "win" in sys.platform:
|
||||
fourcc = cv.CV_FOURCC('C', 'V', 'I', 'D')
|
||||
else: # some kind of Linux/Unix platform
|
||||
#print "CVID"
|
||||
#fourcc = cv.CV_FOURCC('I', 'Y', 'U', 'V')
|
||||
#fourcc = cv.CV_FOURCC('I', '4', '2', '0')
|
||||
#fourcc = cv.CV_FOURCC('C', 'V', 'I', 'D')
|
||||
fourcc = cv.CV_FOURCC('F', 'M', 'P', '4')
|
||||
#fourcc = cv.CV_FOURCC('D', 'I', 'B', ' ')
|
||||
|
||||
frameSize = (self.dims[0], self.dims[1])
|
||||
#frameSize = (652, 498)
|
||||
|
||||
pace = ["slow", "normal", "fast"]
|
||||
print "Speed is set to %s" %(pace[speedrate])
|
||||
@@ -300,6 +306,7 @@ class FaceMovie(object):
|
||||
print "Saving frame %d / %d" %(ii, self.number_guys())
|
||||
out_im = self.prepare_image(a_guy)
|
||||
cv.WriteFrame(my_video, out_im)
|
||||
|
||||
|
||||
def show_faces(self, mytime=1000):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user