Giter Site home page Giter Site logo

subdetection's Introduction

subdetection

Subtitle detection library based on Tesseract-OCR and Qt5.

Version used:

  • tesseract-ocr v3.02.02
  • Qt 5.1

You can check out my tutorials if you have no clue how to compile Tesseract on Windows:

http://broija.blogspot.fr/2014/10/build-tesseract-ocr-30202-with-qt-51.html

http://broija.blogspot.fr/2014/10/compile-tesseract-ocr-30202-with-mingw.html

Description

This library contains several classes, structures and functions to help detect subtitles in images.

All the parameters are tuned in the Parameters structure. You can also use a ParameterManager to save or load these parameters in a file or use the signal/slot mechanism.

The Detector class is the one to use for text detection.

Parameters

  • hsvMin and hsvMax are set to define the color range in which the subtitles are printed.
  • zone defines the zone were the subtitles will appear.
  • charMaxSize helps the detector guess what could be a character and what is too big to be one.
  • thresh is used in the contour detection process.
  • xTolerance is the maximum spacing between two characters along X axis.
  • yTolerance is the maximum spacing between characters on a line along Y axis.
  • matchRatio represents the similariy of the "cleaned" text zones between consecutively loaded images. The closer from 0, the more similar.

Instructions

Text detection


Detector usage is quite straightforward:

  • Pass it the desired parameters using one of its constructors or calling setParameters.
  • Then simply call detect.

If text has been detected, you'll find it in the QStringList passed as parameter.

Language files


Tesseract language files can be used by putting them in a tessdata directory.

Then, instantiate a Detector and pass it tessdata parent directory path and the three characters refering to your language files.

You can download language files here:

https://code.google.com/p/tesseract-ocr/downloads/list

Tests

Application


A test project is available in test/app/ directory.

Unit tests


Available in test/unit_tests/ directory.

subdetection's People

Contributors

broija avatar

Watchers

 avatar

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.