Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Looking for MKL FFT complementary functions

$
0
0

Hey 

I migrated my DFT code from IPP to FFT code using MKL FFT functions, I'm looking forward for performance improvement.

1st, I want to do phase correlation in spectrum domain. 

In my algorithm I have 2 input images and the output is a correlation surface 

I do the following: 

1. FFT both input images 

2. for each element in the spatial domain, I'd like to multiply with complex conjugate, than normalize  each element: 

2.1       (a1 + ib1) * (a2 - ib2) 

2.2       (a + ib) / magnidute(a,b)  --> Z 

3. inverse FFT Z 

I'm looking for complementary functions for FFT library that calculate a multiplication with complex conjugate, and function that calculate each element magnitude.  

I thought I'd be great to use: 

vcMulByConj 

and 

VCABS 

functions that reside on "mkl_vml_functions.h" 

However, here comes a problem of using MKL FFT memory model (DFTI_CONJUGATE_EVEN_STORAGE  in packed memory format ), I don't know how to access each element in the spatial domain, how to build the matrix back in packed format, and most important is how to make this thing work extremely fast.  

I'm looking for functions that already know how to work with packed format and execute such functionality on packed format matrix, 

Are there functions that gives such functionality? 

Do I need to write this functionally by myself ? How to access each matrix element ? 

2nd, I'm also want to do FFT shift in the spatial domain by doing (-1)^(i+j) for each element. Is there a function that can do such thing (perhaps matrix pixel wise multiplication) ? Working with packed format. 

 

Thanks 

 

 

 

 

Thread Topic: 

Question

Viewing all articles
Browse latest Browse all 2652

Trending Articles