An open API service indexing awesome lists of open source software.

https://github.com/kvdomingo/image-segment

Conversion of kvdomingo/AP186 Activity 7 (Image Segmentation) into a standalone Python module
https://github.com/kvdomingo/image-segment

Last synced: 3 months ago
JSON representation

Conversion of kvdomingo/AP186 Activity 7 (Image Segmentation) into a standalone Python module

Awesome Lists containing this project

README

        

# Image Segmentation

## Background
This script uses two algorithms to perform image segmentation:
parametric segmentation via probability distribution estimation, and
non-parametric segmentation via histogram backprojection.

Further reading: [Activity 7: Image Segmentation](https://kvdomingo.xyz/svip/ap186/image-segmentation).

## Requirements
- Python 3.10 or later

## Setup
1. Clone the repo & install requirements
```shell
pip install -r requirements.txt
```
2. Run script
```shell
python main.py
```

## Using
1. Select region of interest by dragging a rectangle over the image

![Select ROI](doc/window1.png)

2. Press c on your keyboard to preview the ROI.

![Preview ROI](doc/window2.png)

3. Press c again to perform parametric & non-parametric segmentation.

![Segmented image](doc/window3.png)