IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 14, 2005, 2:12:09 PM (21 years ago)
Author:
desonia
Message:

fixed image FFT and image convolution. The FFTW call had the wrong order
of dimensions, and the scaling was incorrect.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/image/tst_psImageFFT.c

    r3682 r3702  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-04-07 20:27:42 $
     8 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-04-15 00:12:09 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6868
    6969    // 1. assign a image to a radial sinisoid
    70     GENIMAGE(img,m,n,F32, sinf((32.0f-row)/16.0f*PS_PI)+sinf((64.0f-col)/32.0f*PS_PI));
     70    GENIMAGE(img,m,n,F32, sinf((32.0f-row)/32.0f*PS_PI)+sinf((64.0f-col)/64.0f*PS_PI));
    7171
    7272    // 2. perform a forward transform
     
    8888            psF32 mag = cabsf(img2Row[col])/m/n;
    8989            if (mag > 0.1f) {
    90                 // must be (0,1) or (0,n-1) or (1,0) or (n-1,0)
     90                // must be (0,1) or (0,n-1) or (1,0) or (m-1,0)
    9191                if (! (col == 0 && (row == 1 || row == n-1))
    92                         && ! (row == 0 && (col==1 || col == n-1)) ) {
     92                        && ! (row == 0 && (col==1 || col == m-1)) ) {
    9393                    psError(PS_ERR_UNKNOWN, true,"Result invalid at %d,%d (%.2f)",col,row,mag);
    9494                    return 3;
     
    9696            } else
    9797                if ( (col == 0 && (row == 1 || row == n-1))
    98                         || (row == 0 && (col==1 || col == n-1)) ) {
     98                        || (row == 0 && (col==1 || col == m-1)) ) {
    9999                    psError(PS_ERR_UNKNOWN, true,"Result invalid at %d,%d (%.2f)",col,row,mag);
    100100                    return 4;
Note: See TracChangeset for help on using the changeset viewer.