MCPcopy Create free account
hub / github.com/davisking/dlib / bounding_box_of_rects

Function bounding_box_of_rects

dlib/image_processing/scan_image.h:24–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 {
23
24 inline rectangle bounding_box_of_rects (
25 const std::vector<std::pair<unsigned int, rectangle> >& rects,
26 const point& position
27 )
28 /*!
29 ensures
30 - returns the smallest rectangle that contains all the
31 rectangles in rects. That is, returns the rectangle that
32 contains translate_rect(rects[i].second,position) for all valid i.
33 !*/
34 {
35 rectangle rect;
36
37 for (unsigned long i = 0; i < rects.size(); ++i)
38 {
39 rect += translate_rect(rects[i].second,position);
40 }
41
42 return rect;
43 }
44 }
45
46// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

translate_rectFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected