Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Monado
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Monado
Monado
Commits
8d4efb42
Commit
8d4efb42
authored
Jan 07, 2020
by
Ryan Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t/psmv: Dump frames to disk for external usage. DO NOT MERGE
parent
327ca356
Pipeline
#102953
passed with stages
in 3 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/xrt/auxiliary/tracking/t_tracker_psmv.cpp
src/xrt/auxiliary/tracking/t_tracker_psmv.cpp
+16
-0
No files found.
src/xrt/auxiliary/tracking/t_tracker_psmv.cpp
View file @
8d4efb42
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <assert.h>
#include <assert.h>
#include <pthread.h>
#include <pthread.h>
DEBUG_GET_ONCE_BOOL_OPTION
(
dump
,
"PSMV_DUMP_FRAMES"
,
false
)
/*!
/*!
* Single camera.
* Single camera.
...
@@ -87,6 +88,8 @@ struct TrackerPSMV
...
@@ -87,6 +88,8 @@ struct TrackerPSMV
std
::
unique_ptr
<
xrt_fusion
::
PSMVFusionInterface
>
filter
;
std
::
unique_ptr
<
xrt_fusion
::
PSMVFusionInterface
>
filter
;
xrt_vec3
tracked_object_position
;
xrt_vec3
tracked_object_position
;
cv
::
Ptr
<
cv
::
VideoWriter
>
video_writer
;
};
};
static
void
static
void
...
@@ -270,6 +273,16 @@ process(TrackerPSMV &t, struct xrt_frame *xf)
...
@@ -270,6 +273,16 @@ process(TrackerPSMV &t, struct xrt_frame *xf)
cv
::
Mat
l_grey
(
rows
,
cols
,
CV_8UC1
,
xf
->
data
,
stride
);
cv
::
Mat
l_grey
(
rows
,
cols
,
CV_8UC1
,
xf
->
data
,
stride
);
cv
::
Mat
r_grey
(
rows
,
cols
,
CV_8UC1
,
xf
->
data
+
cols
,
stride
);
cv
::
Mat
r_grey
(
rows
,
cols
,
CV_8UC1
,
xf
->
data
+
cols
,
stride
);
if
(
t
.
video_writer
)
{
if
(
!
t
.
video_writer
->
isOpened
())
{
t
.
video_writer
->
open
(
"psmove_%04d.png"
,
0
/*cv::VideoWriter::fourcc('M', 'J', 'P', 'G')*/
,
60
,
cv
::
Size
(
l_grey
.
cols
,
l_grey
.
rows
));
}
(
*
t
.
video_writer
)
<<
l_grey
;
}
do_view
(
t
,
t
.
view
[
0
],
l_grey
,
t
.
debug
.
rgb
[
0
]);
do_view
(
t
,
t
.
view
[
0
],
l_grey
,
t
.
debug
.
rgb
[
0
]);
do_view
(
t
,
t
.
view
[
1
],
r_grey
,
t
.
debug
.
rgb
[
1
]);
do_view
(
t
,
t
.
view
[
1
],
r_grey
,
t
.
debug
.
rgb
[
1
]);
...
@@ -631,6 +644,9 @@ t_psmv_create(struct xrt_frame_context *xfctx,
...
@@ -631,6 +644,9 @@ t_psmv_create(struct xrt_frame_context *xfctx,
// clang-format on
// clang-format on
t
.
sbd
=
cv
::
SimpleBlobDetector
::
create
(
blob_params
);
t
.
sbd
=
cv
::
SimpleBlobDetector
::
create
(
blob_params
);
if
(
debug_get_bool_option_dump
())
{
t
.
video_writer
.
reset
(
new
cv
::
VideoWriter
());
}
xrt_frame_context_add
(
xfctx
,
&
t
.
node
);
xrt_frame_context_add
(
xfctx
,
&
t
.
node
);
// Everything is safe, now setup the variable tracking.
// Everything is safe, now setup the variable tracking.
...
...
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