fix wrong union calculation in box_overlap_testing.h (#2735)

Co-authored-by: Moosbauer, Sebastian <sebastian.moosbauer@posteo.de>
This commit is contained in:
smoosbau 2023-03-02 01:08:26 +01:00 committed by GitHub
parent eb5de0d534
commit ddad576d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,8 @@ namespace dlib
const double inner = a.intersect(b).area();
if (inner == 0)
return 0;
const double outer = (a+b).area();
return inner/outer;
const double outer = a.area() + b.area() - inner;
return inner / outer;
}
// ----------------------------------------------------------------------------------------