Giter Site home page Giter Site logo

pythonic64 / autocrop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rajbot/autocrop

1.0 0.0 0.0 14.31 MB

This is a side project from 2008. This package contains a tool for automatically cropping and deskewing images of book pages captured by an Internet Archive Scribe bookscanner.

Home Page: http://archive.org

C 95.42% C++ 0.34% Shell 3.52% Python 0.72%

autocrop's Introduction

This package contains a tool for automatically cropping and deskewing
images of book pages captured by an Internet Archive Scribe bookscanner.

This software was written as a side project in 2008 and has not been
optimized. In its current state, it can process a single page image in
about 2 seconds on a Scribe bookscanner. Since it is too slow to run in
realtime during the scanning process, it was never deployed.
(Update: it was deployed in 2011)


autoCropFoldout.c contains code that crops to the edges of a page shot
against a black background. If you are investigating this project for
your own scanning, autoCropFoldout would probably be the best place to
start.

Example output of autoCropFoldout is available here:
http://archive.org/download/autocrop_test_data/foldout_test.zip/foldout_test%2Findex.html


autoCropScibe.c contains the autocrop code for the Scribe bookscanner.

Example output of the autocrop algorithm is available here:
http://www.archive.org/download/autocrop_test_picturesquenewen00swee/picturesquenewen00swee/index.html

processScribe.py is a wrapper that will process images after the image
capture phase is complete and will write crop and skew information into
scandata.xml (which is created by Scribe).

autoCropScribe depends on the Leptonica image processing library. This
tool has been compiled against Leptonica 1.56 and has not been tested
with more modern versions of Leptionica.
(Update: now compiled with Leptonica 1.68)


To compile autocrop scribe simply run:

$ make


To run tests, compile with `make CXXFLAGS=-DWRITE_DEBUG_IMAGES`

Here is a walkthrough for building, downloading test data, and running tests:

# install dependencies
$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev

# clone and build
$ git clone [email protected]:rajbot/autocrop.git
$ cd autocrop/
$ make CXXFLAGS=-DWRITE_DEBUG_IMAGES

# download test images and run tests
$ cd tests/
$ wget http://archive.org/download/autocrop_test_data/autocrop_test_data_images.zip
$ unzip autocrop_test_data_images.zip
$ mv autocrop_test_data_images testimg
$ wget http://archive.org/download/autocrop_test_data/testimg_foldout.zip
$ unzip testimg_foldout.zip
$ make test

autocrop's People

Contributors

rajbot avatar

Stargazers

Stephen M. Kinyanjui 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.