Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
8d7ccd29
Commit
8d7ccd29
authored
Apr 27, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11401 from exoson:livestitch
parents
87a4f4ab
058299cc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
5 deletions
+23
-5
mat.hpp
modules/core/include/opencv2/core/mat.hpp
+1
-0
mat.inl.hpp
modules/core/include/opencv2/core/mat.inl.hpp
+1
-0
blenders.hpp
...s/stitching/include/opencv2/stitching/detail/blenders.hpp
+12
-0
blenders.cpp
modules/stitching/src/blenders.cpp
+0
-0
test_blenders.cuda.cpp
modules/stitching/test/test_blenders.cuda.cpp
+9
-5
No files found.
modules/core/include/opencv2/core/mat.hpp
View file @
8d7ccd29
...
@@ -240,6 +240,7 @@ public:
...
@@ -240,6 +240,7 @@ public:
bool
isUMatVector
()
const
;
bool
isUMatVector
()
const
;
bool
isMatx
()
const
;
bool
isMatx
()
const
;
bool
isVector
()
const
;
bool
isVector
()
const
;
bool
isGpuMat
()
const
;
bool
isGpuMatVector
()
const
;
bool
isGpuMatVector
()
const
;
~
_InputArray
();
~
_InputArray
();
...
...
modules/core/include/opencv2/core/mat.inl.hpp
View file @
8d7ccd29
...
@@ -157,6 +157,7 @@ inline bool _InputArray::isMatx() const { return kind() == _InputArray::MATX; }
...
@@ -157,6 +157,7 @@ inline bool _InputArray::isMatx() const { return kind() == _InputArray::MATX; }
inline
bool
_InputArray
::
isVector
()
const
{
return
kind
()
==
_InputArray
::
STD_VECTOR
||
inline
bool
_InputArray
::
isVector
()
const
{
return
kind
()
==
_InputArray
::
STD_VECTOR
||
kind
()
==
_InputArray
::
STD_BOOL_VECTOR
||
kind
()
==
_InputArray
::
STD_BOOL_VECTOR
||
kind
()
==
_InputArray
::
STD_ARRAY
;
}
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
;
}
inline
bool
_InputArray
::
isGpuMatVector
()
const
{
return
kind
()
==
_InputArray
::
STD_VECTOR_CUDA_GPU_MAT
;
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
...
...
modules/stitching/include/opencv2/stitching/detail/blenders.hpp
View file @
8d7ccd29
...
@@ -145,6 +145,18 @@ private:
...
@@ -145,6 +145,18 @@ private:
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING)
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING)
std
::
vector
<
cuda
::
GpuMat
>
gpu_dst_pyr_laplace_
;
std
::
vector
<
cuda
::
GpuMat
>
gpu_dst_pyr_laplace_
;
std
::
vector
<
cuda
::
GpuMat
>
gpu_dst_band_weights_
;
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
#endif
};
};
...
...
modules/stitching/src/blenders.cpp
View file @
8d7ccd29
This diff is collapsed.
Click to expand it.
modules/stitching/test/test_blenders.cuda.cpp
View file @
8d7ccd29
...
@@ -50,12 +50,16 @@ namespace opencv_test { namespace {
...
@@ -50,12 +50,16 @@ namespace opencv_test { namespace {
detail
::
MultiBandBlender
blender
(
try_cuda
,
5
);
detail
::
MultiBandBlender
blender
(
try_cuda
,
5
);
blender
.
prepare
(
Rect
(
0
,
0
,
max
(
im1
.
cols
,
im2
.
cols
),
max
(
im1
.
rows
,
im2
.
rows
)));
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
));
Mat
result_s
,
result_mask
;
// If using cuda try blending multiple times without calling prepare inbetween
blender
.
blend
(
result_s
,
result_mask
);
for
(
int
i
=
0
;
i
<
(
try_cuda
?
10
:
1
);
++
i
)
{
result_s
.
convertTo
(
result
,
CV_8U
);
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
)
TEST
(
CUDA_MultiBandBlender
,
Accuracy
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment