Metadata-Version: 2.1
Name: EasyROI
Version: 1.0.0
Summary: ROI Helper
Home-page: https://github.com/saharshleo/easyROI
Author: Saharsh
License: MIT
Platform: UNKNOWN
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: opencv-python (==4.5.1.48)
Requires-Dist: numpy (==1.19.5)

# EasyROI

import EasyROI
roi_helper = EasyROI()


### Formats of roi

1. **Rectangle**

quantity = 1

```
{
    'roi': {   
                0: {'br_x': 573,
                    'br_y': 443,
                    'h'   : 105,
                    'tl_x': 322,
                    'tl_y': 338,
                    'w'   : 251
                }
            },

    'type': 'rectangle'
}
```

2. **Line**

quantity = 2

```
{
    'roi': {
                0: {
                    'point1': (374, 395), 
                    'point2': (554, 438)
                },

                1: {
                    'point1': (555, 438), 
                    'point2': (830, 361)
                }
            },

    'type': 'line'
}
```

3. **Circle**

quantity = 2

```
{
    'roi': {
                0: {
                    'center': (330, 355), 
                    'point2': (552, 375), 
                    'radius': 222
                },

                1: {
                    'center': (702, 374), 
                    'point2': (700, 475), 
                    'radius': 101
                }
            },

    'type': 'circle'
}
```

4. **Polygon**

quantity = 2

```
{
    'roi': {
                0: {
                    'vertices': [
                        (586, 435), 
                        (534, 582), 
                        (200, 504), 
                        (356, 403)
                    ]
                },

                1: {
                    'vertices': [
                        (1108, 507),
                        (738, 662),
                        (709, 497),
                        (711, 494),
                        (927, 414)
                    ]
                }
            },

    'type': 'polygon'
}
```

