return_boxes_of_images_by_order_of_reading_new: fix 4abc2ff5

(forgot to also flip `regions_with_separators` if right2left)
This commit is contained in:
Robert Sachunsky 2025-11-28 17:53:27 +01:00
parent a527d7a10d
commit b71bb80e3a

View file

@ -1508,7 +1508,7 @@ def return_boxes_of_images_by_order_of_reading_new(
* splitter_y_new: the y coordinates separating the parts * splitter_y_new: the y coordinates separating the parts
* regions_without_separators: (text) region mask with separators suppressed; * regions_without_separators: (text) region mask with separators suppressed;
(needed to find per-part columns and to combine separators if possible) (needed to find per-part columns and to combine separators if possible)
* regions_with_separators: (full) region map with separators suppressed; * regions_with_separators: (full) region map with separators included;
(needed to elongate separators if possible) (needed to elongate separators if possible)
* matrix_of_seps: type and coordinates of horizontal and vertical separators, * matrix_of_seps: type and coordinates of horizontal and vertical separators,
as well as headings as well as headings
@ -1525,6 +1525,7 @@ def return_boxes_of_images_by_order_of_reading_new(
if right2left_readingorder: if right2left_readingorder:
regions_without_separators = cv2.flip(regions_without_separators,1) regions_without_separators = cv2.flip(regions_without_separators,1)
regions_with_separators = cv2.flip(regions_with_separators,1)
if logger is None: if logger is None:
logger = getLogger(__package__) logger = getLogger(__package__)
logger.debug('enter return_boxes_of_images_by_order_of_reading_new') logger.debug('enter return_boxes_of_images_by_order_of_reading_new')