https://github.com/codeskyblue/imutils2
another imutils for opencv simple use
https://github.com/codeskyblue/imutils2
Last synced: 12 months ago
JSON representation
another imutils for opencv simple use
- Host: GitHub
- URL: https://github.com/codeskyblue/imutils2
- Owner: codeskyblue
- License: mit
- Created: 2023-08-14T09:25:05.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T03:49:38.000Z (over 2 years ago)
- Last Synced: 2025-05-22T02:51:27.280Z (about 1 year ago)
- Language: Python
- Size: 500 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/py/imutils2)
[](https://codecov.io/gh/codeskyblue/imutils2)
已经有了一个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下滑长截图拼接
```python
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中查看