在数学和信号处理中,希尔伯特变换(Hilbert transform)是一个对函数产生定义域相同的函数的线性算子。
在inter ipp 库中有实现该算法,示例如下:
IppStatus hilbert(Ipp32f* pInputDat, Ipp32fc* pOutDat,int iLen)
{
int n;
IppStatus status;
IppsHilbertSpec* pSpec;
Ipp8u* pBuffer;
int sizeSpec, sizeBuf;
status = ippsHilbertGetSize_32f32fc(iLen, ippAlgHintNone, &sizeSpec, &sizeBuf);
pSpec = (IppsHilbertSpec*)ippMalloc(sizeSpec);
pBuffer = (Ipp8u*)ippMalloc(sizeBuf);
status = ippsHilbertInit_32f32fc(iLen, ippAlgHintNone, pSpec, pBuffer);
for (n = 0; n < iLen; n ++) {
pInputDat[n] = (Ipp32f)cos(IPP_2PI * n * 2 / 9);
}
status = ippsHilbert_32f32fc(pInputDat, pOutDat, pSpec, pBuffer);
ippsMagnitude_32fc((Ipp32fc*)pOutDat, pInputDat, iLen/2);
ippFree(pSpec);
ippFree(pBuffer);
printf_32f("hilbert magn =", pInputDat, iLen, status);
return status;
}
引入头文件:ippcore.h, ippvm.h
引入库:ipps.lib,ippcore.lib, ippvm.lib
ipp库下载地址: https://download.csdn.net/download/jinhualing1987/12149492