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
495c17af
Commit
495c17af
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/bilateralfilter' into 'master'
Feature/bilateralfilter See merge request nicolas.pope/ftl!9
parents
8e975ddd
49fb944a
No related branches found
No related tags found
1 merge request
!9
Feature/bilateralfilter
Pipeline
#10889
passed
5 years ago
Stage: all
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/rgbd-sources/src/algorithms/fixstars_sgm.cpp
+5
-3
5 additions, 3 deletions
components/rgbd-sources/src/algorithms/fixstars_sgm.cpp
with
5 additions
and
3 deletions
components/rgbd-sources/src/algorithms/fixstars_sgm.cpp
+
5
−
3
View file @
495c17af
...
...
@@ -12,7 +12,9 @@ using cv::Mat;
FixstarsSGM
::
FixstarsSGM
(
nlohmann
::
json
&
config
)
:
Disparity
(
config
)
{
ssgm_
=
nullptr
;
use_filter_
=
config
.
value
(
"use_filter"
,
false
);
filter_
=
cv
::
cuda
::
createDisparityBilateralFilter
(
max_disp_
,
config
.
value
(
"filter_radius"
,
25
),
config
.
value
(
"filter_iter"
,
1
));
// note: (max_disp_ << 4) libsgm subpixel accuracy.
// What is the impact in the filter? (possible artifacts)
filter_
=
cv
::
cuda
::
createDisparityBilateralFilter
(
max_disp_
<<
4
,
config
.
value
(
"filter_radius"
,
25
),
config
.
value
(
"filter_iter"
,
1
));
}
void
FixstarsSGM
::
compute
(
const
cv
::
Mat
&
l
,
const
cv
::
Mat
&
r
,
cv
::
Mat
&
disp
)
{
...
...
@@ -20,7 +22,7 @@ void FixstarsSGM::compute(const cv::Mat &l, const cv::Mat &r, cv::Mat &disp) {
Mat
right_disp
;
Mat
lbw
,
rbw
;
cv
::
cvtColor
(
l
,
lbw
,
cv
::
COLOR_BGR2GRAY
);
cv
::
cvtColor
(
l
,
lbw
,
cv
::
COLOR_BGR2GRAY
);
cv
::
cvtColor
(
r
,
rbw
,
cv
::
COLOR_BGR2GRAY
);
if
(
!
ssgm_
)
{
...
...
@@ -54,4 +56,4 @@ void FixstarsSGM::compute(const cv::Mat &l, const cv::Mat &r, cv::Mat &disp) {
}
disp
.
convertTo
(
disp
,
CV_32F
,
1.0
f
/
16.0
f
);
}
\ No newline at end of file
}
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