Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
311ee203
Commit
311ee203
authored
Jun 23, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed RGBD compile errs and warnings
parent
16839ea5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
19 deletions
+26
-19
normal.cpp
modules/rgbd/src/normal.cpp
+8
-1
test_normal.cpp
modules/rgbd/test/test_normal.cpp
+16
-16
test_odometry.cpp
modules/rgbd/test/test_odometry.cpp
+1
-1
test_utils.cpp
modules/rgbd/test/test_utils.cpp
+1
-1
No files found.
modules/rgbd/src/normal.cpp
View file @
311ee203
...
...
@@ -307,7 +307,14 @@ namespace
(
*
normal
)[
2
]
=
*
row_r
;
}
else
signNormal
((
*
M_inv
)
*
(
*
B_vec
),
*
normal
);
{
Mat33T
Mr
=
*
M_inv
;
Vec3T
Br
=
*
B_vec
;
Vec3T
MBr
(
Mr
(
0
,
0
)
*
Br
[
0
]
+
Mr
(
0
,
1
)
*
Br
[
1
]
+
Mr
(
0
,
2
)
*
Br
[
2
],
Mr
(
1
,
0
)
*
Br
[
0
]
+
Mr
(
1
,
1
)
*
Br
[
1
]
+
Mr
(
1
,
2
)
*
Br
[
2
],
Mr
(
2
,
0
)
*
Br
[
0
]
+
Mr
(
2
,
1
)
*
Br
[
1
]
+
Mr
(
2
,
2
)
*
Br
[
2
]);
signNormal
(
MBr
,
*
normal
);
}
}
private
:
...
...
modules/rgbd/test/test_normal.cpp
View file @
311ee203
...
...
@@ -189,26 +189,26 @@ protected:
case
0
:
method
=
cv
::
RgbdNormals
::
RGBD_NORMALS_METHOD_FALS
;
std
::
cout
<<
std
::
endl
<<
"*** FALS"
<<
std
::
endl
;
errors
[
0
][
0
]
=
0.006
;
errors
[
0
][
1
]
=
0.03
;
errors
[
1
][
0
]
=
0.00008
;
errors
[
1
][
1
]
=
0.02
;
errors
[
0
][
0
]
=
0.006
f
;
errors
[
0
][
1
]
=
0.03
f
;
errors
[
1
][
0
]
=
0.00008
f
;
errors
[
1
][
1
]
=
0.02
f
;
break
;
case
1
:
method
=
cv
::
RgbdNormals
::
RGBD_NORMALS_METHOD_LINEMOD
;
std
::
cout
<<
std
::
endl
<<
"*** LINEMOD"
<<
std
::
endl
;
errors
[
0
][
0
]
=
0.04
;
errors
[
0
][
1
]
=
0.07
;
errors
[
1
][
0
]
=
0.05
;
errors
[
1
][
1
]
=
0.08
;
errors
[
0
][
0
]
=
0.04
f
;
errors
[
0
][
1
]
=
0.07
f
;
errors
[
1
][
0
]
=
0.05
f
;
errors
[
1
][
1
]
=
0.08
f
;
break
;
case
2
:
method
=
cv
::
RgbdNormals
::
RGBD_NORMALS_METHOD_SRI
;
std
::
cout
<<
std
::
endl
<<
"*** SRI"
<<
std
::
endl
;
errors
[
0
][
0
]
=
0.02
;
errors
[
0
][
1
]
=
0.04
;
errors
[
1
][
0
]
=
0.02
;
errors
[
1
][
1
]
=
0.04
;
errors
[
0
][
0
]
=
0.02
f
;
errors
[
0
][
1
]
=
0.04
f
;
errors
[
1
][
0
]
=
0.02
f
;
errors
[
1
][
1
]
=
0.04
f
;
break
;
default
:
method
=
(
cv
::
RgbdNormals
::
RGBD_NORMALS_METHOD
)
-
1
;
...
...
@@ -369,15 +369,15 @@ protected:
}
// Compare each found plane to each ground truth plane
size_t
n_planes
=
plane_coefficients
.
size
();
size_t
n_gt_planes
=
gt_planes
.
size
();
int
n_planes
=
(
int
)
plane_coefficients
.
size
();
int
n_gt_planes
=
(
int
)
gt_planes
.
size
();
cv
::
Mat_
<
int
>
matching
(
n_gt_planes
,
n_planes
);
for
(
size_
t
j
=
0
;
j
<
n_gt_planes
;
++
j
)
for
(
in
t
j
=
0
;
j
<
n_gt_planes
;
++
j
)
{
cv
::
Mat
gt_mask
=
gt_plane_mask
==
j
;
int
n_gt
=
cv
::
countNonZero
(
gt_mask
);
int
n_max
=
0
,
i_max
=
0
;
for
(
size_
t
i
=
0
;
i
<
n_planes
;
++
i
)
for
(
in
t
i
=
0
;
i
<
n_planes
;
++
i
)
{
cv
::
Mat
dst
;
cv
::
bitwise_and
(
gt_mask
,
plane_mask
==
i
,
dst
);
...
...
modules/rgbd/test/test_odometry.cpp
View file @
311ee203
...
...
@@ -206,7 +206,7 @@ bool CV_OdometryTest::readData(Mat& image, Mat& depth) const
void
CV_OdometryTest
::
generateRandomTransformation
(
Mat
&
rvec
,
Mat
&
tvec
)
{
const
float
maxRotation
=
3.
f
/
180.
f
*
CV_PI
;
//rad
const
float
maxRotation
=
(
float
)(
3.
f
/
180.
f
*
CV_PI
)
;
//rad
const
float
maxTranslation
=
0.02
f
;
//m
RNG
&
rng
=
theRNG
();
...
...
modules/rgbd/test/test_utils.cpp
View file @
311ee203
...
...
@@ -42,7 +42,7 @@ protected:
float
avg_diff
=
0
;
for
(
int
y
=
0
;
y
<
rows
;
++
y
)
for
(
int
x
=
0
;
x
<
cols
;
++
x
)
avg_diff
+=
cv
::
norm
(
image_points
.
at
<
cv
::
Vec2f
>
(
y
,
x
)
-
cv
::
Vec2f
(
x
,
y
));
avg_diff
+=
(
float
)
cv
::
norm
(
image_points
.
at
<
cv
::
Vec2f
>
(
y
,
x
)
-
cv
::
Vec2f
((
float
)
x
,(
float
)
y
));
// Verify the function works
ASSERT_LE
(
avg_diff
/
rows
/
cols
,
1e-4
)
<<
"Average error for ground truth is: "
<<
(
avg_diff
/
rows
/
cols
);
...
...
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