Taking blockScale = 4.5 in crossCorr() function used in template matching

Hi, I’ve been trying to find a way to remove redundant checks in template matching where we know for sure the part of image doesn’t contain any relevant information, thus making the process faster.

Going through the source code I was wondering if there’s a way to reduce the block size considered by crossCorr() function and do a precheck on a smaller block to determine if apply DFT on it or not . In essence the question is what constraints the block size to be 4.5 times the template or minimum of 256.