Changelog
---------
    - (2.3.1)
        - Issue#38: read_mrz (and MRZPipeline) now also accept the image itself as a numpy array (e.g. an OpenCV frame
          converted to RGB, see README) or a PIL Image, image file contents as bytearray/memoryview or as an encoded uint8
          array (e.g. the output of cv2.imencode), and pathlib.Path filenames.
        - Fixed: read_mrz on a PDF without an embedded JPEG raised AttributeError instead of returning None.
          Unsupported input types now raise a TypeError instead of an AttributeError.
        - Issue#55: Fixed KeyError: 'method' in read_mrz when the best candidate's OCR text contained no '<'
          characters (e.g. all fillers misread) and the MRZ was found in the second, max_width(1000) pass.
        - Issue#59: A file opened in text mode now raises a TypeError suggesting to open it in binary mode
          (instead of an obscure error from deep inside imageio). Camera frames are supported since Issue#38.
    - (2.3.0)
        - Fixed: Loader used skimage.io.imread(..., plugin=...), whose plugin infrastructure scikit-image
          deprecated in 0.25 (FutureWarning) and removes in 0.27. Images are now read with imageio.v3 (and
          matplotlib as before for the fallback) directly, with identical results. Requires imageio >= 2.22.0.
        - Removed the use of the deprecated pkg_resources API (in evaluate_mrz and in the tests), which is
          missing from Python 3.12+ environments without setuptools.
        - Issue#64: Support for the pre-2021 French national ID card (2 x 36 characters, national layout).
          Such MRZs used to be misdetected as TD2 and parsed (and OCR-"corrected") incorrectly. They are now
          recognized by the 'IDFRA' prefix and reported with mrz_type 'FRA_ID'.
        - Issue#71, Issue#73: Replaced the abandoned pdfminer dependency with the
          maintained pdfminer.six fork. Both occupy the same import namespace and
          expose the same API, so no code changes were needed.
        - Removed a duplicate imageio entry from install_requires.
        - Fixed: BooneTransform used morphology.square(), which scikit-image
          deprecated in 0.25 (FutureWarning) and will remove entirely in 0.27,
          which would make read_mrz() raise AttributeError on any environment
          pinned to scikit-image >= 0.27. Added a small compatibility helper
          that prefers footprint_rectangle() when available and falls back to
          square() otherwise, so this keeps working across the full range of
          scikit-image versions this package claims to support (>= 0.19.0).
    - (2.2.2)
        - Issue#76: Fixes necessary to update to numpy 2.0.
    - (2.2.1)
        - Issue#67: Fixed extraction logic for "ROI" boxes.
    - (2.2.0)
        - PR#60: Update image.py with channel_axis arg.
          This bumps the required version of scikit-image up to 0.19.0.
        - PR#56: Fix wrong valid check in TD3.
    - (2.1.0)
        - PR#54: add command to only extract the candidate ROIs
          The package now provides the `extract_mrz_rois` script.
    - (2.0.0)
        - PR#50: Remove pdfminer3k, as pdfminer now supports Python 3.
          The new PDFMiner does not support Python 2 any more, however. As a consequence PassportEye now also
          requires Python3.6 or above as of this release. Hence the major version number change, otherwise
          the internals are all the same.
    - (1.4.1)
        - Issue#34: ValueError: zero-size array to reduction operation fmin which has no identity)
    - (1.4.0)
        - Issue#27: Reverted the forced use of legacy recognizer in Tesseract
        - Changed error handling in mrz and evaluate_mrz scripts.
        - Added --legacy parameter to mrz and evaluate_mrz scripts to explicitly enable legacy recognizer.
    
    - (1.3.0)
        - PR#25, Issue#24: Support reading images from stream. Added dependency on ImageIO.
        - Tesseract forced to use legacy mode by default (as it seems to work better than the LSTM one).
        - Result of `read_mrz`, when not None, now also provides access to the OCR-ed text in `mrz.aux['text']`. 
    
    - (1.2.4) PR#22: Extra command line parameters for Tesseract
    - (1.2.3) Issue #21: Added correct sklearn version requirement.
    - (1.2.2) PR#18: fixed skimage warnings
    - (1.2.1)
        - PR#12: Validate date format and validity as an additional check on top of the check digit
        - PR#15: debugging '--psm' syntax for tesseract 4
        - PR#18: fixed skimage warnings
    - (1.2.0) Pinned PyTesseract version to >= 0.2.0

    - (1.1.2) Issue #9, PR#10: Pinned PyTesseract version to 0.1.7 (newer ones are incompatible)
    - (1.1.1)
        - Minor packaging fixes
        - PR#2 (https://github.com/konstantint/PassportEye/pull/2)
        - Support for Python 3 (Issue #1)
        - Issue #8 (https://github.com/konstantint/PassportEye/issues/8)
    
    - (1.0.0) Initial version, includes:
        - Dataflow pipeline-based processing
        - ROI detection using morphological operations ("Boone transform")
        - ROI represented as a rotated box, extracted from contours via PCA.
        - OCR via Google Tesseract. OCR is attempted via several filters.
        - mrz command line tool.
        - evaluate_mrz command line tool
