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
61d7ccdf
Commit
61d7ccdf
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Add mask channel and mask wrapper
parent
11198d70
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!122
Implements #183 depth ray correspondences
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
applications/reconstruct/src/ilw/ilw_cuda.hpp
+30
-0
30 additions, 0 deletions
applications/reconstruct/src/ilw/ilw_cuda.hpp
components/rgbd-sources/include/ftl/rgbd/channels.hpp
+1
-0
1 addition, 0 deletions
components/rgbd-sources/include/ftl/rgbd/channels.hpp
with
31 additions
and
0 deletions
applications/reconstruct/src/ilw/ilw_cuda.hpp
+
30
−
0
View file @
61d7ccdf
...
@@ -22,6 +22,36 @@ static const uint kILWFlag_RestrictZ = 0x0002;
...
@@ -22,6 +22,36 @@ static const uint kILWFlag_RestrictZ = 0x0002;
static
const
uint
kILWFlag_SkipBadColour
=
0x0004
;
static
const
uint
kILWFlag_SkipBadColour
=
0x0004
;
static
const
uint
kILWFlag_ColourConfidenceOnly
=
0x0008
;
static
const
uint
kILWFlag_ColourConfidenceOnly
=
0x0008
;
/**
* Wrap an int mask value used to flag individual depth pixels.
*/
class
ILWMask
{
public:
__device__
explicit
inline
ILWMask
(
int
v
)
:
v_
(
v
)
{}
#ifdef __CUDACC__
__device__
inline
ILWMask
(
const
ftl
::
cuda
::
TextureObject
<
int
>
&
m
,
int
x
,
int
y
)
:
v_
(
m
.
tex2D
(
x
,
y
))
{}
#endif
__device__
inline
operator
int
()
const
{
return
v_
;
}
__device__
inline
bool
isFilled
()
const
{
return
v_
&
kMask_Filled
;
}
__device__
inline
bool
isDiscontinuity
()
const
{
return
v_
&
kMask_Discontinuity
;
}
__device__
inline
bool
hasCorrespondence
()
const
{
return
v_
&
kMask_Correspondence
;
}
__device__
inline
bool
isBad
()
const
{
return
v_
&
kMask_Bad
;
}
__device__
inline
void
isFilled
(
bool
v
)
{
v_
=
(
v
)
?
v_
|
kMask_Filled
:
v_
&
(
~
kMask_Filled
);
}
__device__
inline
void
isDiscontinuity
(
bool
v
)
{
v_
=
(
v
)
?
v_
|
kMask_Discontinuity
:
v_
&
(
~
kMask_Discontinuity
);
}
__device__
inline
void
hasCorrespondence
(
bool
v
)
{
v_
=
(
v
)
?
v_
|
kMask_Correspondence
:
v_
&
(
~
kMask_Correspondence
);
}
__device__
inline
void
isBad
(
bool
v
)
{
v_
=
(
v
)
?
v_
|
kMask_Bad
:
v_
&
(
~
kMask_Bad
);
}
private
:
int
v_
;
static
const
int
kMask_Filled
=
0x0001
;
static
const
int
kMask_Discontinuity
=
0x0002
;
static
const
int
kMask_Correspondence
=
0x0004
;
static
const
int
kMask_Bad
=
0x0008
;
};
void
correspondence_energy_vector
(
void
correspondence_energy_vector
(
ftl
::
cuda
::
TextureObject
<
float
>
&
d1
,
ftl
::
cuda
::
TextureObject
<
float
>
&
d1
,
ftl
::
cuda
::
TextureObject
<
float
>
&
d2
,
ftl
::
cuda
::
TextureObject
<
float
>
&
d2
,
...
...
This diff is collapsed.
Click to expand it.
components/rgbd-sources/include/ftl/rgbd/channels.hpp
+
1
−
0
View file @
61d7ccdf
...
@@ -24,6 +24,7 @@ enum struct Channel : int {
...
@@ -24,6 +24,7 @@ enum struct Channel : int {
EnergyVector
,
// 32FC4
EnergyVector
,
// 32FC4
Flow
,
// 32F
Flow
,
// 32F
Energy
,
// 32F
Energy
,
// 32F
Mask
,
// 32U
LeftGray
,
LeftGray
,
RightGray
,
RightGray
,
Overlay1
Overlay1
...
...
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