Commit 8d7ccd29 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #11401 from exoson:livestitch

parents 87a4f4ab 058299cc
......@@ -240,6 +240,7 @@ public:
bool isUMatVector() const;
bool isMatx() const;
bool isVector() const;
bool isGpuMat() const;
bool isGpuMatVector() const;
~_InputArray();
......
......@@ -157,6 +157,7 @@ inline bool _InputArray::isMatx() const { return kind() == _InputArray::MATX; }
inline bool _InputArray::isVector() const { return kind() == _InputArray::STD_VECTOR ||
kind() == _InputArray::STD_BOOL_VECTOR ||
kind() == _InputArray::STD_ARRAY; }
inline bool _InputArray::isGpuMat() const { return kind() == _InputArray::CUDA_GPU_MAT; }
inline bool _InputArray::isGpuMatVector() const { return kind() == _InputArray::STD_VECTOR_CUDA_GPU_MAT; }
////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -145,6 +145,18 @@ private:
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING)
std::vector<cuda::GpuMat> gpu_dst_pyr_laplace_;
std::vector<cuda::GpuMat> gpu_dst_band_weights_;
std::vector<Point> gpu_tl_points_;
std::vector<cuda::GpuMat> gpu_imgs_with_border_;
std::vector<std::vector<cuda::GpuMat> > gpu_weight_pyr_gauss_vec_;
std::vector<std::vector<cuda::GpuMat> > gpu_src_pyr_laplace_vec_;
std::vector<std::vector<cuda::GpuMat> > gpu_ups_;
cuda::GpuMat gpu_dst_mask_;
cuda::GpuMat gpu_mask_;
cuda::GpuMat gpu_img_;
cuda::GpuMat gpu_weight_map_;
cuda::GpuMat gpu_add_mask_;
int gpu_feed_idx_;
bool gpu_initialized_;
#endif
};
......
This diff is collapsed.
......@@ -50,13 +50,17 @@ namespace opencv_test { namespace {
detail::MultiBandBlender blender(try_cuda, 5);
blender.prepare(Rect(0, 0, max(im1.cols, im2.cols), max(im1.rows, im2.rows)));
blender.feed(im1, mask1, Point(0,0));
blender.feed(im2, mask2, Point(0,0));
// If using cuda try blending multiple times without calling prepare inbetween
for (int i = 0; i < (try_cuda ? 10 : 1); ++i) {
blender.feed(im1, mask1, Point(0, 0));
blender.feed(im2, mask2, Point(0, 0));
Mat result_s, result_mask;
blender.blend(result_s, result_mask);
result_s.convertTo(result, CV_8U);
}
}
TEST(CUDA_MultiBandBlender, Accuracy)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment