フィルターのクリア

why is calculating convolution in frequency domain quicker than conv2()

2 ビュー (過去 30 日間)
justin stephens
justin stephens 2018 年 5 月 5 日
コメント済み: justin stephens 2018 年 5 月 6 日
so i have two programs written that calculate the convolution of a picture with a high-pass filter and i used tic/toc to calculate the time it took to make the calculations. it showed that ifft2(fft2(a)*fft2(b)) was faster than conv2(). could someone explain why these calculations are done faster in the frequency domain?
  2 件のコメント
Rik
Rik 2018 年 5 月 5 日
The direct calculation is the fastest method anyway, so I would image conv2 would need to do some input checking before it concludes that it is the faster method. Or maybe something else is going on. cellfun('length',A) being much faster than cellfun(@length,A) has it's roots in how the function started, although why this is still the case is a mystery to me.
justin stephens
justin stephens 2018 年 5 月 6 日
thank you very much

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by