About fourier descriptors
Ältere Kommentare anzeigen
Hi , is the following code right for getting fourier descriptors for a shape ?
[x3,y3] = find(im3,1);
[x4,y4] = find(im4,1);
b3 = bwtraceboundary(im3,[x3 , y3],'N',8,nnz(im3),'clockwise');
b4 = bwtraceboundary(im4,[x4 , y4],'N',8,nnz(im4),'clockwise');
f3 = frdescp(b3);
f4 = frdescp(b4);
f3 = abs(f3);
f4 = abs(f4);
f3 = f3(2:10);
f4 = f4(2:10);
f3 = f3/f3(1);
f4 = f4/f4(1);
is that true ? providing that when i plotted the two boundaries i got those two figures
Note that f3 has the following values
1.0000
0.6550
0.4776
0.6454
0.1478
0.8498
0.4893
0.9819
0.7874
and f4
1.0000
2.0077
0.4963
0.3795
0.5872
1.0960
0.8823
0.8092
0.8482
Both pics have the same size as well
So what is wrong ?
1 Kommentar
Walter Roberson
am 25 Apr. 2012
What difference do you see between what you get and what you expect?
Antworten (1)
Hayan Tariq
am 3 Mai 2012
0 Stimmen
I am also trying to use fourier descriptor. why do you think there is something wrong. does the descriptor retrieve back almost the original shape? if yes then it is ok.
I am trying to use fourier descriptors as a feature for a classifier like neural net. but i don't know how to use it. can I use like the first 10 descriptor like how you extract the first 10, just use them as an input or there is another way?
thanks
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!