MCPcopy Create free account
hub / github.com/creatale/node-dv / intersection

Method intersection

deps/tesseract/ccstruct/rect.cpp:87–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 **********************************************************************/
86
87TBOX TBOX::intersection( //shared area box
88 const TBOX &box) const {
89 inT16 left;
90 inT16 bottom;
91 inT16 right;
92 inT16 top;
93 if (overlap (box)) {
94 if (box.bot_left.x () > bot_left.x ())
95 left = box.bot_left.x ();
96 else
97 left = bot_left.x ();
98
99 if (box.top_right.x () < top_right.x ())
100 right = box.top_right.x ();
101 else
102 right = top_right.x ();
103
104 if (box.bot_left.y () > bot_left.y ())
105 bottom = box.bot_left.y ();
106 else
107 bottom = bot_left.y ();
108
109 if (box.top_right.y () < top_right.y ())
110 top = box.top_right.y ();
111 else
112 top = top_right.y ();
113 }
114 else {
115 left = MAX_INT16;
116 bottom = MAX_INT16;
117 top = -MAX_INT16;
118 right = -MAX_INT16;
119 }
120 return TBOX (left, bottom, right, top);
121}
122
123
124/**********************************************************************

Callers 11

overlap_fractionMethod · 0.95
BoxMissMetricFunction · 0.45
GetTableRegionsMethod · 0.45
WriteToPixMethod · 0.45
DivideImageIntoPartsFunction · 0.45
IntersectAreaFunction · 0.45
IncreaseInOverlapFunction · 0.45
ComputeTotalOverlapMethod · 0.45
extract_resultFunction · 0.45
ClipToOriginalWordMethod · 0.45

Calls 3

TBOXClass · 0.70
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected