About fourier descriptors
이전 댓글 표시
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
Walter Roberson
2012년 4월 25일
What difference do you see between what you get and what you expect?
답변 (1개)
Hayan Tariq
2012년 5월 3일
0 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!