mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
Adds a test case for bug in creating video depending on frame size
This commit is contained in:
@@ -292,7 +292,7 @@ class FaceMovie(object):
|
||||
|
||||
frameSize = (self.dims[0], self.dims[1])
|
||||
#frameSize = (652, 498)
|
||||
|
||||
print frameSize
|
||||
pace = ["slow", "normal", "fast"]
|
||||
print "Speed is set to %s" %(pace[speedrate])
|
||||
my_video = cv.CreateVideoWriter(self.get_out_file(),
|
||||
|
||||
31
test/fix_crop.py
Normal file
31
test/fix_crop.py
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
import os
|
||||
import cv
|
||||
|
||||
in_dir = "../data/inputs/sample-test"
|
||||
out = "output.avi"
|
||||
|
||||
|
||||
# loading images, create Guys and store it into guys
|
||||
frameSize = (652, 498)
|
||||
#frameSize = (453, 325)
|
||||
fourcc = cv.CV_FOURCC('F', 'M', 'P', '4')
|
||||
my_video = cv.CreateVideoWriter(out,
|
||||
fourcc,
|
||||
15,
|
||||
frameSize,
|
||||
1)
|
||||
|
||||
for root, _, files in os.walk(in_dir):
|
||||
for a_file in files:
|
||||
guy_source = os.path.join(in_dir, a_file)
|
||||
print guy_source
|
||||
image = cv.LoadImage(guy_source)
|
||||
|
||||
small_im = cv.CreateImage(frameSize,
|
||||
image.depth ,
|
||||
image.nChannels)
|
||||
cv.Resize(image, small_im, cv.CV_INTER_LINEAR)
|
||||
cv.WriteFrame(my_video, small_im)
|
||||
|
||||
print "Finished !"
|
||||
Reference in New Issue
Block a user