<< bwlabel SIP - Scilab Image Processing Toolbox curvature2d >>

SIP - Scilab Image Processing Toolbox >> SIP - Scilab Image Processing Toolbox > curvature

curvature

Curvature of a contour

Calling Sequence

K = curvature(BW [,sigma, delta])
K = curvature(x,y [,sigma, delta])

Parameters

K
vector containing the curvature of the contour at each point.
BW
Binary image containing only one object (0 for background, 1 for object).
x y
vectors, storing the parametrized contour.
sigma
standard deviation of the gaussian function used to smooth the contour before computing the curvature. Defaults to 5.
delta
a double number, the time between samples (delta t), and defaults to 1.

Description

Function curvature calculates the curvature at each point of a binary contour, using FFT and a formula from differential geometry.

Examples

initial_dir = PWD;
chdir (SIPDIR + 'images');

Img = imread('star.bmp');
clf
imshow(Img,2);
k = curvature(Img,13);  // 13 sigma (shape is smoothed so curvature exists)
clf
plot(k)
//
// observe there are six curvature peaks,
// corresponding to the six peaks of the star. There
// is one peak half at 0 and half at about 450.
// That's because the parametrization of
// the contour started at the highest peak and
// terminated there. Note also that the shape had to
// be considerably smoothed so the curvature doesn't
// blow up at the very sharp peaks of the star.
//

chdir(initial_dir);

References

"Shape Analysis and Classification", L. da F. Costa and R. M. Cesar Jr., CRC Press.

"Differential Geometry of Curves and Surfaces", Manfredo P. do Carmo, Prentice Hall, 1976.

Authors

Availability

The latest version of SIP can be found at

http://siptoolbox.sf.net

See Also


<< bwlabel SIP - Scilab Image Processing Toolbox curvature2d >>