Giter VIP home page Giter VIP logo

photochop's Introduction

photochop

a tool to chop pngs out of images

installation

set up a virtual environment with virtualenv venv and activate it with . venv/bin/activate

then just install all the dependencies pip install -r requirements.txt

usage

python photochop.py --pre-smooth --minimum-group-size 25 /path/to/image

usage: photochop.py [-h] [--max-subprocesses MAX_SUBPROCESSES]
                    [--disable-diacritics] [--auto-align]
                    [--set-threshold-to SET_THRESHOLD_TO]
                    [--allow-diagonal-connections] [--disable-multiprocessing]
                    [--row-despeckle-size ROW_DESPECKLE_SIZE]
                    [--minimum-group-size MINIMUM_GROUP_SIZE] [--despeckle]
                    [--supercontrast]
                    [--min-groups-per-row MIN_GROUPS_PER_ROW] [--pre-smooth]
                    [--smoothing-passes SMOOTHING_PASSES]
                    filename

dice an image, separating out groups of dark pixels

positional arguments:
  filename              an input png file

optional arguments:
  -h, --help            show this help message and exit
  --max-subprocesses MAX_SUBPROCESSES
                        number of worker processes to use. uses the cpu core
                        count by default
  --disable-diacritics  disable diacritic alignment
  --auto-align          auto-align the document
  --set-threshold-to SET_THRESHOLD_TO
                        set the threshold for a match (0-255)
  --allow-diagonal-connections
                        allow diagonal connections as well as cardinal
  --disable-multiprocessing
                        disable multiprocessing.
  --row-despeckle-size ROW_DESPECKLE_SIZE
                        despeckler size for row chopping
  --minimum-group-size MINIMUM_GROUP_SIZE
                        minimum pixel group size
  --despeckle           despeckle the document.
  --supercontrast       supercontrast the image. can help mitigate compression
                        artifacts.
  --min-groups-per-row MIN_GROUPS_PER_ROW
                        minimum groups per row
  --pre-smooth          smooth original document before processing
  --smoothing-passes SMOOTHING_PASSES
                        number of smoothing passes to make

photochop's People

Contributors

pkage avatar philipxjm avatar

Watchers

James Cloos avatar Liang Yu 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.