I was wondering if instead of zero padding an image in space domain and then taking its FT, I could take the FT first and the do something to simulate the 0 padding? This is for template matching function that I'm writing. I need zero padding because I perform convolution by taking FT of both the template and data image and then find the product of the transforms, so the 2 transforms need to match in size. I don't use conv2 function because I perform template matching with approximately 100 different scales of the template image and conv2 takes too long. I would really appreciate any suggestions. Thank you very much!
MATLAB: Equivalent of zero padding in frequency space
fourierzero padding
Best Answer