home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!wupost!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!thinkage!atbowler
- From: atbowler@thinkage.on.ca (Alan Bowler)
- Newsgroups: comp.programming
- Subject: Re: Morphology and Convolution
- Keywords: morphology,convolution,aaaaargh
- Message-ID: <1992Aug26.002016.13961@thinkage.on.ca>
- Date: 26 Aug 92 00:20:16 GMT
- References: <1992Aug25.160119.28049@linus.mitre.org>
- Organization: /etc/organization
- Lines: 22
-
- In article <1992Aug25.160119.28049@linus.mitre.org> bdickens@el_padre.mitre.org (Brian Dickens) writes:
- >I am trying to perform convolution on a rectangular matrix of numbers. I have a program
- >which does basically what I want to do, but it does it 20 times faster than my program. There
- >is a rather straightforward brute force algorithm to do it, which I'm using, but I think there
- >might be a better way.
- >
- >I have two input matrices... one of bytes, and one of floating point numbers. The floating
- >point numbers are used as a sliding window over the data, and for each square on the data,
- >the corresponding number on the floating point window is multiplied by the data value, and
- >the results of all these multiplications are summed up and stored in the output matrix.
- >
- >The concept is much like local averaging, but more flexible, because the priorities of each
- >square can be adjusted.
-
- You want to look at using a Fast Fourier transform. You do a forward
- transform on both the input, and the fixed numbers. do a point by
- point multiply (N operations) and then do a reverse transform. Since
- the fixed numbers are constant, you only need to do the forward
- transform on them. I once worked on a integer version of this,
- but given the speed of modern floating point hardware, and all integer
- version is not worth the hassles it intoduces. A good time time
- series analysis library may have all the stuff you need.
-