cropimage-dh-0.0.7
توضیحات
A simple toolkit for detecting and cropping main body from pictures.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cropimage-dh-0.0.7 |
| نام | cropimage-dh |
| نسخه کتابخانه | 0.0.7 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | D8ahazard |
| ایمیل نویسنده | donate.to.digtalhigh@gmail.com |
| آدرس صفحه اصلی | https://github.com/haofanwang/cropimage |
| آدرس اینترنتی | https://pypi.org/project/cropimage-dh/ |
| مجوز | - |
# cropimage
[](https://colab.research.google.com/drive/18jqXa1V-v5FXoCcY2MVg3FC3CFcOAk63?usp=sharing) [](https://badge.fury.io/py/cropimage)  [](https://pepy.tech/project/cropimage) [](https://github.com/haofanwang/cropimage/issues)
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.
<p align="center"><img title="crop_example" src="https://github.com/haofanwang/cropimage/raw/main/assets/example.png"></p>
## Installation
~~~sh
pip install cropimage
~~~
## Get Started
~~~python
from cropimage import Cropper
cropper = Cropper()
# Get a Numpy array of the cropped image
# Set completeness to be True if you expect the 'face' to be focused rather than 'person'
# Set target_size to be a tuple (size, size), only square output is supported now
result = cropper.crop('./images/input.jpg')
# Save the cropped image
cv2.imwrite('cropped.jpg', result)
~~~
## More Results
<p align="center"><img title="crop_example" src="https://github.com/haofanwang/cropimage/raw/main/assets/example1.png"></p>
## Contributing
If you find any issue of this project, feel free to open an issue or contribute!
نحوه نصب
نصب پکیج whl cropimage-dh-0.0.7:
pip install cropimage-dh-0.0.7.whl
نصب پکیج tar.gz cropimage-dh-0.0.7:
pip install cropimage-dh-0.0.7.tar.gz