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
b01c3738
Commit
b01c3738
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Increased colour smoothing
parent
1a480a3d
No related branches found
No related tags found
1 merge request
!90
Implement #150 splat resizing
Pipeline
#12711
passed
5 years ago
Stage: all
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/reconstruct/src/dibr.cu
+5
-4
5 additions, 4 deletions
applications/reconstruct/src/dibr.cu
with
5 additions
and
4 deletions
applications/reconstruct/src/dibr.cu
+
5
−
4
View file @
b01c3738
...
@@ -400,8 +400,9 @@ __device__ inline float warpMin(float e) {
...
@@ -400,8 +400,9 @@ __device__ inline float warpMin(float e) {
}
}
#define ENERGY_THRESHOLD 0.1f
#define ENERGY_THRESHOLD 0.1f
#define SMOOTHING_MULTIPLIER_A 10.0f
#define SMOOTHING_MULTIPLIER_A 10.0f // For surface search
#define SMOOTHING_MULTIPLIER_B 5.0f
#define SMOOTHING_MULTIPLIER_B 5.0f // For z contribution
#define SMOOTHING_MULTIPLIER_C 5.0f // For colour contribution
/*
/*
...
@@ -588,7 +589,7 @@ __global__ void dibr_attribute_contrib_kernel(
...
@@ -588,7 +589,7 @@ __global__ void dibr_attribute_contrib_kernel(
if
(
camPos
.
z
>
params
.
camera
.
m_sensorDepthWorldMax
)
return
;
if
(
camPos
.
z
>
params
.
camera
.
m_sensorDepthWorldMax
)
return
;
const
uint2
screenPos
=
params
.
camera
.
cameraToKinectScreen
(
camPos
);
const
uint2
screenPos
=
params
.
camera
.
cameraToKinectScreen
(
camPos
);
const
int
upsample
=
min
(
UPSAMPLE_MAX
,
int
((
5.0
f
*
r
)
*
params
.
camera
.
fx
/
camPos
.
z
));
const
int
upsample
=
8
;
//
min(UPSAMPLE_MAX, int((5.0f*r) * params.camera.fx / camPos.z));
// Not on screen so stop now...
// Not on screen so stop now...
if
(
screenPos
.
x
<
0
||
screenPos
.
y
<
0
||
if
(
screenPos
.
x
<
0
||
screenPos
.
y
<
0
||
...
@@ -613,7 +614,7 @@ __global__ void dibr_attribute_contrib_kernel(
...
@@ -613,7 +614,7 @@ __global__ void dibr_attribute_contrib_kernel(
const
float3
nearest
=
params
.
camera
.
kinectDepthToSkeleton
((
int
)(
screenPos
.
x
+
u
),(
int
)(
screenPos
.
y
+
v
),
d
);
const
float3
nearest
=
params
.
camera
.
kinectDepthToSkeleton
((
int
)(
screenPos
.
x
+
u
),(
int
)(
screenPos
.
y
+
v
),
d
);
// What is contribution of our current point at this pixel?
// What is contribution of our current point at this pixel?
const
float
weight
=
ftl
::
cuda
::
spatialWeighting
(
length
(
nearest
-
camPos
),
SMOOTHING_MULTIPLIER_
B
*
(
nearest
.
z
/
params
.
camera
.
fx
));
const
float
weight
=
ftl
::
cuda
::
spatialWeighting
(
length
(
nearest
-
camPos
),
SMOOTHING_MULTIPLIER_
C
*
(
nearest
.
z
/
params
.
camera
.
fx
));
if
(
screenPos
.
x
+
u
<
colour_out
.
width
()
&&
screenPos
.
y
+
v
<
colour_out
.
height
()
&&
weight
>
0.0
f
)
{
// TODO: Use confidence threshold here
if
(
screenPos
.
x
+
u
<
colour_out
.
width
()
&&
screenPos
.
y
+
v
<
colour_out
.
height
()
&&
weight
>
0.0
f
)
{
// TODO: Use confidence threshold here
const
float4
wcolour
=
colour
*
weight
;
const
float4
wcolour
=
colour
*
weight
;
const
float4
wnormal
=
normal
*
weight
;
const
float4
wnormal
=
normal
*
weight
;
...
...
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