make template from IplImageFrame