How to do un-normalized 2D Cross Correlation in IPP

隐身守侯 提交于 2019-12-11 04:01:45

问题


I'm doing some C++ optimization work and have need of the plain vanilla version of cross correlation without any mean offset or normalization scaling operations. I know that under normal circumstances with image data the influence of brightness is removed using the above means so that only structural similarity can be discerned but in our application brightness is actually needed. I'm using IPP 7.1, does anybody know if there's a means to do this? The next best thing I'll have to do is write the loops manually and exploit SIMD autovectorization together with some OpenMP parallelization.


回答1:


Yes, of course, there are also available CrossCorr functions without normalization - take a look at ippi.h:

IPPAPI( IppStatus, ippiCrossCorrValid_32f_C1R, ( const Ipp32f* pSrc,
    int srcStep, IppiSize srcRoiSize, const Ipp32f* pTpl, int tplStep,
    IppiSize tplRoiSize, Ipp32f* pDst, int dstStep ))

IPPAPI( IppStatus, ippiCrossCorrValid_8u32f_C1R, ( const Ipp8u* pSrc,
    int srcStep, IppiSize srcRoiSize, const Ipp8u* pTpl, int tplStep,
    IppiSize tplRoiSize, Ipp32f* pDst, int dstStep ))

IPPAPI( IppStatus, ippiCrossCorrValid_8s32f_C1R, ( const Ipp8s* pSrc,
    int srcStep, IppiSize srcRoiSize, const Ipp8s* pTpl, int tplStep,
    IppiSize tplRoiSize, Ipp32f* pDst, int dstStep ))

IPPAPI( IppStatus, ippiCrossCorrValid_16u32f_C1R, ( const Ipp16u* pSrc,
    int srcStep, IppiSize srcRoiSize, const Ipp16u* pTpl, int tplStep,
    IppiSize tplRoiSize, Ipp32f* pDst, int dstStep ))

Regards, Igor



来源:https://stackoverflow.com/questions/31599949/how-to-do-un-normalized-2d-cross-correlation-in-ipp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!