Transform to compute the average image across all templates
Improved functionality for texture mapping