Giter Site home page Giter Site logo

vnocr's Introduction

VNocr

OCR script for Visual Novels/general text on images

How it works (requirements/installation)

  1. xfce4-screenshooter
    screenshots a region and saves it to ~/ocr.png
    swap it to your own screenshot program if it doesn't work
  2. tesseract
    processes that image and outputs the text it finds to ~/ocr.txt
    install tesseract (I used sudo apt install tesseract-ocr on xubuntu)
    and download and put trained models for the language you need where they belong (it was /usr/share/tesseract-ocr/4.00/tessdata for me)
  3. tr
    cleans up output text from tesseract
  4. xclip
    passes text in clipboard with where it is caught by yomichan
    that opens a popup with that text where you can look up word definitions
    make sure to check "Enable native popups when copying Japanese text" in yomichan options
    (be careful when copying big texts that can contain kana/kanji in them)

Usage

  • Bind ocr_script to a hotkey
  • Press the hotkey
  • Select a region with text
  • Text extracted by OCR will be copied to clipboard

Additional links

Tesseract Docs - Improving Recognition Quality
StackOverflow - Remove background text and noise from an image using image processing with OpenCV
StackOverflow - How to remove background noise in image without damaging text?
StackOverflow - Background image cleaning for OCR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.