mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
fix wrong union calculation in box_overlap_testing.h (#2735)
Co-authored-by: Moosbauer, Sebastian <sebastian.moosbauer@posteo.de>
This commit is contained in:
parent
eb5de0d534
commit
ddad576d3e
@ -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;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user