Code covered by the BSD License  

Highlights from
Isocontour

5.0

5.0 | 1 rating Rate this file 67 Downloads (last 30 days) File Size: 3.15 KB File ID: #30525
image thumbnail

Isocontour

by

 

24 Feb 2011 (Updated )

Find ISO-contour geometry in a 2D image using marching-squares, and sort the contour objects

| Watch this File

File Information
Description

This function ISOCONTOUR computes the isocontour geometry for a certain 2D image and isovalue. To Extract the isocontour geometry it uses Marching Squares and linear interpolation. Followed by sorting the contour geometry into separate contour-objects.
 
This function is the 2D equivalent of Isosurface extraction using Marching Cubes in 3D.
      [Lines,Vertices,Objects]=isocontour(I,isovalue);
 
  inputs,
    I : An 2D image (grey-scale)
    isovalue : The Iso-value of the contour
 
  outputs,
    Lines : An array describing all the Line-pieces of the isocontour
            geomtery, with a N x 2 index list of vertices
    Vertices : Vertices (Corners) of the lines M x 2 list of X,Y
            coordinates
    Objects : A 1 x K cell array with in every cell a list of indices
            corresponding to one connect isocontour. If the isocontour
            is closed then the last index value is equal to first index
            value.

MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
04 Oct 2012 Tushar Athawale

I am trying to compute line and vertices for a 2x2 cell. It is throwing an error.
Can somebody tell me how to do it?

01 Mar 2012 Reja Rabbi

Is it possible to compute the area above a gray scale value?

04 Apr 2011 Ken Campbell

Could you give an example of how to extract the indices for the pixels that a given contour passes through? I have been struggling to get this to work myself. Thank you for submitting this to the FileExchange.

04 Mar 2011 Bas Boom

Can you add the paper with I have to cite when I use this method. Nice method by the way, already might have solved two problems with it. Cheers Bas

Updates
10 Mar 2011

Line normals now always point to the inside of the object.

Contact us