dawsonia.image_preproc#
Module Contents#
Classes#
Functions#
rotate the image if necessary to align with the horizontal Parameters |
Data#
API#
- dawsonia.image_preproc.logger#
‘getLogger(…)’
- class dawsonia.image_preproc.Preprocessor#
-
- static _mask_x(size) numpy.typing.NDArray[numpy.uint8]#
- static _mask_y(size) numpy.typing.NDArray[numpy.uint8]#
- preprocess(size_tables: tuple[tuple[int, int], ...], preproc_cfg: dawsonia.typing.PreprocConfig, middle: int | None, image: numpy.typing.NDArray[numpy.int16]) tuple[numpy.typing.NDArray[numpy.uint8], dawsonia.typing.TablePositions, dawsonia.typing.TableSizes]#
Preprocess image and perform table detection
- compute_ligne_filter(image_filter, mask_size=36)#
Get lines of the table
- compute_image_final(image_filter, ligne_filter)#
Final image adjustment
- dawsonia.image_preproc.corr_rotate(image: numpy.typing.NDArray, middle: int | None = None) numpy.typing.NDArray[numpy.float32]#
rotate the image if necessary to align with the horizontal Parameters
image : array 2D grey image of a page Returns
im : array 2D (bigger) image but alligned and with more white margins on the sides and in the middle