Why do i get different results when i perform convolution with different ways?

조회 수: 2 (최근 30일)
Hello ,
i have an image 30x30 and i want to perform convolution with a filter 9x9 using 2 methods . Firstly , i need to perform the convolution using conv2() and then using ifft2(fft2(image)*fft2(filter)) . Can someone explain why in the first case i get back a 38x38 result as expected ( i am aware that the result after the convolution is length(image+filter-1)) but in the second i get back a 30x30 result? Isn't supposed to be the same procedure ?

채택된 답변

Matt J
Matt J 2020년 12월 10일
편집: Matt J 2020년 12월 10일
No, it's not the same procedure. conv2 performs linear convolution, wherease your fft method performs cyclic convolution. See also,
  댓글 수: 3
Matt J
Matt J 2020년 12월 10일
The link I gave you discusses how to compare them.
Gn Gnk
Gn Gnk 2020년 12월 10일
Thank you a lot ,it really helped me !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by