A simple toolkit for detecting and cropping main body from pictures.
Project description
cropimage
cropimage is a simple toolkit for image cropping. Different from other projects that mainly tackle face region, we extend to all kinds of images such as landscape. We support horizontal and portrait size and generate a square output.
Installation
pip install cropimage
Get Started
from cropimage import Cropper
cropper = Cropper()
# Get a Numpy array of the cropped image
# Set completeness to be False if you expect the 'person' to be complete rather than 'face'
cropped_array = cropper.crop('./images/input.jpg', completeness=True, target_size=(500,500))
# Save the cropped image
cv2.imwrite('cropped.jpg', result)
More Results
Contributing
If you find any issue of this project, feel free to open an issue or contribute!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cropimage-0.0.4.tar.gz
(29.7 MB
view hashes)
Built Distribution
Close
Hashes for cropimage-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967667058b3821d2b7a13cbf64645a1c7b918d10e101fe8a3c6cbe6077496d76 |
|
MD5 | 47d8ace5d1c9e0e9e012177c581bfad2 |
|
BLAKE2b-256 | af1399fc445fae196757b7e35c25b6b685002e295a1fe0bb0cdfac4d037cf6b0 |