Commit 40bab842 authored by Davis King's avatar Davis King

Added code to avoid a potential division by zero

parent 5977b0b8
......@@ -42,6 +42,9 @@ namespace dlib
) const
{
const double inner = a.intersect(b).area();
if (inner == 0)
return false;
const double outer = (a+b).area();
if (inner/outer > match_thresh ||
inner/a.area() > overlap_thresh ||
......
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