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

result

Metadata

Release files for cv2drawx 0.1.12

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.12
File Size Uploaded Provenance
cv2drawx-0.1.12.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 12.6 kB

Release files / cv2drawx-0.1.12.tar.gz

Download URL cv2drawx-0.1.12.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f5f75e540a55d18f2720dba5e8b137a0b53be80ab7febc8ebc7b9892dd2ca65d
BLAKE2b-256 checksum
How to use checksums
f6486819227e49083b42d4cc702e27023680fcc10226ecb7834d28ba5d2b221b
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.12-py3-none-any.whl

Download URL cv2drawx-0.1.12-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2559e413bb238ee3901d1db5add8411b9cf5ea8a5f6814dda5cab37d2320cfc
BLAKE2b-256 checksum
How to use checksums
574604b6e73254f29fa411a7b5427a7ceff66433e3254f887b90399e074772ba
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.12

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