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
!151
Implements
#216
triangle renderer
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Implements
#216
triangle renderer
feature/216/triangles
into
master
Overview
0
Commits
26
Pipelines
2
Changes
3
Merged
Nicolas Pope
requested to merge
feature/216/triangles
into
master
5 years ago
Overview
0
Commits
26
Pipelines
2
Changes
3
Expand
0
0
Merge request reports
Viewing commit
297f0c06
Prev
Next
Show latest version
3 files
+
137
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
297f0c06
Allow for point cloud mode
· 297f0c06
Nicolas Pope
authored
5 years ago
components/renderers/cpp/include/ftl/render/tri_render.hpp
0 → 100644
+
55
−
0
Options
#ifndef _FTL_RECONSTRUCTION_TRI_HPP_
#define _FTL_RECONSTRUCTION_TRI_HPP_
#include
<ftl/render/renderer.hpp>
#include
<ftl/rgbd/frameset.hpp>
#include
<ftl/render/splat_params.hpp>
#include
<ftl/cuda/points.hpp>
namespace
ftl
{
namespace
render
{
/**
* Generate triangles between connected points and render those. Colour is done
* by weighted reprojection to the original source images.
*/
class
Triangular
:
public
ftl
::
render
::
Renderer
{
public:
explicit
Triangular
(
nlohmann
::
json
&
config
,
ftl
::
rgbd
::
FrameSet
*
fs
);
~
Triangular
();
bool
render
(
ftl
::
rgbd
::
VirtualSource
*
src
,
ftl
::
rgbd
::
Frame
&
out
)
override
;
//void setOutputDevice(int);
protected:
void
_renderChannel
(
ftl
::
rgbd
::
Frame
&
out
,
ftl
::
codecs
::
Channel
channel_in
,
ftl
::
codecs
::
Channel
channel_out
,
cudaStream_t
stream
);
private:
int
device_
;
ftl
::
rgbd
::
Frame
temp_
;
ftl
::
rgbd
::
Frame
accum_
;
ftl
::
rgbd
::
FrameSet
*
scene_
;
ftl
::
cuda
::
ClipSpace
clip_
;
bool
clipping_
;
float
norm_filter_
;
bool
backcull_
;
cv
::
Scalar
background_
;
bool
mesh_
;
float3
light_dir_
;
uchar4
light_diffuse_
;
uchar4
light_ambient_
;
ftl
::
render
::
SplatParams
params_
;
cudaStream_t
stream_
;
float3
light_pos_
;
template
<
typename
T
>
void
__reprojectChannel
(
ftl
::
rgbd
::
Frame
&
,
ftl
::
codecs
::
Channel
in
,
ftl
::
codecs
::
Channel
out
,
cudaStream_t
);
void
_reprojectChannel
(
ftl
::
rgbd
::
Frame
&
,
ftl
::
codecs
::
Channel
in
,
ftl
::
codecs
::
Channel
out
,
cudaStream_t
);
void
_dibr
(
cudaStream_t
);
void
_mesh
(
cudaStream_t
);
};
}
}
#endif // _FTL_RECONSTRUCTION_TRI_HPP_
Loading