From: ImageAnalyst on 1 Jun 2010 21:05 On Jun 1, 5:52 pm, "Steve Amphlett" <Firstname.Lastn...(a)Where-I- Work.com> wrote: > If the filter has equal coefficients, consider writing a MEX function that uses a moving buffer. The full convolution will do many more floating point ops than required. It's a good learning exercise for newcomers to MEX. ----------------------------------------------------------------------- Not sure why you say "The full convolution will do many more floating point ops than required." There is a smart way to do convolutions (actually 2 smart ways) and a dumb brainless slow way. One of the smart ways is not even that clever - it's rather obvious. I would bet that the MATLAB conv() method uses the smart way that does not do any more computations than is necessary. I know in the last release they spent a lot of time in speeding up routines, though I bet conv() has been optimized for quite some time now. Most novice users probably program up convolution the dumb way because that is the most obvious. But I agree that doing it any way could be a simple way to get used to creating MEX files.
First
|
Prev
|
Pages: 1 2 3 Prev: Proper GRNN use in Matlab Next: Filter design/implementation question |