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
3901fb76
Commit
3901fb76
authored
Oct 15, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1841 from soyersoyer:kinfu_demo_start
parents
0c3b9349
1441c8e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
kinfu_demo.cpp
modules/rgbd/samples/kinfu_demo.cpp
+8
-12
No files found.
modules/rgbd/samples/kinfu_demo.cpp
View file @
3901fb76
...
...
@@ -95,10 +95,6 @@ namespace Kinect2Params
struct
DepthSource
{
public
:
DepthSource
()
:
DepthSource
(
""
,
-
1
)
{
}
DepthSource
(
int
cam
)
:
DepthSource
(
""
,
cam
)
{
}
...
...
@@ -247,7 +243,7 @@ static const char* keys =
{
"{help h usage ? | | print this message }"
"{depth | | Path to depth.txt file listing a set of depth images }"
"{camera |
| Index of depth camera to be used as a depth source }"
"{camera |
0
| Index of depth camera to be used as a depth source }"
"{coarse | | Run on coarse settings (fast but ugly) or on default (slow but looks better),"
" in coarse mode points and normals are displayed }"
"{idle | | Do not run KinFu, just display depth frames }"
...
...
@@ -295,13 +291,13 @@ int main(int argc, char **argv)
idle
=
true
;
}
DepthSource
ds
;
Ptr
<
DepthSource
>
ds
;
if
(
parser
.
has
(
"depth"
))
ds
=
DepthSource
(
parser
.
get
<
String
>
(
"depth"
));
if
(
parser
.
has
(
"camera"
)
&&
ds
.
empty
())
ds
=
DepthSource
(
parser
.
get
<
int
>
(
"camera"
));
ds
=
makePtr
<
DepthSource
>
(
parser
.
get
<
String
>
(
"depth"
));
else
ds
=
makePtr
<
DepthSource
>
(
parser
.
get
<
int
>
(
"camera"
));
if
(
ds
.
empty
())
if
(
ds
->
empty
())
{
std
::
cerr
<<
"Failed to open depth source"
<<
std
::
endl
;
parser
.
printMessage
();
...
...
@@ -321,7 +317,7 @@ int main(int argc, char **argv)
params
=
Params
::
defaultParams
();
// These params can be different for each depth sensor
ds
.
updateParams
(
*
params
);
ds
->
updateParams
(
*
params
);
// Enables OpenCL explicitly (by default can be switched-off)
cv
::
setUseOptimized
(
true
);
...
...
@@ -345,7 +341,7 @@ int main(int argc, char **argv)
int64
prevTime
=
getTickCount
();
for
(
UMat
frame
=
ds
.
getDepth
();
!
frame
.
empty
();
frame
=
ds
.
getDepth
())
for
(
UMat
frame
=
ds
->
getDepth
();
!
frame
.
empty
();
frame
=
ds
->
getDepth
())
{
if
(
depthWriter
)
depthWriter
->
append
(
frame
);
...
...
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