2D convolution

R

Ruan Hongning

Hi, Friends:

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

Thanks & Regards
Hongning.
 
T

Tom St Denis

Ruan said:
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
 
D

Duncan Muirhead

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
 
A

Al Balmer

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.
 
D

Default User

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
 
R

Ruan Hongning

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.
 
T

Tom St Denis

Ruan said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top