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

Colour confidence

parent 8a5fe815
No related branches found
No related tags found
1 merge request!122Implements #183 depth ray correspondences
......@@ -141,6 +141,8 @@ __global__ void correspondence_energy_vector_kernel(
float bestdepth = 0.0f;
float bestweight = 0.0f;
float bestcolour = 0.0f;
float totalcolour = 0.0f;
int count = 0;
float contrib = 0.0f;
......@@ -176,14 +178,16 @@ __global__ void correspondence_energy_vector_kernel(
++count;
contrib += weight;
bestcolour = max(cweight, bestcolour);
totalcolour += cweight;
if (weight > bestweight) {
bestweight = weight;
bestdepth = depth_adjust;
}
}
const float avgweight = contrib/(float)count;
const float confidence = bestweight - avgweight;
const float avgcolour = totalcolour/(float)count;
const float confidence = bestcolour - avgcolour;
if (bestweight > 0.0f) {
float old = conf.tex2D(x,y);
......
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