# UISeg

UISeg is a Python library for automatic segmentation of user interface (UI) images into meaningful regions. It leverages
adaptive thresholding, morphological operations, and connected components analysis to detect and merge UI blocks, making
it useful for UI analysis, automation, and research.

![Image](https://github.com/user-attachments/assets/fa18411d-1d7e-44ca-bb4e-ad44cd19d717)

## Features

- Automatic detection and segmentation of UI regions in images
- Configurable parameters for region filtering and merging
- Visualization of detected regions
- Easy integration and extension

## Installation

```
pip install uiseg
```

## Example

See the [tests/](./tests) directory for demo images and test scripts.

## License

This project is licensed under the Apache License Version 2.0. See the [LICENSE](LICENSE) file for details.