title: gpu::matchTemplate versus cvMatchTemplate
body: <p>I've implemented a software for searching a pattern inside an image. With cvMatchTemplate the execution time is around 10ms (because I'm taking a pattern of 40x40 in a search window of 120x160 pixels. The image is 640x480 so I'm not considering the whole image).</p>
  
  <p>I've implemented the same algorithm by using the gpu::MatchTemplate, and I was expecting improvements for the execution time. It is taking 220ms to compute the score.</p>
  
  <p>what is happening?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: I measured the loading time of the images and it takes 1ms to perform the ".upload" function because the images are already uncompressed.</p>
  
  <p>Isn't the same algorithm?</p>
  
  <p>EDIT: I wrote the code using CUDA and my own kernel: it performs the FFT using the cuda functions on the images, and the whole execution of the algorithm is less than 2 ms with 1024x1024 images and a pattern of 200x200.
  I used the thread_sync in order to measure the exec. time.</p>