IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2008, 12:44:56 PM (18 years ago)
Author:
Paul Price
Message:

Optimising psImageConvolveFFT. Made a couple of optimisations: 1. Moved code into psImageFFT.c, so I can use FFTW directly. FFTW, through its 'advanced interface' allows two FFTs to be performed at the same time and 'the resulting plans can often be faster than calling FFTW multiple times for the individual transforms' (FFTW 3.1.2 manual, p30). 2. The convolved image needs to be normalised because FFTW doesn't take out the sqrt(N) factors in the FFT. Instead of multiplying the entire convolved image, we can multiply the much smaller number of pixels in the kernel. Tested this code with tap_psImageConvolve2 and it seems to work. Running convolutionBench unoptimised on mithrandir produces times that are comparable to what I got a while back running optimised. Running it optimized on alala produces speed-ups ranging from 25 to 350%.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/imageops/convolutionBench.c

    r14866 r17320  
    4747            psKernel *kernel = generateKernel(kernelCols, kernelRows);
    4848            psTimerStart("fft");
    49             psImage *convolved = psImageConvolveFFT(image, NULL, 0, kernel, 0.0);
     49            psImage *convolved = psImageConvolveFFT(NULL, image, NULL, 0, kernel);
    5050            fft += psTimerMark("fft");
    5151            psFree(convolved);
Note: See TracChangeset for help on using the changeset viewer.