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
!88
Implements
#146
upsampling option
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Implements
#146
upsampling option
feature/146/upsample
into
master
Overview
0
Commits
16
Pipelines
1
Changes
1
Merged
Nicolas Pope
requested to merge
feature/146/upsample
into
master
5 years ago
Overview
0
Commits
16
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
4e5f708b
Prev
Next
Show latest version
1 file
+
7
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
4e5f708b
Fix for incorrect energy memory
· 4e5f708b
Nicolas Pope
authored
5 years ago
applications/reconstruct/src/dibr.cu
+
7
−
6
Options
@@ -13,7 +13,7 @@
#define WARP_SIZE 32
#define DEPTH_THRESHOLD 0.05f
#define UPSAMPLE_MAX 60
#define MAX_ITERATIONS 32
#define MAX_ITERATIONS
64 // Note: Must be multiple of
32
#define SPATIAL_SMOOTHING 0.005f
using
ftl
::
cuda
::
TextureObject
;
@@ -476,15 +476,16 @@ __device__ inline float warpMin(float e) {
//if (y == 200) printf("interval: %f\n", maxDepth);
float
maxenergy
=
0
.0
f
;
float
maxenergy
=
-
1
.0
f
;
float
bestdepth
=
0.0
f
;
// Search for best or threshold energy
for
(
int
k
=
lane
;
k
<
MAX_ITERATIONS
;
k
+=
WARP_SIZE
)
{
const
float3
nearest
=
params
.
camera
.
kinectDepthToSkeleton
(
x
,
y
,
minDepth
+
float
(
k
)
*
interval
);
const
float
myenergy
=
ftl
::
cuda
::
mls_point_energy
<
MAX_NEIGHBORS_2
>
(
neighborhood_cache
[
warp
],
nearest
,
nidx
[
warp
],
SPATIAL_SMOOTHING
);
maxenergy
=
warpMax
(
max
(
myenergy
,
maxenergy
));
bestdepth
=
(
myenergy
==
maxenergy
)
?
nearest
.
z
:
0.0
f
;
const
float
newenergy
=
warpMax
(
max
(
myenergy
,
maxenergy
));
bestdepth
=
(
myenergy
==
newenergy
)
?
nearest
.
z
:
(
newenergy
>
maxenergy
)
?
0.0
f
:
bestdepth
;
maxenergy
=
newenergy
;
}
// Search for first energy maximum above a threshold
@@ -494,8 +495,8 @@ __device__ inline float warpMin(float e) {
const
unsigned
int
cy
=
y
;
if
(
bestdepth
>
params
.
camera
.
m_sensorDepthWorldMin
&&
bestdepth
<
params
.
camera
.
m_sensorDepthWorldMax
&&
cx
<
depth
.
width
()
&&
cy
<
depth
.
height
())
{
// Transform estimated point to virtual cam space and output z
//
atomicMin(&depth(cx,cy), bestdepth * 1000.0f);
depth
(
cx
,
cy
)
=
bestdepth
*
1000.0
f
;
atomicMin
(
&
depth
(
cx
,
cy
),
bestdepth
*
1000.0
f
);
//
depth(cx,cy) = bestdepth * 1000.0f;
}
}
}
Loading