server/src/Tracker.cpp
// Computes IOU between two bounding boxes
Computes IOU between two bounding boxes
Computes IOU between two bounding boxes
double Tracker::GetIOU(Rect_<float> bb_test, Rect_<float> bb_gt)
{
  float in = (bb_test & bb_gt).area();
  float un = bb_test.area() + bb_gt.area() - in;
  if (un < DBL_EPSILON)
    return 0;
  return (double)(in / un);
}
double Tracker :: GetIOU ( Rect_ < float > bb_test , Rect_ < float > bb_gt ) { float in = ( bb_test & bb_gt ) . area ( ) ; float un = bb_test . area ( ) + bb_gt . area ( ) - in ; if ( un < DBL_EPSILON ) return 0 ; return ( double ) ( in / un ) ; }
Computes IOU between two bounding boxes
Computes IOU between two bounding boxes