React Native OCR - v0.11.0
    Preparing search index...

    Function createOcr

    • Creates the OCR runner for a detect and recognize model (EasyOCR or PaddleOCR), optionally composed with a layout detector and the document helpers. Each run goes orientation → dewarp → (layout ? per-region : whole-page) OCR → reading-ordered blocks, with table regions filling their recognized structure: the text quads are detected, every one is read and they are returned in reading order, both flat and as blocks (one 'ungrouped' block for whole-page OCR, or one block per layout region, each read on its own crop).

      Type Parameters

      • L = never

        The layout region class-label type.

      Parameters

      • config: OcrModel<L>

        Model path and OCR options, plus the optional layout model and document helpers.

      • Optionalruntime: WorkletRuntime

        Optional worklet runtime to load and run the models on.

      Returns Promise<Ocr<L>>

      A promise resolving to recognition and disposal controls.

      With code LOAD_FAILED if a model cannot be loaded, and SCHEMA_MISMATCH if the OCR model's detect/recognize methods match none of the pipeline's spec variants, declare a width-to-timestep relation the pipeline cannot satisfy, or disagree with the charset size, if the layout model matches no object-detector variant, or if the helper model lacks a method the config enables.