Metadata-Version: 2.1
Name: cv2-rectangle-around-center
Version: 0.10
Summary: Creates a rectangle around a center point
Home-page: https://github.com/hansalemaos/cv2_rectangle_around_center
Author: Johannes Fischer
Author-email: <aulasparticularesdealemaosp@gmail.com>
License: MIT
Keywords: cv2,numpy,rectangle,center
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Editors :: Text Processing
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Text Processing :: Indexing
Classifier: Topic :: Text Processing :: Filters
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE.rst
Requires-Dist: a-cv-imwrite-imread-plus
Requires-Dist: opencv-python


<h2>Creates a rectangle around a center point</h2>





```python



$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",

)



```



<img src="https://raw.githubusercontent.com/hansalemaos/screenshots/main/diff.png"/>





<img src="https://github.com/hansalemaos/screenshots/raw/main/lines.png"/>





<img src="https://github.com/hansalemaos/screenshots/raw/main/rect1.png"/>







<img src="https://github.com/hansalemaos/screenshots/raw/main/rect2.png"/>
