Module preprocess

Module preprocess 

Source
Expand description

Image preprocessing module for OCR pipeline

This module provides comprehensive image preprocessing capabilities including:

  • Image transformations (grayscale, blur, sharpen, threshold)
  • Rotation detection and correction
  • Skew correction (deskewing)
  • Image enhancement (CLAHE, normalization)
  • Text region segmentation
  • Complete preprocessing pipeline with parallel processing

Modules§

deskew
Skew detection and correction using Hough transform
enhancement
Image enhancement functions for improving OCR accuracy
pipeline
Complete preprocessing pipeline with builder pattern and parallel processing
rotation
Rotation detection and correction using projection profiles
segmentation
Text region detection and segmentation
transforms
Image transformation functions for preprocessing

Structs§

PreprocessOptions
Preprocessing options for configuring the pipeline
TextRegion
Detected text region with bounding box

Enums§

PreprocessError
Preprocessing error types
RegionType
Type of text region

Functions§

detect_text_regions
Detect text regions in an image
preprocess
Main preprocessing function with configurable options

Type Aliases§

Result
Result type for preprocessing operations