Skip to content
/ crass Public
forked from UB-Mannheim/crass

Crop And Splice Segments (of scanned pages)

License

Notifications You must be signed in to change notification settings

AAoritz/crass

 
 

Repository files navigation

crass logo
crop and splice segments

Build Status Python 2.7 license

Overview

crass is a command line driven post-processing tool for scanned sheets of paper. The main purpose is to crop segments based on separator lines and splice them afterwards together in the reading order.

example-workflow

It is part of the Aktienführer-Datenarchiv work process, but can also be used independently.

Building instructions

Dependencies can be installed into a Python Virtual Environment:

$ virtualenv crass_venv/  
$ source crass_venv/bin/activate  
$ pip install -r requirements.txt  
$ python setup.py install  

An alternative method using Conda is also possible:

$ conda create -n crass_env python=2.7  
$ source activate crass_env  
$ conda install --file requirements.txt 
$ python setup.py install  

The third alternative is to use the Dockerfile:

$ docker build -t crass-app .
$ docker run -it --rm -v "$PWD":/usr/src/app crass-app bash

Running

Here is an example for a page:

# perform deskewing, crop and splice of a page
$ python ./crass.py "./test/testimg.jpg" "jpg" 

# perform deskewing, crop and splice of a page 
# the horziontal line is in the bottom area and is bound to the footer
$ python ./crass.py "./test/testimg_bottom_skew.jpg" "jpg" --horlinepos 2 --horlinetype 1

The resulting files will be saved in the out/ subdirectory (relative to the image file(s)) in several subsubdirectories.

Further Information

You can find more information on the basic concepts and the image processing in the available documentation.

Copyright and License

Copyright (c) 2017 Universitätsbibliothek Mannheim

Author: Jan Kamlah

crass is Free Software. You may use it under the terms of the Apache 2.0 License. See LICENSE for details.

About

Crop And Splice Segments (of scanned pages)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Dockerfile 1.0%