Git Product home page Git Product logo

blitzdrt's Introduction

blitzDrt

Tool to correct perspective distortion

  • Does not correct verticals (column separators, table lines) yet.
  • Uses Blitz++ and ImageMagick++ library.
  • "drt" comes from "discrete radon transformation", the intermediate result when rotating the image by -x° to x° to find optimal deskewing angle for top and bottom of the page.

Installation

Requires ImageMagick++, libfft3, blitz and boost_program_options.

ImageMagick++, libfftw3 and boost_program_options can be installed with make deps-ubuntu.

If blitz is not available in your distro, you can build from source with make install-blitz (might require make install-cmake first for an up-to-date CMake).

Run make install to build and install the tool, it will be available as productiveDrt in your $PATH.

Uninstall with make uninstall

Usage

Example: ./productiveDrt --if input.png --of output.png --doTrans

Help: ./productiveDrt --help

Tries to detect if text is on page - to prevent deskewing of e. g. architectural plans or hatchings.

Warning: output files are not suitable for archival. Metadata could be lost (imagemagick).

blitzdrt's People

Contributors

jbarth-ubhd avatar kba avatar

Stargazers

Wikinaut avatar Robert Sachunsky avatar Kyle King avatar JKamlah avatar Johannes Künsebeck avatar Lucas Sulzbach avatar  avatar

Watchers

Johannes Künsebeck avatar  avatar

Forkers

kba kylekyle

blitzdrt's Issues

build error CMake Error: The source directory "/usr/local/src/blitzDrt/repo/blitz" does not appear to contain CMakeLists.txt.

/usr/local/src/blitzDrt$ make install-blitz
git submodule update
cd repo/blitz && \
mkdir -p build && \
cd build && \
cmake .. && \
make lib && \
sudo make install
CMake Error: The source directory "/usr/local/src/blitzDrt/repo/blitz" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** [Makefile:58: install-blitz] Fehler 1

build error (make install)

make install
./c2macro.pl blitzDrt.c++ > sourcecode.h
g++ -o productiveDrt \
	-O3 \
	-march=native -mtune=native \
	blitzDrt.c++ \
	-Wall -Wextra \
	-lfftw3 \
	-lboost_program_options \
	`pkg-config --cflags --libs blitz` \
	`pkg-config --cflags --libs fftw3` \
	`pkg-config --cflags --libs Magick++`
blitzDrt.c++:7:2: warning: #warning ohne BZ_DEBUG [-Wcpp]
    7 | #warning ohne BZ_DEBUG
      |  ^~~~~~~
In file included from blitzDrt.c++:31:
fm3.h:13:2: warning: #warning setting fm3_maxlines to default [-Wcpp]
   13 | #warning setting fm3_maxlines to default
      |  ^~~~~~~
fm3.h:18:2: warning: #warning setting fm3_stream to default [-Wcpp]
   18 | #warning setting fm3_stream to default
      |  ^~~~~~~
fm3.h:23:2: warning: #warning setting fm3_errcode to default [-Wcpp]
   23 | #warning setting fm3_errcode to default
      |  ^~~~~~~
g++: fatal error: Getötet signal terminated program cc1plus
compilation terminated.
make: *** [Makefile:75: productiveDrt] Fehler 1

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.