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.13

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.13
File Size Uploaded Provenance
cv2drawx-0.1.13.tar.gz 4.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 9.7 kB

Release files / cv2drawx-0.1.13.tar.gz

Download URL cv2drawx-0.1.13.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7fd59a32609ac7f975258db7808f3a1ef6a0682e2e54e44d6eb1dbee8cdaf263
BLAKE2b-256 checksum
How to use checksums
f3aeb25d5ab47832d03cfafad6a324622febe4c0f0371b7899f6f7ec90c40648
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.13-py3-none-any.whl

Download URL cv2drawx-0.1.13-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
131fcf66c5e11ff64a9924a0a2e9f5255565ae30b655c7084dd882e29c019aa0
BLAKE2b-256 checksum
How to use checksums
f4cf1382d91902083ee0f5f8357da0e978fd5551eb0143a0eaae7e203291bb22
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.13

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