source: libs/vision/python/anim_pca @ 150

Revision 150, 584 bytes checked in by dave, 10 years ago (diff)

more moving

  • Property svn:executable set to *
Line 
1#!/usr/bin/env python
2
3from faces import *
4from math import *
5import os
6import sys
7
8if sys.argv[1] == "-h":
9        print("anim_pca pcafile width height starteigenface endeigenface gain frames")
10        exit(0)
11
12pca = load_pca(sys.argv[1])
13w=int(sys.argv[2])
14h=int(sys.argv[3])
15
16for 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
22os.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.