已经有了一个imutils库,但是这个imutils也不能完全满足我的需求,所以就整了一个imutils2
安装
pip install imutils2
# or install with opencv
pip install imutils2[opencv]
常用函数
- imread 读取或转化图像为opencv格式
- pil2cv Pillow转Opencv格式
- cv2pil Opencv转Pillow格式
- cv2gray Opencv转成灰度图
- url_to_image 下载URL为图像
- show_image 查看图像兼容jupyter, requires matplotlib
- merge_app_screenshots App下滑长截图拼接
from imutils2 import *
im1 = imread("m1.jpg")
im2 = imread("m2.jpg")
im3 = imread("m3.jpg")
output = merge_app_screenshots([im1, im2, im3])
show_image(output)
写的不一定全,更多的例子可以去tests/test_imutils2.py中查看
Metadata
Release files for imutils2 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imutils2-0.3.5.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imutils2-0.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / imutils2-0.3.5.tar.gz
| Download URL | imutils2-0.3.5.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6f063a67e8a73fccff256e229a2e5ed86196e9138e8a6c9ebd16e4ab2ae0ac5
|
|
BLAKE2b-256 checksum How to use checksums |
fb803ad5251747bbabd5af159eec890b847ffaba4c735d49a129660022ef8dd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / imutils2-0.3.5-py3-none-any.whl
| Download URL | imutils2-0.3.5-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0bfd644ddc10bba4a766b66b1a34f545f43e373ebb9f27040aa84c268af7024
|
|
BLAKE2b-256 checksum How to use checksums |
ddbbf0522b57393b9a93b84c447b472db052ffe8fc8cdd947c17027c89657b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|