AW: AW: [Insight-users] How to measure the smoothness of one curve?
Jiang
jiang at TI.Uni-Trier.DE
Mon Jun 21 05:48:17 EDT 2004
Hi Luis,
Your vivid description of Fourier Spectrum and linked resources make me
much clear about the idea of Fourier Spectrum analysis and its
relationship with the curve's smoothness. Thank you very much!
Now I want to realize the evaluation of curve's smoothness with some ITK
classes. As I understand I should do it as following:
Curve Image --> ChainCode (It should not be difficult to handle)
--> FourierSeriesPath (by itk::ChainCodeToFourierSeriesPathFilter)
--> computing the decomposition by the FFT classes in VNL (For this step
I'm not very clear how to do)
--> evaluating the Bias of the Fourier spectrum (also not clear how to
get it)
Could you give me some example concerning my case?
Thanks a lot!
Jiang
-----Ursprüngliche Nachricht-----
Von: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Gesendet: Mittwoch, 16. Juni 2004 07:09
An: Jiang
Cc: ITK
Betreff: Re: AW: [Insight-users] How to measure the smoothness of one
curve?
Hi Jiang,
1) The concept of the Spectrum of a curve goes
back to Ptolomey (150 C.E.) when he attempted to
explain the retrograde movement of the planets
with the hypotesis that they follow circular
orbits whose center is, in its turn, following
another circular movement.
http://www.phys.unt.edu/Astronomy/online_course_files/sample_pages/04_1.
html
The main orbit was called a "Deferent" and the
traveling orbit was called an "Epicycle". Unfortunately
this approach couldn't completely account for the
observer motion of planets like mars. If was then
suggested that an additional small epicycle should
be added to the existing one in order to account
for the apparent perturbations.
At the time Greek philosophers believed strongly
in pure geometrical forms, along with the human
centered notion of the perfection of celestial
objects. As a consequence the notion of an elliptical
motion was out of question as a posibility for
describing the orbit of a planet. Ellipses were
introduced by Kepler for describing planetary
motion in 1609.
For Ptolomey, of course this didn't took yet the
form of the Spectrum of a curve, maybe just because
Fourier was not to be born until 1768 :-)
However, in theory, the notion of decomposing
a complex movement into a series of simple circular
periodical movements is equivalent to the decomposition
of the parametric coordinates of a curve into a
Fourier series.
When you take a curve and parameterize it with
a parameter "t" (e.g. the curvelength), then you
can express the coordinates of a point in the curve
in terms of three funcitons X(t), Y(t) and Z(t).
In that way, for every "t" you get coordinates
(x,y,z). If now you take the three functions and
expand them in Fourier series you get something like
X(t) = Sum( Fx(v) * exp( -i * v * t ) )
where
exp( i * k ) = cos(k) + i * sin(k)
The values of Fx(v) are the "Fourier spectrum" of
the curve X(t). If the curve is "smooth" that means
that it lacks rapid variations which are typically
associated with high frequencies. In other words the
function Fx(v) will have high values for low values of
v (the frequency) and it will have low values for high
values of v ( high frequencies).
You may want to consult any book on signal processing
in order to get familiar with spectral analysis.
2) If your curve is represented as "1" pixels in an image
it should be straight forward to generate a ChainCode
path for it. You simply select a starting pixels, and
from it you visit the immediate neighbors. The direction
in which you encounter a neighbor at "1", gets entered
in to the chain. This is a classical representation of
contours in image processing, you will find details on
introductory books such as Rozenfeld, or even in Graphics
Gems.
3) What you want from the FourierSeriesPath is not the
results of the Evaluate() function but the internal
coefficients of the Series.
In other words, what you want is the Fourier Decomposition
of the signal, not using the Fourier series as an
interpolator, which is what the Evaluate() method does.
Note that for computing the decomposition you could use
the FFT classes in VNL.
For evaluating the Bias of the Fourier spectrum you
can use any measure that differentiates between a high
content of low frequencies and a low content of low
frequencies. You probably want to get more familiar
with spectral analysis. Here are some links you may
find useful:
http://mathworld.wolfram.com/FourierSeries.html
Here are sites with interactive Java applets
http://www.jhu.edu/~signals/fourier2/
http://www.digital-school.com/English/Mathematics/Fourier_Series/Fourier
_Series.htm
That will give you a feeling on how the frequency
content relates to smoothness in the curve.
Regards,
Luis
More information about the Insight-users
mailing list