switched to gpu::pyrDown and gpu::pyrDown in opencv_stitching

This commit is contained in:
Vladislav Vinogradov 2011-08-31 13:26:33 +00:00
parent ea2f5b1391
commit 15b1b4e232
2 changed files with 4 additions and 6 deletions

View File

@ -233,7 +233,10 @@ void MultiBandBlender::feed(const Mat &img, const Mat &mask, Point tl)
copyMakeBorder(img, img_with_border, top, bottom, left, right,
BORDER_REFLECT);
vector<Mat> src_pyr_laplace;
createLaplacePyr(img_with_border, num_bands_, src_pyr_laplace);
if (can_use_gpu_)
createLaplacePyrGpu(img_with_border, num_bands_, src_pyr_laplace);
else
createLaplacePyr(img_with_border, num_bands_, src_pyr_laplace);
// Create the weight map Gaussian pyramid
Mat weight_map;
@ -338,7 +341,6 @@ void createLaplacePyr(const Mat &img, int num_levels, vector<Mat> &pyr)
}
#if 0
void createLaplacePyrGpu(const Mat &img, int num_levels, vector<Mat> &pyr)
{
pyr.resize(num_levels + 1);
@ -358,7 +360,6 @@ void createLaplacePyrGpu(const Mat &img, int num_levels, vector<Mat> &pyr)
pyr[num_levels] = gpu_pyr[num_levels];
}
#endif
void restoreImageFromLaplacePyr(vector<Mat> &pyr)

View File

@ -109,10 +109,7 @@ void createWeightMap(const cv::Mat& mask, float sharpness, cv::Mat& weight);
void createLaplacePyr(const cv::Mat &img, int num_levels, std::vector<cv::Mat>& pyr);
// TODO Use it after gpu::pyrDown and gpu::pyrUp are updated
#if 0
void createLaplacePyrGpu(const cv::Mat &img, int num_levels, std::vector<cv::Mat>& pyr);
#endif
// Restores source image
void restoreImageFromLaplacePyr(std::vector<cv::Mat>& pyr);