2-D convolution using the FFT

버전 1.0.0.0 (6.12 KB) 작성자: David Young
Convolution in 2-D using the Fast Fourier Transform.
다운로드 수: 3.8K
업데이트 날짜: 2011/4/11

라이선스 보기

This function can be used instead of CONV2 (with the same arguments). It will produce the same results to within a small tolerance, and may be faster in some cases (and slower in others). Two additional shape options are included, offering periodic and reflective boundary conditions.

The Convolution Theorem states that convolution in the time or space domain is equivalent to multiplication in the frequency domain. Convolution may therefore be implemented using ifft2(fft(x) .* fft(m)), where x and m are the arrays to be convolved. The fiddly part is getting the array positioning and padding right so that the results are consistent with the conventional convolution function, CONV2. CONV_FFT2 handles these problems, offering a potentially more efficent plug-in replacement for CONV2.

In practice, whether this is faster depends on many factors, of which the most important is the size of the mask (or kernel) compared to the size of the main input array (often an image). Larger masks will tend to give the FFT approach the advantage, but it is necessary to test this experimentally in any application. For small masks, CONV2 or CONVOLVE2 (available from the file exchange) may be faster.

인용 양식

David Young (2024). 2-D convolution using the FFT (https://www.mathworks.com/matlabcentral/fileexchange/31012-2-d-convolution-using-the-fft), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Fourier Analysis and Filtering에 대해 자세히 알아보기
도움

받음: Extended array indexing

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0