switched to gpu::pyrDown and gpu::pyrDown in opencv_stitching
This commit is contained in:
@@ -233,7 +233,10 @@ void MultiBandBlender::feed(const Mat &img, const Mat &mask, Point tl)
|
|||||||
copyMakeBorder(img, img_with_border, top, bottom, left, right,
|
copyMakeBorder(img, img_with_border, top, bottom, left, right,
|
||||||
BORDER_REFLECT);
|
BORDER_REFLECT);
|
||||||
vector<Mat> src_pyr_laplace;
|
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
|
// Create the weight map Gaussian pyramid
|
||||||
Mat weight_map;
|
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)
|
void createLaplacePyrGpu(const Mat &img, int num_levels, vector<Mat> &pyr)
|
||||||
{
|
{
|
||||||
pyr.resize(num_levels + 1);
|
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];
|
pyr[num_levels] = gpu_pyr[num_levels];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void restoreImageFromLaplacePyr(vector<Mat> &pyr)
|
void restoreImageFromLaplacePyr(vector<Mat> &pyr)
|
||||||
|
|||||||
@@ -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);
|
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);
|
void createLaplacePyrGpu(const cv::Mat &img, int num_levels, std::vector<cv::Mat>& pyr);
|
||||||
#endif
|
|
||||||
|
|
||||||
// Restores source image
|
// Restores source image
|
||||||
void restoreImageFromLaplacePyr(std::vector<cv::Mat>& pyr);
|
void restoreImageFromLaplacePyr(std::vector<cv::Mat>& pyr);
|
||||||
|
|||||||
Reference in New Issue
Block a user