Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented text recognition (ocr) #272

Merged
merged 29 commits into from
Jun 16, 2024
Merged

implemented text recognition (ocr) #272

merged 29 commits into from
Jun 16, 2024

Commits on Jan 17, 2024

  1. implemented text recognition (ocr)

    I implemented another comparison method based on OCR.
    
    This could be a useful addition in cases where modern game rendering
    and visual effects (clutter) cause difficulties to find good comparison
    images.
    
    It currently depends on pytesseract and Tesseract-OCR but tests
    with EasyOCR have also been conducted. Both seem to get similar good
    recognition results. EasyOCR looks like to cause higher CPU load then
    tesseract. Tesseract on the other hand is an external dependency that
    needs to be installed seperatly.
    
    The text comparison of the expected and recognized string has two modes.
    A perfect 1:1 match or the levenshtein ratio.
    
    I also introduced two new file config options:
    
    * Rectangle position (only used for text files)
    * FPS limit per text or image file
    
    Please let me know what you think of this feature.
    ston1th committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    efe7f73 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a00dd41 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ead3463 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d36e2d4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c9766bf View commit details
    Browse the repository at this point in the history
  6. use pathlib to read file

    ston1th committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    8998360 View commit details
    Browse the repository at this point in the history
  7. fix str None comparison

    ston1th committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    f25fc7e View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2024

  1. rewrite some stuff

    * rewrite text files to contain the rectangle position
    * switch to easyocr since there was no way to use pytesseract or
      tesserocr reliably without PIL
    * display text that is searched for
    * set default FPS limit for OCR to 1
    * minor fixes
    ston1th committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    2f8d298 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fddd0ae View commit details
    Browse the repository at this point in the history
  3. switch back to tesseract

    * switch back to tesseract
    * ditch all python binding libraries to not include Pillow
    * call tesseract ourselfs
    ston1th committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    cd2c212 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    80140cb View commit details
    Browse the repository at this point in the history
  5. Merge branch 'dev' into ocr

    Avasam authored Feb 3, 2024
    Configuration menu
    Copy the full SHA
    450b983 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2024

  1. internal logic changes

    * moved some code around
    * implemented fps_limit getter
    * switch to PATH variable use
    * minor fixes
    ston1th committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    feeb58e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb8ed6f View commit details
    Browse the repository at this point in the history
  3. import subprocess globally

    ston1th committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    da830c6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5674088 View commit details
    Browse the repository at this point in the history
  5. make linter happy

    ston1th committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    b5f6639 View commit details
    Browse the repository at this point in the history
  6. fixed typo in docstring

    ston1th committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    f1ba410 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2024

  1. input validation and comparison methods

    * added input validation for OCR text file settings
    * added different OCR comparison methods
    * fixed the requested changes
    ston1th committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    d1dfff0 View commit details
    Browse the repository at this point in the history
  2. fix linter

    ston1th committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    f3c0e3e View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Configuration menu
    Copy the full SHA
    3a3015f View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2024

  1. improvements to coordinates and matching methods

    this commit improves the handling of the rectangle coordinates.
    the new scheme uses the top_left and bottom_right (X/Y) coordinates.
    
    the migration from the old scheme works as follows:
    
    ```
    top_left = [<top_left>, <bottom_left>]
    bottom_right = [<top_right>, <bottom_right>]
    
    old:
    top_left = 275
    top_right = 540
    bottom_left = 70
    bottom_right = 95
    
    new:
    top_left = [275, 70]
    bottom_right = [540, 95]
    ```
    
    you can now specify multiple matching methods and look for the best
    `text : method` match:
    
    ```
    old:
    method = 0
    
    new:
    methods = [0]
    or:
    methods = [2, 1, 0]
    ```
    ston1th committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    75cd0e9 View commit details
    Browse the repository at this point in the history
  2. fix ruff linter

    ston1th committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    7be9a0e View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2024

  1. Configuration menu
    Copy the full SHA
    043b6b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c0b2920 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'dev' into ocr

    Avasam authored Jun 15, 2024
    Configuration menu
    Copy the full SHA
    f2b407a View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2024

  1. Configuration menu
    Copy the full SHA
    9cd0c2b View commit details
    Browse the repository at this point in the history
  2. More explicit platform check

    Avasam committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    2f03a90 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    797492f View commit details
    Browse the repository at this point in the history