2
$\begingroup$

I am trying to use FFT as a fast way to convolve a image, however one of the downsides of this is that the "kernel" image will repeat when reaching the edges of the sample.

Is there a way to avoid this to make it more like a classic convolution, that cuts off at the edges?

Edge repeating

$\endgroup$

1 Answer 1

2
$\begingroup$

Zero-pad the edges of the image, then truncate the excess edge from the result

$\endgroup$
1
  • 1
    $\begingroup$ While you answer is correct, it would be good to add how much to zero-pad, truncate, etc. $\endgroup$
    – Jim Clay
    Commented Oct 8, 2014 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.