MCPcopy Create free account
hub / github.com/PaddlePaddle/PaddleOCR / _has_intersection

Method _has_intersection

ppstructure/predict_system.py:264–271  ·  view source on GitHub ↗
(self, rect1, rect2)

Source from the content-addressed store, hash-verified

262 return res
263
264 def _has_intersection(self, rect1, rect2):
265 x_min1, y_min1, x_max1, y_max1 = rect1
266 x_min2, y_min2, x_max2, y_max2 = rect2
267 if x_min1 > x_max2 or x_max1 < x_min2:
268 return False
269 if y_min1 > y_max2 or y_max1 < y_min2:
270 return False
271 return True
272
273
274def save_structure_res(res, save_folder, img_name, img_idx=0):

Callers 1

_filter_text_resMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected