Command line tool and module to crop an image to a specific resolution removing less important parts first
Project description
Command line tool and module to crop an image to a specific resolution removing less important parts first.
First started with the approch of this publication but seems a bit complex and slow (http://research.microsoft.com/en-us/um/people/jiansun/papers/SalientDetection_CVPR07.pdf).
cropy uses entropy information to identify slices of the image with less informations.
Usage
To use with command line:
cropy -i [input image] -r [width] [height] -o [output name] -s [maxSteps]
input image : location of the image to crop
width, eight : dimensions of the resultant cropped image
output name : name of the output image (default : original_name.width.eight.orginal_extension)
maxSteps : number of iteration : greater means more precision but slower (default : 10)
More info and examples on http://blog.mapado.com/cropy-how-to-crop-an-image-keeping-the-best-content/
Installation
You can install cropy using pip:
$ pip install cropy
Note that cropy requires scikit-learn, which itself is based on numpy and scipy and requires cython to compile.
Possible upgrade
locate faces inside image to prevent removing
locate text on images to crop first
Thanks
Inspired from slycrop (php entropy based crop) : https://github.com/stojg/slycrop
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cropy-0.2.tar.gz
.
File metadata
- Download URL: cropy-0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b861556ad34c97f15551293e0b8e0318a86123c8564126f319736a4e0fb8416 |
|
MD5 | bd8c9849afc853f0cc527f109103d7b6 |
|
BLAKE2b-256 | b849cf67616e615314d4e10ad94324e0cd2c59cf499259ea8e9e85e7f1de34c6 |
File details
Details for the file cropy-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: cropy-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | deac7e6f7e2a8f27b4ba136cd9c291967c6c9fcde926a29b740da3b8b5e05194 |
|
MD5 | b1b59e5bd6265773ea0bab03610c787b |
|
BLAKE2b-256 | 45cfb97cd99e3a13ed1b10d0babb47a8801ffccd97a6f811c259fae1911da725 |