最近在github中发现了一个有趣的小工具,tiler
github链接https://github.com/nuno-faria/tiler
具体介绍请直接去github,这里只分享一下它的使用方法。
需要安装的库在requirements.txt中
可以在cmd中定位到此文下直接使用命令
pip3 install -r requirement.txt安装所需要的库.
如果安装报timeout错误的话可以使用命令此(设置超时为30s)
pip3 install --timeout 30 -r requirements.txt
使用方法非常简单
打开文件夹下的conf.py文件
修改主要的三个参数
# out file name
OUT = 'out.png'
# image to tile (ignored if passed as the 1st arg)
IMAGE_TO_TILE = None
# folder with tiles (ignored if passed as the 2nd arg)
TILES_FOLDER = None
OUT是输出图片的文件名,可以为默认。
IMAGE_TO_TILE是需要自己修改的,输入图片路径不可以有中文字符,cv2无法打开此图片文件导致之后加载图片报错
TILES_FOL