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
096080de
Commit
096080de
authored
14 years ago
by
Andrey Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added methods estimateRecopmmendedParams for StereoBP and StereoCSBP
parent
1febf345
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
gpu.hpp
modules/gpu/include/opencv2/gpu/gpu.hpp
+4
-0
beliefpropagation_gpu.cpp
modules/gpu/src/beliefpropagation_gpu.cpp
+13
-0
constantspacebp_gpu.cpp
modules/gpu/src/constantspacebp_gpu.cpp
+14
-0
No files found.
modules/gpu/include/opencv2/gpu/gpu.hpp
View file @
096080de
...
...
@@ -415,6 +415,8 @@ namespace cv
enum
{
DEFAULT_ITERS
=
5
};
enum
{
DEFAULT_LEVELS
=
5
};
static
void
estimateRecopmmendedParams
(
int
width
,
int
height
,
int
&
ndisp
,
int
&
iters
,
int
&
levels
);
//! the default constructor
explicit
StereoBeliefPropagation
(
int
ndisp
=
DEFAULT_NDISP
,
int
iters
=
DEFAULT_ITERS
,
...
...
@@ -471,6 +473,8 @@ namespace cv
enum
{
DEFAULT_LEVELS
=
4
};
enum
{
DEFAULT_NR_PLANE
=
4
};
static
void
estimateRecopmmendedParams
(
int
width
,
int
height
,
int
&
ndisp
,
int
&
iters
,
int
&
levels
,
int
&
nr_plane
);
//! the default constructor
explicit
StereoConstantSpaceBP
(
int
ndisp
=
DEFAULT_NDISP
,
int
iters
=
DEFAULT_ITERS
,
...
...
This diff is collapsed.
Click to expand it.
modules/gpu/src/beliefpropagation_gpu.cpp
View file @
096080de
...
...
@@ -77,6 +77,19 @@ namespace
const
float
DEFAULT_DISC_SINGLE_JUMP
=
1.0
f
;
}
void
cv
::
gpu
::
StereoBeliefPropagation
::
estimateRecopmmendedParams
(
int
width
,
int
height
,
int
&
ndisp
,
int
&
iters
,
int
&
levels
)
{
ndisp
=
width
/
4
;
if
(
ndisp
&
1
!=
0
)
ndisp
++
;
int
mm
=::
max
(
width
,
height
);
iters
=
mm
/
100
+
2
;
levels
=
(
int
)(
log
(
mm
)
+
1
)
*
4
/
5
;
if
(
levels
==
0
)
levels
++
;
}
cv
::
gpu
::
StereoBeliefPropagation
::
StereoBeliefPropagation
(
int
ndisp_
,
int
iters_
,
int
levels_
,
int
msg_type_
)
:
ndisp
(
ndisp_
),
iters
(
iters_
),
levels
(
levels_
),
max_data_term
(
DEFAULT_MAX_DATA_TERM
),
data_weight
(
DEFAULT_DATA_WEIGHT
),
...
...
This diff is collapsed.
Click to expand it.
modules/gpu/src/constantspacebp_gpu.cpp
View file @
096080de
...
...
@@ -105,6 +105,20 @@ namespace
const
float
DEFAULT_DISC_SINGLE_JUMP
=
10.0
f
;
}
void
cv
::
gpu
::
StereoConstantSpaceBP
::
estimateRecopmmendedParams
(
int
width
,
int
height
,
int
&
ndisp
,
int
&
iters
,
int
&
levels
,
int
&
nr_plane
)
{
ndisp
=
(
int
)
((
float
)
width
/
3.14
f
);
if
(
ndisp
&
1
!=
0
)
ndisp
++
;
int
mm
=
::
max
(
width
,
height
);
iters
=
mm
/
100
+
((
mm
>
1200
)
?
-
4
:
4
);
levels
=
(
int
)
log
(
mm
)
*
2
/
3
;
if
(
levels
==
0
)
levels
++
;
nr_plane
=
(
int
)
((
float
)
ndisp
/
pow
(
2.0
,
levels
+
1
));
}
cv
::
gpu
::
StereoConstantSpaceBP
::
StereoConstantSpaceBP
(
int
ndisp_
,
int
iters_
,
int
levels_
,
int
nr_plane_
,
int
msg_type_
)
...
...
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