Assignment #8
Due: Fr. Nov. 14th (TWO week assignment)
Score: 10 points(!)
The programs must be sent to the TA as MATLAB-scripts.
Check the CDF-algorithm (Centroid Distance Fourier)!
A very easy way to get a first impression of a shape comparison measure is to compare two shapes
A and B, where B is a distorted version of A.
A useful similarity measure is expected to show less similarity the more B is distorted.
You have to program this test for the CDF-algorithm, using the shape given below.
How to:
- Compute the boundary polygon of the donkey (you hopefully saved your function for this!).
- Write a function that subsamples the boundary to N equally
distant (with respect to the runlength) boundary vertices
- Have a look at these new shapes, using sampling rates from 200 vertices down to 5 vertices (=196 versions of the donkey)
- This visual inspection gives you a feeling, at which sampling rate the shape gets 'really' distorted or
even unrecognizable. The picture below gives you an impression of the boundary curve using
90,70,50,30,10 sample points:
- Write a function that creates the CDF-representation of a boundary-polygon:
- Write a program that creates the CDF representation of all 196 donkey versions.
- Compare the CDF representation of all 196 versions to the one having the highest sampling rate (200 vertices)
- compare two spectra by the euclidean distance (each spectrum is a vector)
- since the vectors might have different lengths, fill the shorter one with zeros (at the end, of course !)
- Your result is a vector showing the similarity of the 196 versions. Plot this result and analyse the behavior of
the CDF-algorithm, comparing the plot to your visual impression !
Have fun !