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
79b71ec9
Commit
79b71ec9
authored
Mar 20, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
88c4ed01
4d57438c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
depth_registration.cpp
modules/rgbd/src/depth_registration.cpp
+3
-4
test_registration.cpp
modules/rgbd/test/test_registration.cpp
+21
-0
No files found.
modules/rgbd/src/depth_registration.cpp
View file @
79b71ec9
...
...
@@ -146,14 +146,14 @@ namespace rgbd
// Apply the initial projection to the input depth
Mat_
<
Point3f
>
transformedCloud
;
{
Mat_
<
Point3f
>
point_tmp
(
outputImagePlaneSize
);
Mat_
<
Point3f
>
point_tmp
(
outputImagePlaneSize
,
Point3f
(
0.
,
0.
,
0.
)
);
for
(
int
j
=
0
;
j
<
point_tmp
.
rows
;
++
j
)
for
(
int
j
=
0
;
j
<
unregisteredDepth
.
rows
;
++
j
)
{
const
DepthDepth
*
unregisteredDepthPtr
=
unregisteredDepth
[
j
];
Point3f
*
point
=
point_tmp
[
j
];
for
(
int
i
=
0
;
i
<
point_tmp
.
cols
;
++
i
,
++
unregisteredDepthPtr
,
++
point
)
for
(
int
i
=
0
;
i
<
unregisteredDepth
.
cols
;
++
i
,
++
unregisteredDepthPtr
,
++
point
)
{
float
rescaled_depth
=
float
(
*
unregisteredDepthPtr
)
*
inputDepthToMetersScale
;
...
...
@@ -270,7 +270,6 @@ namespace rgbd
}
// iterate cols
}
// iterate rows
}
...
...
modules/rgbd/test/test_registration.cpp
View file @
79b71ec9
...
...
@@ -113,5 +113,26 @@ TEST(Rgbd_DepthRegistration, compute)
test
.
safe_run
();
}
TEST
(
Rgbd_DepthRegistration
,
issue_2234
)
{
Matx33f
intrinsicsDepth
(
100
,
0
,
50
,
0
,
100
,
50
,
0
,
0
,
1
);
Matx33f
intrinsicsColor
(
100
,
0
,
200
,
0
,
100
,
50
,
0
,
0
,
1
);
Mat_
<
float
>
depthMat
(
100
,
100
,
(
float
)
0.
);
for
(
int
i
=
1
;
i
<=
100
;
i
++
)
{
for
(
int
j
=
1
;
j
<=
100
;
j
++
)
depthMat
(
i
-
1
,
j
-
1
)
=
(
float
)
j
;
}
Mat
registeredDepth
;
registerDepth
(
intrinsicsDepth
,
intrinsicsColor
,
Mat
(),
Matx44f
::
eye
(),
depthMat
,
Size
(
400
,
100
),
registeredDepth
);
Rect
roi
(
150
,
0
,
100
,
100
);
Mat
subM
(
registeredDepth
,
roi
);
EXPECT_EQ
(
0
,
cvtest
::
norm
(
subM
,
depthMat
,
NORM_INF
));
}
}}
// namespace
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