refactoring

This commit is contained in:
Matthias Bisping 2022-02-06 14:45:53 +01:00
parent e8863d67aa
commit 9d30009dce
3 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@ from vidocp.utils import (
draw_rectangles,
remove_included,
remove_primary_text_regions,
__detect_large_coherent_structures,
detect_large_coherent_structures,
is_large_enough,
has_acceptable_format,
)
@ -22,7 +22,7 @@ def detect_figures(image: np.array):
image = image.copy()
image = remove_primary_text_regions(image)
cnts = __detect_large_coherent_structures(image)
cnts = detect_large_coherent_structures(image)
cnts = filter(is_likely_figure, cnts)
rects = map(cv2.boundingRect, cnts)

1
vidocp/utils/__init__.py Normal file
View File

@ -0,0 +1 @@
from .utils import *

View File

@ -200,7 +200,7 @@ def remove_primary_text_regions(image):
return image
def __detect_large_coherent_structures(image: np.array):
def detect_large_coherent_structures(image: np.array):
"""Detects large coherent structures on an image.
References: