Skip to content

Latest commit

 

History

History
51 lines (46 loc) · 992 Bytes

README.md

File metadata and controls

51 lines (46 loc) · 992 Bytes

column-detect

Simple approach to column detection in (book) pages

Setup

  1. Clone the repository.
  2. Install python3.
  3. Install dependencies. (Using virtualenv is recommended.)
$ virtualenv -p python3 env
$ . env/bin/activate
(env) $ pip install -r requirements.txt

Invocation

Running

(env) $ python column_detect.py --help

gives an overview on mandatory and optional parameters.

Running

(env) $ python column_detect.py -o test.json -O json test/test.bin.png

should create a file test.json which contains a list of corrdinates representing the detected column areas.

{
    "test.bin.png": [
        {
            "l": 0,
            "t": 0,
            "r": 1255,
            "b": 4274
        },
        {
            "l": 1225,
            "t": 0,
            "r": 2280,
            "b": 4274
        },
        {
            "l": 2251,
            "t": 0,
            "r": 3365,
            "b": 4274
        }
    ]
}