mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-10 04:39:54 +02:00
remove unused return_bonding_box_of_contours
This commit is contained in:
parent
9454a921b1
commit
823592126e
3 changed files with 9 additions and 10 deletions
|
@ -37,7 +37,6 @@ from .utils.contour import (
|
||||||
find_new_features_of_contoures,
|
find_new_features_of_contoures,
|
||||||
get_text_region_boxes_by_given_contours,
|
get_text_region_boxes_by_given_contours,
|
||||||
get_textregion_contours_in_org_image,
|
get_textregion_contours_in_org_image,
|
||||||
return_bonding_box_of_contours,
|
|
||||||
return_contours_of_image,
|
return_contours_of_image,
|
||||||
return_contours_of_interested_region,
|
return_contours_of_interested_region,
|
||||||
return_contours_of_interested_region_by_min_size,
|
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)])
|
boxes.append([int(x), int(y), int(w), int(h)])
|
||||||
return contours_imgs, boxes
|
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)
|
contours_imgs = filter_contours_area_of_image_tables(thresh, contours_imgs, hiearchy, max_area=1, min_area=0.000000003)
|
||||||
return contours_imgs
|
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):
|
def return_contours_of_image(image):
|
||||||
|
|
||||||
if len(image.shape) == 2:
|
if len(image.shape) == 2:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue