Giter VIP home page Giter VIP logo

threshseg's Introduction

ThreshSeg

This repository contains several MATLAB scripts used to do image segmentation via an MBO-type iterative thresholding method.

Also the manuscript is stored in manuscript/.

The code is to accompany the paper:
Dong Wang, Haohan Li, Xiaoyu Wei, Xiaoping Wang.
An efficient iterative thresholding method for image segmentation. (2016).
arXiv:1608.01431 [cs.CV].

Code Usage

  • Run ThreshSeg.m to use the GUI interface (somehow it runs much slower in GUI).
  • For better performance, you may call the library directly. To do that, copy main_template.m to a new file (e.g. main.m) and edit the parameters. In the same directory as main.m, put all input files under ./input. Then execute main.m.

Examples

Run examples/demo_XXXX.m and read comments therein.

Using GUI

The initials can be set through GUI with a mouse.

  • For rectangular regions, left click on the image twice to pick a rectangle.

  • For polygonal regions, left click to add vertices, and right click to add the last vertex as well as connect the last vertex with the first one.

Initial File Format

Rectangles

  • The file contains (n_phases-1) lines. Each line consists of four real numbers (xmin, xmax, ymin, ymax), which specifies a rectangular region.
  • The entries should between 0 and 1, otherwise they will be normalized to be so.
  • When the rectangular regions intersect, the intersection parts are assigned to none of them, and is left to be the lase phase.

Polygons

  • The file contains 2*(n_phases-1) lines. Every two lines hold information for a polygon, the first of which consists of x-coordinates, and the second of which consists of y-coordinates.
  • Since the polygons may have different numbers of vertices, the coordinates may be padded with zeros to make the length of lines even. Note that this is optional. You may write the file without zero padding and it also works.
  • The rules for out-of-image points and intersecting polygons are the same as rectanglular cases.

threshseg's People

Contributors

xywei avatar

Stargazers

 avatar

Watchers

 avatar paper2code - bot 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.