Updated optimal DFT size estimation in gpu::convolve()

pull/13383/head
Alexey Spizhevoy 13 years ago
parent 7076dfd7d6
commit 8cebb0982b
  1. 2
      modules/gpu/src/imgproc.cpp

@ -1537,6 +1537,8 @@ void cv::gpu::ConvolveBuf::create(Size image_size, Size templ_size, Size block_s
dft_size.width = 1 << int(ceil(std::log(block_size.width + templ_size.width - 1.) / std::log(2.)));
dft_size.height = 1 << int(ceil(std::log(block_size.height + templ_size.height - 1.) / std::log(2.)));
if (dft_size.width < 512) dft_size.width = 512;
if (dft_size.height < 512) dft_size.height = 512;
createContinuous(dft_size, CV_32F, image_block);
createContinuous(dft_size, CV_32F, templ_block);
createContinuous(dft_size, CV_32F, result_data);

Loading…
Cancel
Save