Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Image Segmentation Using OpenCV

This project demonstrates basic image segmentation techniques using OpenCV in Python. It applies Otsu's thresholding method and performs basic image cleaning using erosion and dilation.

## Project Overview

The project performs the following steps:

1. **Grayscale Conversion**: Converts the image to grayscale.
2. **Thresholding**: Uses Otsu's method to threshold the image into binary (black and white) form.
3. **Image Cleaning**: Performs erosion and dilation to clean up the thresholded image.

## Prerequisites

Before running the project, make sure you have the following installed:

- Python 3.x
- OpenCV
- Numpy

You can install the required dependencies using `pip`:

```bash
pip install opencv-python numpy

How to Use

  1. Place the image (e.g., apple.jpg) you want to segment in the same directory as the Python script.
  2. Run the script:
python segmentation.py

About

This project demonstrates image segmentation using OpenCV in Python. It applies Otsu’s thresholding method to segment an image and performs basic image cleaning techniques like erosion and dilation to enhance the result.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages