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

Clamp reg indication colours

parent 12363ff0
No related branches found
No related tags found
1 merge request!57Resolves #40 by colouring registration errors
Pipeline #11947 passed
...@@ -241,11 +241,11 @@ __global__ void integrateRegistrationKernel(HashData hashData, HashParams hashPa ...@@ -241,11 +241,11 @@ __global__ void integrateRegistrationKernel(HashData hashData, HashParams hashPa
const Voxel &v1 = curr; const Voxel &v1 = curr;
const Voxel &v0 = hashData.d_SDFBlocks[idx]; const Voxel &v0 = hashData.d_SDFBlocks[idx];
float redshift = (v0.weight > 0) ? 1.0f - ((v1.sdf - v0.sdf) / hashParams.m_truncation) : 1.0f; float redshift = (v0.weight > 0) ? 1.0f - ((v1.sdf - v0.sdf) / hashParams.m_truncation)*0.5f : 1.0f;
out.color.x = v1.color.x*redshift; out.color.x = min(max(v1.color.x*redshift,0.0f),255.0f);
out.color.y = v1.color.y*redshift; out.color.y = min(max(v1.color.y*redshift,0.0f),255.0f);
out.color.z = v1.color.z; //*(1.0f / redshift); out.color.z = min(max(v1.color.z*(1.0f / redshift),0.0f),255.0f);
out.sdf = (v0.sdf * (float)v0.weight + v1.sdf * (float)v1.weight) / ((float)v0.weight + (float)v1.weight); out.sdf = (v0.sdf * (float)v0.weight + v1.sdf * (float)v1.weight) / ((float)v0.weight + (float)v1.weight);
out.weight = min(c_hashParams.m_integrationWeightMax, (unsigned int)v0.weight + (unsigned int)v1.weight); out.weight = min(c_hashParams.m_integrationWeightMax, (unsigned int)v0.weight + (unsigned int)v1.weight);
......
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