home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!linus!linus.mitre.org!el_padre.mitre.org!bdickens
- From: bdickens@el_padre.mitre.org (Brian Dickens)
- Subject: Morphology and Convolution
- Message-ID: <1992Aug25.160119.28049@linus.mitre.org>
- Keywords: morphology,convolution,aaaaargh
- Sender: news@linus.mitre.org (News Service)
- Nntp-Posting-Host: el_padre.mitre.org
- Organization: The MITRE Corporation, Bedford, MA 01730
- Date: Tue, 25 Aug 1992 16:01:19 GMT
- Lines: 23
-
- 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.
-
- Is there any way to perform the multiplication of a byte value (a la 15) by a floating point
- value (a la 0.2112) in a fast manner? i.e. conversion of the floating point number into a fraction,
- and then merely perform integer multiplication and division?
-
- -bdickens
-
- Sorry if this doesn't make sense... but I've really hit a brick wall here. The speed of the
- existing code is far too superior to mine... it's frustrating.
-
-
-