Revision 146,
584 bytes
checked in by dave, 10 years ago
(diff) |
initial structure additions
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | |
---|
3 | from faces import * |
---|
4 | from math import * |
---|
5 | import os |
---|
6 | import sys |
---|
7 | |
---|
8 | if sys.argv[1] == "-h": |
---|
9 | print("anim_pca pcafile width height starteigenface endeigenface gain frames") |
---|
10 | exit(0) |
---|
11 | |
---|
12 | pca = load_pca(sys.argv[1]) |
---|
13 | w=int(sys.argv[2]) |
---|
14 | h=int(sys.argv[3]) |
---|
15 | |
---|
16 | for i in range(0,int(sys.argv[7])): |
---|
17 | img = smp.toimage( make_eigenfaces_image(w,h,pca,int(sys.argv[4]),int(sys.argv[5]),float(sys.argv[6])*sin(i*0.1))) |
---|
18 | filename = "frames/out-%0.5d.jpg"%(i) |
---|
19 | print filename |
---|
20 | img.save(filename) |
---|
21 | |
---|
22 | os.system("mencoder mf://frames/*.jpg -oac lavc -ovc lavc -of mpeg -ofps 25 -o out.avi") |
---|
Note: See
TracBrowser
for help on using the repository browser.