Skip to content
Snippets Groups Projects
Commit c160edaf authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Merge branch 'feature/263/scaling' into 'master'

Implements #263 reconstruction scaling

Closes #263

See merge request nicolas.pope/ftl!190
parents e67f83f1 1f61b527
No related branches found
No related tags found
1 merge request!190Implements #263 reconstruction scaling
Pipeline #16918 passed
......@@ -107,5 +107,6 @@ void Reconstruction::render(ftl::rgbd::VirtualSource *vs, ftl::rgbd::Frame &out)
// transform.setIdentity();
//}
renderer_->render(vs, out, transform);
Eigen::Affine3d sm = Eigen::Affine3d(Eigen::Scaling(double(value("scale", 1.0f))));
renderer_->render(vs, out, sm.matrix() * transform);
}
\ No newline at end of file
......@@ -42,6 +42,8 @@ class Triangular : public ftl::render::Renderer {
ftl::render::SplatParams params_;
cudaStream_t stream_;
float3 light_pos_;
Eigen::Matrix4d transform_;
float scale_;
cv::cuda::GpuMat env_image_;
ftl::cuda::TextureObject<uchar4> env_tex_;
......
......@@ -228,8 +228,8 @@ void Triangular::__reprojectChannel(ftl::rgbd::Frame &output, ftl::codecs::Chann
cv::cuda::cvtColor(tmp,col, cv::COLOR_BGR2BGRA);
}
auto transform = MatrixConversion::toCUDA(t.cast<float>().inverse() * s->getPose().cast<float>().inverse()) * params_.m_viewMatrixInverse;
auto transformR = MatrixConversion::toCUDA(t.cast<float>().inverse() * s->getPose().cast<float>().inverse()).getFloat3x3();
auto transform = MatrixConversion::toCUDA(s->getPose().cast<float>().inverse() * t.cast<float>().inverse()) * params_.m_viewMatrixInverse;
auto transformR = MatrixConversion::toCUDA(s->getPose().cast<float>().inverse()).getFloat3x3();
if (mesh_) {
ftl::cuda::reproject(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment