一款自行使用的工具库
Project description
安装
pip install long-utils
图中找图
from long_utils.image.search import ImgFindImg
img = ImgFindImg(img_source='static/big.png', img_search='static/small.png')
img.find_coord(is_debug=True)
# 或者只拿取小图在原图中的坐标rectangle, 小图在原图中的大小result,confidence表示准确率
res = img.find_coord()
# [{'result': (539.0, 21.5), 'rectangle': ((524, 10), (524, 33), (554, 10), (554, 33)), 'confidence': 1.0}]
print(res)
简单日志输出
from long_utils import Log
logger = Log(show_line=True, show_file_name=True, show_time=True)
logger.error(message="xxxx")
logger.success(message="xxxx")
logger.warning(message="xxxx")
logger.info(message="xxxx")
logger.debug(message="xxxx")
logger.success_bg('xxxx')
logger.error_bg('xxxx')
logger.warning_bg('xxxx')
logger.debug_bg('xxxx')
logger.info_bg('xxxx')
logger.color('xxxx', fg='blue', bg='black')
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
long_utils-1.0.0.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for long_utils-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 372665b471b44134692bc4b6ef8a2ee754a27428d5c730e8184d4ab3e38ce614 |
|
MD5 | f940e4aee4000e52bccf1912f66f4cf7 |
|
BLAKE2b-256 | f4b90374df2098ce84b13dc2b04c73dc0482a8f533d6c3427e85e4f71002f3e0 |