1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-18 17:24:28 +08:00

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).
This commit is contained in:
Vincent Rabaud
2025-05-20 23:06:22 +02:00
parent eebd8977e1
commit 68c8cf83b7

View File

@@ -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;