【发布时间】:2014-12-10 02:53:07
【问题描述】:
我正在使用 Gonzalez frdescp 函数来获取边界的傅立叶描述符。我使用这段代码,我得到了两组完全不同的数字,描述了两个相同但不同的比例形状。
那么有什么问题呢?
im = imread('c:\classes\a1.png');
im = im2bw(im);
b = bwboundaries(im);
f = frdescp(b{1}); // fourier descriptors for the boundary of the first object ( my pic only contains one object anyway )
// Normalization
f = f(2:20); // getting the first 20 & deleting the dc component
f = abs(f) ;
f = f/f(1);
为什么对于相同但规模不同的两个圆圈,我得到不同的描述符?
【问题讨论】:
-
你从哪里得到 frdescp?这可能是问题的根源
-
我从 Gonzaelz 的 Digital image processing using MATLAB book 中得到它,实际上我认为 bwboundaries 是问题!
-
我编辑了my previous answer,希望对你和其他用户有用。
标签: matlab fft fourier-descriptors