Git Product home page Git Product logo

mfbpdf's Introduction

MFBpdf

MFBpdf is a simple project for easy converting PNM to (MASK+FG+BG)-pdf. It uses libtiff and libjpeg for all technichal work and compression. The breakdown of the image into components is done using DjVuL and DjVuL wiki.

See MFBpdf demo.

Install

install library

build

Type:

$ make

Usage

mfbpdf [options] input.ppm output.tif output.pdf

where options are:

 -a #      anisotropic regulator DjVuL {0.0}
 -b #      BG and FG downsample {3}
 -c #      contrast regulator DjVuL {0.0}
 -d #      DPI pdf and tiff {300}
 -f #      FG more downsample {2}
 -l #      level DjVuL (0 - auto) {0}
 -o #      overlay blocks DjVuL {0.5}
 -q #      jpeg quality {75}
 -r        rewrite tiff
 -s #      sensitivity for sauvola and blur {0.2}
 -t #      threshold: djvul, bimod, sauvola, blur, edgeplus {djvul}
 -x #      linear regulator DjVuL {*1.0}
 -y #      linear regulator DjVuL {+0.0}
 -z        black mode

You can use Netpbm or any other similar tool to obtain PNM from other format. Tiff image for recognition. For example, tesseract

DjVuL description.

The base of the algorithm was obtained in 2016 by studying the works monday2000 and adapting them to Linux. The prerequisite was the BookScanLib project and the algorithm DjVu Thresholding Binarization. This algorithm embodied good ideas, but had a recursive structure, was a "function with discontinuities" and had a hard color limit. The result of this algorithm, due to the indicated shortcomings and the absence of regulators, was doubtful. After careful study, all the foundations of the specified algorithm were rejected. The new algorithm is based on levels instead of recursion, a smooth weight function is used instead of a "discontinuous" one, no color restriction, BG/FG selection controls are enabled. The new algorithm allowed not only to obtain a much more adequate result, but also gave derivative functions: image division into BG/FG according to the existing mask.

Links

mfbpdf's People

Contributors

zvezdochiot avatar

Watchers

 avatar  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.