Commit ef431f70 authored by marina.kolpakova's avatar marina.kolpakova

fix buggy threshold zeroing if feature has zero area

parent 0424e2c8
......@@ -103,7 +103,7 @@ namespace icf {
float sarea = (scaledRect.z - scaledRect.x) * (scaledRect.w - scaledRect.y);
const float expected_new_area = farea * relScale * relScale;
float approx = __fdividef(sarea, expected_new_area);
float approx = (sarea == 0)? 1: __fdividef(sarea, expected_new_area);
float rootThreshold = (node.threshold & 0x0FFFFFFFU) * approx * level.scaling[(node.threshold >> 28) > 6];
......@@ -226,7 +226,7 @@ namespace icf {
dprintf("%d: impact scaned %f\n" ,threadIdx.x, impact);
confidence += impact;
if(__any((confidence <= stages[(st + threadIdx.x)]))) st += stEnd;
if(__any((confidence <= stages[(st + threadIdx.x)]))) st += 2048;
}
if(st == stEnd && !threadIdx.x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment