12 float calcIoU( cv::Rect
const &
src, cv::Rect
const &
dst )
14 cv::Rect
i = src &
dst;
15 cv::Rect u = src |
dst;
17 return static_cast<float>(i.area()) / static_cast<float>(u.area());
28 cv::Rect
const & depth_location,
32 : _location( location )
33 , _depth_location( depth_location )
34 , _intensity( intensity )
51 for(
auto &&
f : objects )
53 float iou = calcIoU( rect,
f->get_location() );
detected_object(size_t id, std::string const &label, cv::Rect const &location, cv::Rect const &depth_location=cv::Rect{}, float intensity=1, float depth=0)
std::list< detected_object::ptr > detected_objects
GLint GLint GLsizei GLsizei GLsizei depth
GLsizei const GLchar *const * string
GLuint GLsizei const GLchar * label
detected_object::ptr find_object(cv::Rect rect, detected_objects const &objects)
std::shared_ptr< detected_object > ptr