The first point which you asked for is absolutely right. As the ORL database contains 10 images for each subject and the odd or even contains the maximum pose required to train the system
The second point is also correct that this is simple technique of histogram (gray-level ) matching so it can be fooled but fusing this faster technique to other powerful methods will improve the system (i.e POC etc).
The code provides the simple system of matching where gray-lelvel information is essential
Thanx for sharing your code. I am curious to know how can I detect same target but more than one in image.
2- How scale invariance can be applied by phase based template matcing