enhancement for vertical textlines

This commit is contained in:
vahidrezanezhad 2025-05-15 00:45:22 +02:00
parent a9cdd56e9a
commit adee1dc55c

View file

@ -5626,8 +5626,8 @@ class Eynollah_ocr:
if angle_degrees > 15:
better_des_slope = self.get_orientation_moments(textline_coords)
img_crop = self.rotate_image_with_padding(img_crop, -abs(better_des_slope) )
mask_poly = self.rotate_image_with_padding(mask_poly, -abs(better_des_slope) )
img_crop = self.rotate_image_with_padding(img_crop, better_des_slope )
mask_poly = self.rotate_image_with_padding(mask_poly, better_des_slope )
mask_poly = mask_poly.astype('uint8')
#new bounding box