Browse Source

Properly fix inf/inf issue in MCC

Properly fix https://github.com/opencv/opencv_contrib/issues/3316

Without this fix, we could end up with 4 corners, which might seem
valid, while some of those are (0,0).
pull/3939/head
Vincent Rabaud 2 months ago
parent
commit
68c8cf83b7
  1. 2
      modules/mcc/src/bound_min.cpp

2
modules/mcc/src/bound_min.cpp

@ -167,7 +167,7 @@ void CBoundMin::calculate() @@ -167,7 +167,7 @@ void CBoundMin::calculate()
j = (i + 1) % 4;
Vcart = lines[i].cross(lines[j]);
if (fabs(Vcart.z) <= 1e-6){
continue;
return;
}
Vhom.x = Vcart.x / Vcart.z;
Vhom.y = Vcart.y / Vcart.z;

Loading…
Cancel
Save