Skip to content

"min_characters_to_try" parameter does not work #4212

Open

Description

@frank-pian

Current Behavior

"min_characters_to_try" parameter does not work.

ocr-training-20240305-184120

tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 12 -c min_characters_to_try=1

Too few characters. Skipping this page
OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
Empty page!!
Too few characters. Skipping this page
OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
Empty page!!

but

tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 6
1 6
2 5
3 4

Expected Behavior

No response

Suggested Fix

No response

tesseract -v

tesseract v5.3.3.20231005
leptonica-1.83.1
libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 2.1.4) : libpng 1.6.40 : libtiff 4.6.0 : zlib 1.2.13 : libwebp 1.3.2 : libopenjp2 2.5.0
Found AVX2
Found AVX
Found FMA
Found SSE4.1
Found libarchive 3.7.2 zlib/1.3 liblzma/5.4.4 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.5
Found libcurl/8.3.0 Schannel zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.11.0

Operating System

Windows 10

Other Operating System

No response

uname -a

No response

Compiler

No response

CPU

No response

Virtualization / Containers

No response

Other Information

No response

Activity

  1. added
    OSDOrientation and Script Detection
    on Mar 14, 2024
  2. amitdo commented on Mar 14, 2024

    @amitdo
    Collaborator

    Do psm 0 and 1 work here?

  3. frank-pian commented on Mar 15, 2024

    @frank-pian
    Author

    Do psm 0 and 1 work here?

    same

    tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 0 -c min_characters_to_try=1
    Warning, detects only orientation with -l eng
    Error, OSD requires a model for the legacy engine
    tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 1 -c min_characters_to_try=1
    Too few characters. Skipping this page
    OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
    Empty page!!
    Too few characters. Skipping this page
    OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
    Empty page!!
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OSDOrientation and Script Detection

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions