No BSD License  

4.58333

4.6 | 12 ratings Rate this file 79 Downloads (last 30 days) File Size: 1.77 KB File ID: #11168
image thumbnail

Surface Curvature

by

 

23 May 2006 (Updated )

Vectorized surface curvature computation

| Watch this File

File Information
Description

[K,H,P1,P2] = surfature(X,Y,Z) returns the gaussian curvature of a surface (K), mean curvature (H), and principal curvatures (P1,P2). The inputs (X,Y,Z) are 2D arrays corresponding to the surface being analyzed.

Example
[X,Y,Z] = peaks;
[K,H,P1,P2] = surfature(X,Y,Z);
surf(X,Y,Z,H,'facecolor','interp');
set(gca,'clim',[-1,1])

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (19)
27 Oct 2014 Othmani

I am trying to run the code with 3D data but I gets this problem :
Error in ==> gradient at 49
[msg,f,ndim,loc,rflag] = parse_inputs(f,varargin);

??? Output argument "varargout{2}" (and maybe others) not assigned during call to "C:\Program
Files\MATLAB\R2010a\toolbox\matlab\datafun\gradient.m>gradient".

Error in ==> surfature at 11
[Xu,Xv] = gradient(X);

30 Jun 2014 abuzer

thank you for code however it does not run for 3D data and the error occured.

Error in gradient (line 49)
[err,f,ndim,loc,rflag] = parse_inputs(f,varargin);

06 Mar 2014 dong  
03 Mar 2014 Ahmad

this is that I want i.e. all types of curvature.
BUT(!) I have a point cloud that every point have x,y&z(3D coordinate).
Can I calculate curvature of each point?
If yes then how?
thank U

22 Nov 2013 Daniel  
23 Jul 2013 Caitlin

I am also wondering what the 2D input arrays corresponding to the surface are?

08 Apr 2013 soudeh

Thank you for your code,
I am trying to obtain the principal curvatures (K1,K2) for each voxels(x,y,z) of a 3d image that has an intensity value. These values are calculated based on Gaussian and mean curvatures . How can I use your code in order to get my results.

03 Dec 2012 bnu

very good,thanks a lot!!

31 May 2011 vinu arasu

Could you please explain what is 2D arrays corresponding to the surface being analyzed??

14 Sep 2010 Lucas Lorensi

Excellent! Is there a way to compute principal directions?

29 Apr 2010 Ted Teng

By definition, H>0 for convex surface, so it seems negative Z corresponding to convex?

20 Nov 2009 Jason Zhang

Cool, see how it works!

27 Jun 2008 krog babuz'

Hi, could you please specify what the 2D arrays for X,Y,Z actually are?

20 May 2008 Su Ping

cool, I'm looking for this

26 Dec 2007 ewe wewe  
24 Jul 2007 Giancanio Sileo

Very good tool for curvature computation.

10 Jul 2007 Michael Girard

COOL

07 Feb 2007 mustafa yagci  
31 May 2006 Tao Ye

i've been trying to find code to perform some computational geometry tasks, this one is very much helpful. Thank you.

Contact us