Skip to main content

Creates a rectangle around a center point

Project description

Creates a rectangle around a center point

$pip install cv2-rectangle-around-center



from cv2_rectangle_around_center import line_rectangle_center, rectangle_center

# Allowed image formats: url/path/buffer/base64/PIL/np





im1 = line_rectangle_center(

    image=r"https://raw.githubusercontent.com/hansalemaos/screenshots/main/diff.png",

    center=(150, 150),

    width=200,

    height=280,

    thickness=6,

    color1=(255, 0, 0),

    color2=(255, 255, 0),

    color3=(255, 0, 255),

    color4=(0, 255, 255),

    save_path="f:\\recta\\lines.png",

)



im2 = rectangle_center(

    image=r"https://raw.githubusercontent.com/hansalemaos/screenshots/main/diff.png",

    center=(150, 150),

    width=200,

    height=280,

    thickness=6,

    color=(255, 0, 0),

    save_path="f:\\recta\\rect1.png",

)



im3 = rectangle_center(

    image=r"https://raw.githubusercontent.com/hansalemaos/screenshots/main/diff.png",

    center=(150, 150),

    width=200,

    height=280,

    thickness=-1,

    color=(255, 255, 0),

    save_path="f:\\recta\\rect2.png",

)

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

cv2_rectangle_around_center-0.10.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file cv2_rectangle_around_center-0.10.tar.gz.

File metadata

File hashes

Hashes for cv2_rectangle_around_center-0.10.tar.gz
Algorithm Hash digest
SHA256 9465807e650c40624c1894cc0203b470581bf7168e5fcf62e69136b65119bc0a
MD5 3792ae5808736981952d073c9e35b93b
BLAKE2b-256 50110edc3839ae9d92c91317d9aa8369b04fab9861a55a9ea24ea1a2ba495810

See more details on using hashes here.

File details

Details for the file cv2_rectangle_around_center-0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for cv2_rectangle_around_center-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 47634b1fcfafb279fd9c1c98fcb786cc3ae12462bf5bf79d5003770c4449b05f
MD5 f13cdad72d1883d4b37cb4ae8316cf55
BLAKE2b-256 ae009e9fff1493c38f128cb26584d01798d84a2b09cf83eaa0004111094aead9

See more details on using hashes here.

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