By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,413 Members | 998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,413 IT Pros & Developers. It's quick & easy.

2D convolution

P: n/a
Hi, Friends:

May I know what's the fastest way to implement 1D/2D convolution?

Thanks & Regards
Hongning.
Jul 12 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a

Ruan Hongning wrote:
Hi, Friends:

May I know what's the fastest way to implement 1D/2D convolution?
Buy a book on DSP and read it?

My guess is a for loop and multiplications.

Tom

Jul 12 '06 #2

P: n/a
On Wed, 12 Jul 2006 07:04:56 -0700, Tom St Denis wrote:
>
Ruan Hongning wrote:
>Hi, Friends:

May I know what's the fastest way to implement 1D/2D convolution?

Buy a book on DSP and read it?

My guess is a for loop and multiplications.

Tom
Off topic, I think. sci.math.num-analysis perhaps?
For what it's worth I've found that (my implementation of)
1D convolution via the fft is faster than the straightforward
implementation for (double) vectors of length greater than 64,
and slower otherwise, on a common or garden pc using gcc.
Implementing convolution using the fft is discussed in numerical
recipes, for example.
Duncan

Jul 12 '06 #3

P: n/a
On Wed, 12 Jul 2006 17:28:50 +0800, "Ruan Hongning"
<rh******@dso.org.sgwrote:
>Hi, Friends:

May I know what's the fastest way to implement 1D/2D convolution?
Use an analog computer. If you must use an algorithm on a digital
computer, ask in comp.programming.

--
Al Balmer
Sun City, AZ
Jul 12 '06 #4

P: n/a
Ruan Hongning wrote:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
Do whatever you need to do to stop your newsreader (Outlook Express, of
course) from posting in HTML.

Brian
Jul 12 '06 #5

P: n/a
I've known the algorithm clearly. What i want to know its implementation in
C.

In <<Numerical Recipe in C>>, it suggested computing convolution via fft. We
have known that convolution is also a filtering. That means we can compute
it via its definition. If one matrix's size is big, another one is very
small, e.g. 3x3, how about the computation time for these two methods ?

Thanks & Regards
Hongning.

"Duncan Muirhead" <no***@this.addresswrote in message
news:pa****************************@this.address.. .
On Wed, 12 Jul 2006 07:04:56 -0700, Tom St Denis wrote:
>>
Ruan Hongning wrote:
>>Hi, Friends:

May I know what's the fastest way to implement 1D/2D convolution?

Buy a book on DSP and read it?

My guess is a for loop and multiplications.

Tom
Off topic, I think. sci.math.num-analysis perhaps?
For what it's worth I've found that (my implementation of)
1D convolution via the fft is faster than the straightforward
implementation for (double) vectors of length greater than 64,
and slower otherwise, on a common or garden pc using gcc.
Implementing convolution using the fft is discussed in numerical
recipes, for example.
Duncan

Jul 13 '06 #6

P: n/a

Ruan Hongning wrote:
I've known the algorithm clearly. What i want to know its implementation in
C.

In <<Numerical Recipe in C>>, it suggested computing convolution via fft. We
have known that convolution is also a filtering. That means we can compute
it via its definition. If one matrix's size is big, another one is very
small, e.g. 3x3, how about the computation time for these two methods ?
Ah, homework questions.

T'is the season to be cheatin'

I'm sorry but IIRC a basic convolution is what? a MAC operation? Not
exactly challenging in C [and totally OT for this group too]. for loop
+ multiplication + array lookups + addition? What am I missing?

Oh you want someone to write out the code for you?

Tom

Jul 13 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.