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

Alternate cost

parent b952c03d
No related branches found
No related tags found
1 merge request!122Implements #183 depth ray correspondences
......@@ -92,9 +92,13 @@ __global__ void correspondence_energy_vector_kernel(
// Mix ratio of colour and distance costs
const float ccost = 1.0f - ftl::cuda::colourWeighting(colour1, colour2, params.colour_smooth);
if ((params.flags & ftl::cuda::kILWFlag_SkipBadColour) && ccost == 1.0f) continue;
cost = params.cost_ratio * (ccost) + (1.0f - params.cost_ratio) * cost;
//cost /= 2.0f;
if ((params.flags & ftl::cuda::kILWFlag_SkipBadColour) && ccost == 1.0f) continue;
// Cost eq 1: summed contributions
//cost = params.cost_ratio * (ccost) + (1.0f - params.cost_ratio) * cost;
// Cost eq 2: Multiplied
cost = ccost * cost * cost * cost;
++count;
avgcost += (params.flags & ftl::cuda::kILWFlag_ColourConfidenceOnly) ? ccost : cost;
......
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