Face perception foundations for pattern recognition algorithms