Code covered by the BSD License  

Highlights from
Geometric measures in 2D/3D images

5.0

5.0 | 1 rating Rate this file 71 Downloads (last 30 days) File Size: 85.8 KB File ID: #33690

Geometric measures in 2D/3D images

by David Legland

 

09 Nov 2011 (Updated 27 Mar 2013)

Measure of geometric parameters in 2D or 3D images (surface area, perimeter, Euler Number...)

| Watch this File

File Information
Description

Contains various functions for measuring or estimating geometric quantities from 2D or 3D images.

Parameters available for 2D images are:
* the area (number of pixels)
* the perimeter (based on Crofton formula)
* the(2D) Euler Number

Parameters available for 3D images are:
* the volume,
* the surface area (measured using the Crofton formula),
* the surface area of the interface between two labels
* the mean breadth (also known as integral of mean curvature),
* the (3D) Euler Number

Most functions work both for binary and label images. It is possible to specify options (connectivity for Euler Number, number of directions for perimeter or surface area), as well as image resolution in each direction. For some parameters, it is also possible to estimate the density with respect to image area or volume.

Example 1: measure perimeter in 2D label image
  lbl = bwlabel(imread('coins.png') > 100);
  p = imPerimeter(lbl)
  p =
      184.8668 154.9495 185.1921 267.1690 187.3183 179.5038 182.7406 180.8445 155.5049 155.5049

Example 2: measure surface area in 3D binary image
  img = analyze75read(analyze75info('brainMRI.hdr'));
  bin = imclose(img>0, ones([5 5 3]));
  S = imSurface(bin, [1 1 2.5]) % specify resolution
  ans =
      2.7291e+004

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.9 (R2009b)
Other requirements Can be used without image processing toolbox with slight modifications of sources (it is only used to accelerate processing of label images).
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
12 Mar 2012 Ashok Pant

It helps me for feature Extraction from Handwritten Characters. Thank you Devid.

25 Nov 2011 David Legland

Hi Sven,
I have a code for computing inertia ellipsoid of a set of points. I can adapt it easily to compute inertia ellipsoid of a binary image. I try to package it and submit it soon !

23 Nov 2011 Sven

Hi David, the ability to specify image resolution is a big plus. Nice work. One thing that I find is that I wish the regular IP "Orientation" and "Majory/MinorAxis" statistics could be implemented for 3D. For instance, from a 3D mask I generally want to know "is this a long thin blob or a more rounded blob". Basically, the moments of inertia of the blob would be hugely helpful. Any plans to implement this?

Updates
27 Mar 2013

fix some bugs in imPerimeterDensity and imSurface, add imJointSurface

Contact us