Imagine, you have some images from the Yale face database, which are located in directory yale-img. You want to create 2 most important eigenfaces and store them in a file yale-img-ef.dat. Then, you should use the following command line.
faceinit.exe -ef 2 -o yale-img-ef.dat yale-img\subject01.centerlight.png yale-img\subject01.glasses.png yale-img\subject01.happy.pngAfter -ef you write the number of eigenfaces you want to extract, then the name of the file, where they should be stored (yale-img-ef.dat) and at the end all the files of the image set (note that under Unix and Unix-like shells you may be able to use the wildcards, and so you would not need to write the names of all your image files).
If faceinit is executed successfully, you will see a screen like this one
You may wish not only to calculate the eigenfaces, but also to look at them visually. For this purpose, you should use the -v argument of faceinit, so that the above command line call becomes
faceinit.exe -v -ef 2 -o yale-img-ef.dat yale-img\subject01.centerlight.png yale-img\subject01.glasses.png yale-img\subject01.happy.pngThis call generates three images
For instance, if you want to compare files yale-i mg\subject01.centerlight.png and yale-img\subject02.wink.png, using the parameter file yale-img-ef.dat, you should enter following command
facecmp -p yale-img-ef.dat yale-img\subject01.centerlight.png yale-img\subject02.wink.pngThis call leads to following output:
C:\work\faces\artefacts\2003_11_03_tutorial\sw>facecmp -p yale-img-ef.dat yale-i mg\subject01.centerlight.png yale-img\subject02.wink.png Image compare. Comparing yale-img\subject01.centerlight.png with yale-img\subject02.wink.png. Factor for ef 1: *** Factor for ef 0: *** distance is 26.782839 image match probability = 0.000000 C:\work\faces\artefacts\2003_11_03_tutorial\sw>The only value, which is interesting for you at the moment, is the line
distance is 26.782839The larger the distance, the larger the difference between these images.
For this purpose, following command-line call is used
faceview -p yale-img-ef.dat yale-img\subject02.rightlight.pngThis program reconstructs the image, given the eigenfaces in yale-img-ef.dat and the image yale-img\subject02.rightlight.png and creates several files, called traitvis0.png, traitvis1.png, ..., traitvisN.png. The last file, traitvisN.png is the reconstructed image.
We appreciate any hints concerning potential causes of these (or other) problems.
2003-11-03 20:08 Dimitri A. Pissarenko