Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
61146e59
Commit
61146e59
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Allow disable of filling
parent
39d53443
No related branches found
No related tags found
1 merge request
!122
Implements #183 depth ray correspondences
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
applications/reconstruct/src/ilw/ilw.cpp
+27
-14
27 additions, 14 deletions
applications/reconstruct/src/ilw/ilw.cpp
applications/reconstruct/src/ilw/ilw.hpp
+1
-0
1 addition, 0 deletions
applications/reconstruct/src/ilw/ilw.hpp
with
28 additions
and
14 deletions
applications/reconstruct/src/ilw/ilw.cpp
+
27
−
14
View file @
61146e59
...
@@ -23,8 +23,13 @@ ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) {
...
@@ -23,8 +23,13 @@ ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) {
params_
.
spatial_smooth
=
value
(
"spatial_smooth"
,
0.04
f
);
params_
.
spatial_smooth
=
value
(
"spatial_smooth"
,
0.04
f
);
params_
.
cost_ratio
=
value
(
"cost_ratio"
,
0.2
f
);
params_
.
cost_ratio
=
value
(
"cost_ratio"
,
0.2
f
);
discon_mask_
=
value
(
"discontinuity_mask"
,
2
);
discon_mask_
=
value
(
"discontinuity_mask"
,
2
);
fill_depth_
=
value
(
"fill_depth"
,
true
);
on
(
"ilw_align"
,
[
this
](
const
ftl
::
config
::
Event
&
e
)
{
on
(
"fill_depth"
,
[
this
](
const
ftl
::
config
::
Event
&
e
)
{
fill_depth_
=
value
(
"fill_depth"
,
true
);
});
on
(
"ilw_align"
,
[
this
](
const
ftl
::
config
::
Event
&
e
)
{
enabled_
=
value
(
"ilw_align"
,
true
);
enabled_
=
value
(
"ilw_align"
,
true
);
});
});
...
@@ -160,19 +165,6 @@ bool ILW::_phase0(ftl::rgbd::FrameSet &fs, cudaStream_t stream) {
...
@@ -160,19 +165,6 @@ bool ILW::_phase0(ftl::rgbd::FrameSet &fs, cudaStream_t stream) {
f
.
createTexture
<
int
>
(
Channel
::
Mask
,
Format
<
int
>
(
f
.
get
<
GpuMat
>
(
Channel
::
Colour
).
size
()));
f
.
createTexture
<
int
>
(
Channel
::
Mask
,
Format
<
int
>
(
f
.
get
<
GpuMat
>
(
Channel
::
Colour
).
size
()));
f
.
createTexture
<
uchar4
>
(
Channel
::
Colour
);
f
.
createTexture
<
uchar4
>
(
Channel
::
Colour
);
f
.
createTexture
<
float
>
(
Channel
::
Depth
);
f
.
createTexture
<
float
>
(
Channel
::
Depth
);
ftl
::
cuda
::
preprocess_depth
(
f
.
getTexture
<
float
>
(
Channel
::
Depth
),
f
.
getTexture
<
float
>
(
Channel
::
Depth2
),
f
.
getTexture
<
uchar4
>
(
Channel
::
Colour
),
f
.
getTexture
<
int
>
(
Channel
::
Mask
),
s
->
parameters
(),
params_
,
stream
);
//cv::cuda::swap(f.get<GpuMat>(Channel::Depth),f.get<GpuMat>(Channel::Depth2));
f
.
swapChannels
(
Channel
::
Depth
,
Channel
::
Depth2
);
}
}
return
true
;
return
true
;
...
@@ -182,6 +174,27 @@ bool ILW::_phase1(ftl::rgbd::FrameSet &fs, int win, cudaStream_t stream) {
...
@@ -182,6 +174,27 @@ bool ILW::_phase1(ftl::rgbd::FrameSet &fs, int win, cudaStream_t stream) {
// Run correspondence kernel to create an energy vector
// Run correspondence kernel to create an energy vector
cv
::
cuda
::
Stream
cvstream
=
cv
::
cuda
::
StreamAccessor
::
wrapStream
(
stream
);
cv
::
cuda
::
Stream
cvstream
=
cv
::
cuda
::
StreamAccessor
::
wrapStream
(
stream
);
// First do any preprocessing
if
(
fill_depth_
)
{
for
(
size_t
i
=
0
;
i
<
fs
.
frames
.
size
();
++
i
)
{
auto
&
f
=
fs
.
frames
[
i
];
auto
s
=
fs
.
sources
[
i
];
ftl
::
cuda
::
preprocess_depth
(
f
.
getTexture
<
float
>
(
Channel
::
Depth
),
f
.
getTexture
<
float
>
(
Channel
::
Depth2
),
f
.
getTexture
<
uchar4
>
(
Channel
::
Colour
),
f
.
getTexture
<
int
>
(
Channel
::
Mask
),
s
->
parameters
(),
params_
,
stream
);
//cv::cuda::swap(f.get<GpuMat>(Channel::Depth),f.get<GpuMat>(Channel::Depth2));
f
.
swapChannels
(
Channel
::
Depth
,
Channel
::
Depth2
);
}
}
// For each camera combination
// For each camera combination
for
(
size_t
i
=
0
;
i
<
fs
.
frames
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
fs
.
frames
.
size
();
++
i
)
{
auto
&
f1
=
fs
.
frames
[
i
];
auto
&
f1
=
fs
.
frames
[
i
];
...
...
This diff is collapsed.
Click to expand it.
applications/reconstruct/src/ilw/ilw.hpp
+
1
−
0
View file @
61146e59
...
@@ -70,6 +70,7 @@ class ILW : public ftl::Configurable {
...
@@ -70,6 +70,7 @@ class ILW : public ftl::Configurable {
int
motion_window_
;
int
motion_window_
;
bool
use_lab_
;
bool
use_lab_
;
int
discon_mask_
;
int
discon_mask_
;
bool
fill_depth_
;
};
};
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment