Question  Average face  algorithm 

Answers  1  
Added at  20170103 22:01  
Tags  
Question 
Quesion and code is at the end I hope this question belongs here and not to the TCS's stack. I am trying to go through algorithms in Turk and Pentland's "Eigenfaces for Recognition". On page 74 one can read (last paragraph of left column):
Where [*] is an equation saying that average face is equal to sum of images divided by it's count. In order to use this equantion I created python script using OpenCV and numpy. On page 75 there is Figure 1. which should represent average face from Figure 1. (pg. 74) and this is what I am trying to achieve. As a face set I am using all faces from Faces94. When I calculate traditionall average (1/M*sum) the result looks like this: which is far away from expected, mostly because of those wierd 'spots'. However, when I calculate average like there was more faces than actually is (e.g. 1/(2*M) * sum) result looks more accurate: I think there is some problem in converting int8<>int but I cannot prove it. If anyone can spot any problem with the code please let me know even if it is not solution. Question: what am I doing wrong / what to do to get better results. Here is the code:


Answers 


Source  Show 