| 14 | { |
| 15 | |
| 16 | Box2f findContoursBBox( const Contours2f& conts ) |
| 17 | { |
| 18 | MR_TIMER; |
| 19 | tbb::enumerable_thread_specific<Box2f> tls; |
| 20 | ParallelFor( conts, [&] ( size_t i ) |
| 21 | { |
| 22 | ParallelFor( conts[i], [&] ( size_t j ) |
| 23 | { |
| 24 | tls.local().include( conts[i][j] ); |
| 25 | } ); |
| 26 | } ); |
| 27 | Box2f bbox; |
| 28 | for ( const auto& tlsBox : tls ) |
| 29 | bbox.include( tlsBox ); |
| 30 | return bbox; |
| 31 | } |
| 32 | |
| 33 | void scaleContours( Contours2f& conts, float scale ) |
| 34 | { |
no test coverage detected