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
Merge requests
!153
Implements
#223
colour based smooth, but is too simplistic
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Implements
#223
colour based smooth, but is too simplistic
feature/223/presmooth
into
master
Overview
0
Commits
6
Pipelines
1
Changes
3
Merged
Nicolas Pope
requested to merge
feature/223/presmooth
into
master
5 years ago
Overview
0
Commits
6
Pipelines
1
Changes
3
Expand
0
0
Merge request reports
Viewing commit
758099da
Prev
Next
Show latest version
3 files
+
30
−
25
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
758099da
Iterate smoothing kernel
· 758099da
Nicolas Pope
authored
5 years ago
applications/reconstruct/src/filters/smoothing.cu
+
20
−
18
Options
@@ -52,30 +52,32 @@ void ftl::cuda::depth_smooth(
ftl
::
cuda
::
TextureObject
<
uchar4
>
&
colour_in
,
ftl
::
cuda
::
TextureObject
<
float
>
&
depth_out
,
const
ftl
::
rgbd
::
Camera
&
camera
,
int
radius
,
float
factor
,
float
thresh
,
cudaStream_t
stream
)
{
int
radius
,
float
factor
,
float
thresh
,
int
iters
,
cudaStream_t
stream
)
{
const
dim3
gridSize
((
depth_out
.
width
()
+
T_PER_BLOCK
-
1
)
/
T_PER_BLOCK
,
(
depth_out
.
height
()
+
T_PER_BLOCK
-
1
)
/
T_PER_BLOCK
);
const
dim3
blockSize
(
T_PER_BLOCK
,
T_PER_BLOCK
);
switch
(
radius
)
{
case
5
:
depth_smooth_kernel
<
5
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
4
:
depth_smooth_kernel
<
4
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
3
:
depth_smooth_kernel
<
3
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
2
:
depth_smooth_kernel
<
2
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
1
:
depth_smooth_kernel
<
1
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
default:
break
;
}
cudaSafeCall
(
cudaGetLastError
()
);
for
(
int
n
=
0
;
n
<
iters
;
++
n
)
{
switch
(
radius
)
{
case
5
:
depth_smooth_kernel
<
5
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
4
:
depth_smooth_kernel
<
4
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
3
:
depth_smooth_kernel
<
3
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
2
:
depth_smooth_kernel
<
2
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
case
1
:
depth_smooth_kernel
<
1
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_in
,
colour_in
,
depth_out
,
camera
,
factor
,
thresh
);
break
;
default:
break
;
}
cudaSafeCall
(
cudaGetLastError
()
);
switch
(
radius
)
{
case
5
:
depth_smooth_kernel
<
5
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
4
:
depth_smooth_kernel
<
4
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
3
:
depth_smooth_kernel
<
3
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
2
:
depth_smooth_kernel
<
2
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
1
:
depth_smooth_kernel
<
1
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
default:
break
;
switch
(
radius
)
{
case
5
:
depth_smooth_kernel
<
5
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
4
:
depth_smooth_kernel
<
4
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
3
:
depth_smooth_kernel
<
3
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
2
:
depth_smooth_kernel
<
2
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
case
1
:
depth_smooth_kernel
<
1
><<<
gridSize
,
blockSize
,
0
,
stream
>>>
(
depth_out
,
colour_in
,
depth_in
,
camera
,
factor
,
thresh
);
break
;
default:
break
;
}
cudaSafeCall
(
cudaGetLastError
()
);
}
cudaSafeCall
(
cudaGetLastError
()
);
#ifdef _DEBUG
cudaSafeCall
(
cudaDeviceSynchronize
());
Loading