Skip to main content

用 pillow 画目标检测的框,支持中文(自带字体)

Project description

用 pillow 画目标检测的框,支持中文(自带字体)

用法见

→ test.py

#!/usr/bin/env python

from imgbox import imgbox
from PIL import Image
from os.path import abspath, dirname, join

DIR = dirname(abspath(__file__))
img = join(DIR, 'test.webp')
img = Image.open(img)
imgbox(img, ('测试', (30, 30, 60, 60)))
img.save(join(DIR, 'box.webp'), quality=80)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imgbox-0.2.tar.gz (5.6 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page