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
738a0b06
Prev
Next
Show latest version
1 file
+
5
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
738a0b06
Minor tidy
· 738a0b06
Nicolas Pope
authored
5 years ago
applications/reconstruct/src/dibr.cu
+
5
−
3
Options
@@ -447,6 +447,8 @@ __device__ inline float warpMin(float e) {
// Preload valid neighbour points from within a window. A point is valid
// if it is within a specific distance of the minimum.
// Also calculate the maximum at the same time.
// TODO: Could here do a small search in each camera? This would allow all
// points to be considered, even those masked in our depth input.
const
float3
minPos
=
params
.
camera
.
kinectDepthToSkeleton
(
x
,
y
,
minDepth
);
for
(
int
i
=
lane
;
i
<
NEIGHBOR_WINDOW
;
i
+=
WARP_SIZE
)
{
@@ -550,11 +552,11 @@ __global__ void dibr_attribute_contrib_kernel(
if
(
camPos
.
z
>
params
.
camera
.
m_sensorDepthWorldMax
)
return
;
const
uint2
screenPos
=
params
.
camera
.
cameraToKinectScreen
(
camPos
);
const
int
upsample
=
min
(
UPSAMPLE_MAX
,
int
((
10
.0
f
*
r
)
*
params
.
camera
.
fx
/
camPos
.
z
));
const
int
upsample
=
min
(
UPSAMPLE_MAX
,
int
((
5
.0
f
*
r
)
*
params
.
camera
.
fx
/
camPos
.
z
));
// Not on screen so stop now...
if
(
screenPos
.
x
+
upsample
<
0
||
screenPos
.
y
+
upsample
<
0
||
screenPos
.
x
-
upsample
>=
depth_in
.
width
()
||
screenPos
.
y
-
upsample
>=
depth_in
.
height
())
return
;
if
(
screenPos
.
x
<
0
||
screenPos
.
y
<
0
||
screenPos
.
x
>=
depth_in
.
width
()
||
screenPos
.
y
>=
depth_in
.
height
())
return
;
// Is this point near the actual surface and therefore a contributor?
const
float
d
=
((
float
)
depth_in
.
tex2D
((
int
)
screenPos
.
x
,
(
int
)
screenPos
.
y
)
/
1000.0
f
);
Loading