笔者学识有限。 本博客旨在对mitre_sfr核心代码进行简单注解, 详细内容读者仁者见仁智者见智。
SFR算法对ESF曲线进行差分得到LSF;
给LSF加上汉明窗, 降低干扰;
对加窗后的LSF曲线进行DFT, 得到SFR。
/*****************************************************************************/
/* This has been modified from Annex A, to more closely match Annex D and
reduce finite difference errors. Now allows either [-1 1] derivative
(when separation = 0) or [-1/2 0 1/2] derivative (when separation=1)
Inputs: len length of ESF array
AveEdge array of ESF values
separation type of derivative
0 = [-1 1]
1 = [-1/2 0 1/2]
Outputs: AveTmp array of original ESF values
AveEdge array of derivative (LSF) values
centroid centroid of the derivative
*/
// 计算ESF的差分图像LSF, 并计算LSF的质心
void calculate_derivative(