Skip to main content

[PYTHON] cv2drawx

This is the cv2drawx package project. This package includes new drawing features for opencv-python such as draw dash lines, rounded boxes, etc.

Sample code

Import packages

import cv2
import numpy as np
from cv2drawx.drawing_utils import text_box

Setup a blank cv2 window

frame = np.zeros((720, 1280, 3), dtype=np.uint8)
frame.fill(200)

Draw elements

while True:
    # =======================================
    # DRAW TEXT BOX
    # =======================================
    text_box(
        frame,
"""
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet""",
        (50, 200),
        cv2.FONT_HERSHEY_SIMPLEX,
        2, (0, 0, 0), 2,
        (255, 180, 20),
        (0, 0, 0), 3, [20, 50, 300, 80],
        dash_size=10, dash_gap=10, border_radius=10
    )

    cv2.imshow("frame", frame)

    if cv2.waitKey(1) & 0xFF == 27:
        break

cv2.destroyAllWindows()

Result

Test result

Metadata

Release files for cv2drawx 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cv2drawx 0.1.14
File Size Uploaded Provenance
cv2drawx-0.1.14.tar.gz 4.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cv2drawx 0.1.14
File Interpreter ABI Platform
cv2drawx-0.1.14-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / cv2drawx-0.1.14.tar.gz

Download URL cv2drawx-0.1.14.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
30934cee9a93ff5b0b709d315e54584e1d038ed7320567ba0564ee5996ec60f7
BLAKE2b-256 checksum
How to use checksums
82a59cbecf473de9da18b11892ad763bb8bb44ee80328c0f9287016b6ff9372a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release files / cv2drawx-0.1.14-py3-none-any.whl

Download URL cv2drawx-0.1.14-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6835c598df5ca989836f190c6912bec8950c718e2632d32cabd62662858e5b47
BLAKE2b-256 checksum
How to use checksums
b9521c26f738896904138d9f315eea6acf9b55d060d2eab92ebc2d90ce125abe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Security for cv2drawx 0.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page