Skip to content

bharathikannann/image-segmentation-opencv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Image Segmentation in Open CV

Implementation of watershed algorithm in python using Open CV

About

Image Segmentation is the process of dividing the image into multiple segments. Mainly used to locate objects and their boundaries. Watershed Algorithm is a Region Based Segmentation algorithm. Here the image is treated as a topographical landscape with ridges and valleys. The elevations of landscape are typically defined by grey values of the pixels. This method is susceptible to noise and other irregularities and may give over segmented results.

Demo

Pre-requisites

Download and install the following modules:

  1. numpy - pip install numpy
  2. matplotlib - pip install matplotlib
  3. opencv - pip install cv2

Steps

  1. Run the python file
  2. Each digits (0-9) have seperate colors, Press any digit and left click on the image as many times as you want
  3. Repeat 2nd step with different colours for each segments
  4. The segmented image will be updated each time
  5. Press C to clear points
  6. Press ESC to stop the program

Bharathi kannan Portfolio LinkedIn
Keep coding! :)

About

Image Segmentation in Open CV using the watershed Algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages