copyMakeBorder(img, img_with_border, top, bottom, left, right,\r
BORDER_REFLECT);\r
vector<Mat> src_pyr_laplace;\r
- createLaplacePyr(img_with_border, num_bands_, src_pyr_laplace);\r
+ if (can_use_gpu_)\r
+ createLaplacePyrGpu(img_with_border, num_bands_, src_pyr_laplace);\r
+ else\r
+ createLaplacePyr(img_with_border, num_bands_, src_pyr_laplace);\r
\r
// Create the weight map Gaussian pyramid\r
Mat weight_map;\r
}\r
\r
\r
-#if 0\r
void createLaplacePyrGpu(const Mat &img, int num_levels, vector<Mat> &pyr)\r
{\r
pyr.resize(num_levels + 1);\r
\r
pyr[num_levels] = gpu_pyr[num_levels];\r
}\r
-#endif\r
\r
\r
void restoreImageFromLaplacePyr(vector<Mat> &pyr)\r
\r
void createLaplacePyr(const cv::Mat &img, int num_levels, std::vector<cv::Mat>& pyr);\r
\r
-// TODO Use it after gpu::pyrDown and gpu::pyrUp are updated\r
-#if 0\r
void createLaplacePyrGpu(const cv::Mat &img, int num_levels, std::vector<cv::Mat>& pyr);\r
-#endif\r
\r
// Restores source image\r
void restoreImageFromLaplacePyr(std::vector<cv::Mat>& pyr);\r