19 FRect r1(40,30, 130,90 );
20 FRect r2(160,45, 210,150 );
25 for(
int i=0; i<n; i++ )
30 r1.draw( imga, color_green );
31 r2.draw( imga, color_green );
33 #if 0 // either way is the same 34 auto a = r1.intersectArea(r2);
41 imga.drawText(
"IoU=" + std::to_string(
IoU(r1,r2) ),
Point2d (20,20) );
48 std::ostringstream ossa;
49 ossa <<
"showcase2a_" << std::setfill(
'0') << std::setw(2) <<i <<
".svg";
50 imga.write( ossa.str() );
53 r1.translate( mul*20,0);
HOMOG2D_INUMTYPE IoU(const FRect_< FPT1 > &r1, const FRect_< FPT2 > &r2)
Intersection area over Union area (free function)
Definition: homog2d.hpp:9856
auto im_w
Definition: showcase19.cpp:14
Draw parameters, independent of back-end library.
Definition: homog2d.hpp:514
auto im_h
Definition: showcase19.cpp:13
A Flat Rectangle, modeled by its two opposite points.
Definition: homog2d.hpp:379
Opaque data structure, will hold the image type, depending on back-end library. This type is the one ...
Definition: homog2d.hpp:712
FRect_< HOMOG2D_INUMTYPE > getBB(const T &t)
Return Bounding Box of primitive or container holding primitives (free function)
Definition: homog2d.hpp:10312
DrawParams & setColor(uint8_t r, uint8_t g, uint8_t b)
Definition: homog2d.hpp:605
DrawParams color_red
Definition: showcase1.cpp:11
Base class, will be instanciated as Point2d_ or Line2d_.
Definition: homog2d.hpp:365