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
788ac96f
Commit
788ac96f
authored
Aug 02, 2010
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added optimized belief propagation implementation (used short for messages)
parent
d6bbaea2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
10 deletions
+26
-10
gpu.hpp
modules/gpu/include/opencv2/gpu/gpu.hpp
+26
-10
beliefpropagation_gpu.cpp
modules/gpu/src/beliefpropagation_gpu.cpp
+0
-0
beliefpropagation.cu
modules/gpu/src/cuda/beliefpropagation.cu
+0
-0
saturate_cast.hpp
modules/gpu/src/cuda/saturate_cast.hpp
+0
-0
No files found.
modules/gpu/include/opencv2/gpu/gpu.hpp
View file @
788ac96f
...
@@ -375,20 +375,32 @@ namespace cv
...
@@ -375,20 +375,32 @@ namespace cv
class
CV_EXPORTS
StereoBeliefPropagation_GPU
class
CV_EXPORTS
StereoBeliefPropagation_GPU
{
{
public
:
public
:
enum
{
MSG_TYPE_AUTO
,
MSG_TYPE_FLOAT
,
MSG_TYPE_SHORT_SCALE_AUTO
,
MSG_TYPE_SHORT_SCALE_MANUAL
};
enum
{
DEFAULT_NDISP
=
64
};
enum
{
DEFAULT_NDISP
=
64
};
enum
{
DEFAULT_ITERS
=
5
};
enum
{
DEFAULT_ITERS
=
5
};
enum
{
DEFAULT_LEVELS
=
5
};
enum
{
DEFAULT_LEVELS
=
5
};
//! the default constructor
//! the default constructor
explicit
StereoBeliefPropagation_GPU
(
int
ndisp
=
DEFAULT_NDISP
,
explicit
StereoBeliefPropagation_GPU
(
int
ndisp_
=
DEFAULT_NDISP
,
int
iters
=
DEFAULT_ITERS
,
int
iters_
=
DEFAULT_ITERS
,
int
levels
=
DEFAULT_LEVELS
);
int
levels_
=
DEFAULT_LEVELS
,
//! the full constructor taking the number of disparities, number of BP iterations on first level,
int
msg_type_
=
MSG_TYPE_AUTO
,
//! number of levels, truncation of discontinuity cost, truncation of data cost and weighting of data cost.
float
msg_scale
=
1.0
f
);
StereoBeliefPropagation_GPU
(
int
ndisp
,
int
iters
,
int
levels
,
float
disc_cost
,
float
data_cost
,
float
lambda
);
//! the full constructor taking the number of disparities, number of BP iterations on each level,
//! number of levels, truncation of data cost, data weight,
//! truncation of discontinuity cost and discontinuity single jump
StereoBeliefPropagation_GPU
(
int
ndisp_
,
int
iters_
,
int
levels_
,
float
max_data_term_
,
float
data_weight_
,
float
max_disc_term_
,
float
disc_single_jump_
,
int
msg_type_
=
MSG_TYPE_AUTO
,
float
msg_scale
=
1.0
f
);
//! the stereo correspondence operator. Finds the disparity for the specified rectified stereo pair,
//! the stereo correspondence operator. Finds the disparity for the specified rectified stereo pair,
//! if disparity is empty output type will be CV_
32
S else output type will be disparity.type().
//! if disparity is empty output type will be CV_
16
S else output type will be disparity.type().
void
operator
()(
const
GpuMat
&
left
,
const
GpuMat
&
right
,
GpuMat
&
disparity
);
void
operator
()(
const
GpuMat
&
left
,
const
GpuMat
&
right
,
GpuMat
&
disparity
);
//! Acync version
//! Acync version
...
@@ -404,9 +416,13 @@ namespace cv
...
@@ -404,9 +416,13 @@ namespace cv
int
iters
;
int
iters
;
int
levels
;
int
levels
;
float
disc_cost
;
float
max_data_term
;
float
data_cost
;
float
data_weight
;
float
lambda
;
float
max_disc_term
;
float
disc_single_jump
;
int
msg_type
;
float
msg_scale
;
private
:
private
:
GpuMat
u
,
d
,
l
,
r
,
u2
,
d2
,
l2
,
r2
;
GpuMat
u
,
d
,
l
,
r
,
u2
,
d2
,
l2
,
r2
;
std
::
vector
<
GpuMat
>
datas
;
std
::
vector
<
GpuMat
>
datas
;
...
...
modules/gpu/src/beliefpropagation_gpu.cpp
View file @
788ac96f
This diff is collapsed.
Click to expand it.
modules/gpu/src/cuda/beliefpropagation.cu
View file @
788ac96f
This diff is collapsed.
Click to expand it.
modules/gpu/src/cuda/saturate_cast.hpp
View file @
788ac96f
This diff is collapsed.
Click to expand it.
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