-
Notifications
You must be signed in to change notification settings - Fork 5
/
curvature.xml
126 lines (109 loc) · 3.73 KB
/
curvature.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="curvature">
<info>
<pubdate>February, 2004</pubdate>
</info>
<refnamediv>
<refname>curvature</refname>
<refpurpose>Curvature of a contour</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis> K = curvature(BW [,sigma, delta])</synopsis>
<synopsis> K = curvature(x,y [,sigma, delta])</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>K</term>
<listitem>
vector containing the curvature of the contour at each point.
</listitem>
</varlistentry>
<varlistentry>
<term>BW</term>
<listitem>
Binary image containing only one object (0 for background, 1 for object).
</listitem>
</varlistentry>
<varlistentry>
<term>x</term>
<term>y</term>
<listitem>
vectors, storing the parametrized contour.
</listitem>
</varlistentry>
<varlistentry>
<term>sigma</term>
<listitem>
standard deviation of the gaussian function used to smooth the contour before computing the curvature. Defaults to 5.
</listitem>
</varlistentry>
<varlistentry>
<term>delta</term>
<listitem>
a double number, the time between samples (delta t), and defaults to 1.
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<para>
Function <literal>curvature</literal> calculates the curvature at each point of a binary contour, using FFT and a formula from differential geometry. </para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting><![CDATA[
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);
]]></programlisting>
</refsection>
<refsection>
<title>References</title>
<para>
"Shape Analysis and Classification", L. da
F. Costa and R. M. Cesar Jr., CRC Press.
</para>
<para>
"Differential Geometry of Curves and Surfaces", Manfredo
P. do Carmo, Prentice Hall, 1976.
</para>
</refsection>
<refsection><title>Authors</title><simplelist type="vert">
<member>Ricardo Fabbri <ricardofabbri[at]users.sf.net></member>
</simplelist></refsection>
<refsection><title>Availability</title>
The latest version of SIP can be found at
<para>http://siptoolbox.sf.net </para>
</refsection>
<refsection><title>See Also</title><simplelist type="inline">
<member> <link linkend="follow">follow</link> </member>
<member> <link linkend="gsm">gsm</link> </member>
<member> <link linkend="fftderiv">fftderiv</link> </member>
</simplelist>
</refsection>
</refentry>
<!-- ===================================================
SIP - Scilab Image Processing toolbox
Copyright (C) 2002-2009 Ricardo Fabbri
See the file COPYING for license-related issues
=================================================== -->