Coder Social home page Coder Social logo

zqh-sail / image-segmentation-using-slic-superpixels-and-graph-cuts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geekyspartan/image-segmentation-using-slic-superpixels-and-graph-cuts

0.0 1.0 0.0 12.62 MB

Implemented code for semi-automatic binary segmentation based on SLIC superpixels and graph-cuts.

Python 100.00%

image-segmentation-using-slic-superpixels-and-graph-cuts's Introduction

Image Segmentation Using Markings and Graph-Cut

Implemented code for semi-automatic binary segmentation based on SLIC superpixels and graph-cuts.

Static Segmentation:

For static segmentation, user needs to pass a mask of same size as of image with foreground and background markings. Foreground marking should be in Red color and Background makrings should be in Blue color. Run the following command to execute the segmentation:

python main.py [original image Path] [marking image Path] [output directory ex. ./]

Dynamic Segmenttaion:

For run time segmentation, an interactive window will popup. User can draw markings on the image. Red color represents the marking for Foreground and Blue colors represents the markings for Background. Once, atleast one marking is available for FG and BG, corresponding result will pop up in another window showing the binary mask. Mask is updated in real time as a line is drawn by the user. By default Foreground mode is set. Use following keys to interact with window:

'f' - switch to Foreground mode

'b' - switch to Background mode

'r' - Reset markings

'q' - Quit

Python command:

python segmentationVideo.py [original image Path]

Refer Real Time Segmentation to see the working example.

image-segmentation-using-slic-superpixels-and-graph-cuts's People

Contributors

geekyspartan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.