Skip to content

Implement Watershed Algorithm using OpenCV for image segmentation.

Notifications You must be signed in to change notification settings

ravirajsinh45/image_segmentation_using_opencv

Repository files navigation

image_segmentation_using_opencv

Implement Watershed Algorithm using OpenCV for image segmentation.

Segmentation

Segmentation_with_boundries

How to use repo:-

First of all clone repository.

git clone https://github.com/ravirajsinh45/image_segmentation_using_opencv.git

change working directoy

 cd image_segmentation_using_opencv/

I'm using python 3.7.9 for this project

Install all requirements

pip install -r requirements.txt

You can also create virtual environment for this if you want.

Steps

  • Open segmentation_using_watershed_algo notebook.

  • Add path of any image you want to segment and run all cell of notebook.

  • It will open 3 windows

    1. Image
    2. Segments
    3. segmented_boundries
  • In Image window add marker by following below steps

    • click on 1 from keyoard and click on Image window which you fill is same object.
    • now click on number 2 from keyoard once again click on different object in Image window and so on.....
    • you will get output in Image window like this
  • when you click like wise segmentation done in segments window and boundry creation on segmented_boundry.

  • If you want to clear segmentation click C key from keyoard.

  • If you want to exit click Esc key from keyoard.

Explore more image from DATA folder or your any custom images.

Thank You:)

About

Implement Watershed Algorithm using OpenCV for image segmentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published