remove unused return_bonding_box_of_contours

pull/19/head
Konstantin Baierer 4 years ago
parent 9454a921b1
commit 823592126e

@ -37,7 +37,6 @@ from .utils.contour import (
find_new_features_of_contoures,
get_text_region_boxes_by_given_contours,
get_textregion_contours_in_org_image,
return_bonding_box_of_contours,
return_contours_of_image,
return_contours_of_interested_region,
return_contours_of_interested_region_by_min_size,

@ -3048,3 +3048,12 @@ def return_contours_of_interested_region_and_bounding_box(region_pre_p, pixel):
boxes.append([int(x), int(y), int(w), int(h)])
return contours_imgs, boxes
def return_bonding_box_of_contours(cnts):
boxes_tot = []
for i in range(len(cnts)):
x, y, w, h = cv2.boundingRect(cnts[i])
box = [x, y, w, h]
boxes_tot.append(box)
return boxes_tot

@ -216,15 +216,6 @@ def return_contours_of_interested_textline(region_pre_p, pixel):
contours_imgs = filter_contours_area_of_image_tables(thresh, contours_imgs, hiearchy, max_area=1, min_area=0.000000003)
return contours_imgs
def return_bonding_box_of_contours(cnts):
boxes_tot = []
for i in range(len(cnts)):
x, y, w, h = cv2.boundingRect(cnts[i])
box = [x, y, w, h]
boxes_tot.append(box)
return boxes_tot
def return_contours_of_image(image):
if len(image.shape) == 2:

Loading…
Cancel
Save