IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1939


Ignore:
Timestamp:
Sep 30, 2004, 1:06:36 PM (22 years ago)
Author:
gusciora
Message:

Removed some test code.

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImageStats.c

    r1898 r1939  
    1010*  @author George Gusciora, MHPCC
    1111*
    12 *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-09-25 19:11:01 $
     12*  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-09-30 23:06:36 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    195195}
    196196
    197 psPolynomial1D* *p_psCreateChebyshevPolys(int maxChebyPoly)
     197psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly)
    198198{
    199199    psPolynomial1D **chebPolys = NULL;
     
    247247    float *cScalingFactors = NULL;
    248248    float *rScalingFactors = NULL;
    249     float tmp = 0.0;
    250249
    251250    // Create the sums[][] data structure.  This
     
    258257        sums[i] = (float *)psAlloc(coeffs->nY * sizeof(float));
    259258    }
    260 
    261259    // We scale the pixel positions to values
    262260    // between -1.0 and 1.0
     
    272270    chebPolys = p_psCreateChebyshevPolys(maxChebyPoly);
    273271
    274     // Sanity check for the Chebyshevs.
    275     for (i = 0; i < coeffs->nX; i++) {
    276         for (j = 0; j < coeffs->nY; j++) {
    277             tmp = 0.0;
    278             for (x = 0; x < input->numRows; x++) {
    279                 tmp +=
    280                     psPolynomial1DEval
    281                     (rScalingFactors[x], chebPolys[i]) * psPolynomial1DEval(rScalingFactors[x], chebPolys[j]);
    282 
     272
     273    /*
     274        // Sanity check for the Chebyshevs.
     275        for (i = 0; i < coeffs->nX; i++) {
     276            for (j = 0; j < coeffs->nY; j++) {
     277                tmp = 0.0;
     278                for (x = 0; x < input->numRows; x++) {
     279                    tmp +=
     280                        psPolynomial1DEval
     281                        (rScalingFactors[x], chebPolys[i]) * psPolynomial1DEval(rScalingFactors[x], chebPolys[j]);
     282     
     283                }
     284                // printf("SUM(Cheby(%d) * Cheby(%d))
     285                // is %f\n", i, j, tmp);
    283286            }
    284             // printf("SUM(Cheby(%d) * Cheby(%d))
    285             // is %f\n", i, j, tmp);
    286         }
    287     }
     287        }
     288    */
    288289
    289290    // Compute the sums[][] data structure.
     
    295296                    sums[i][j] +=
    296297                        input->data.F32[x][y] *
    297                         psPolynomial1DEval
    298                         (rScalingFactors[x],
    299                          chebPolys[i]) * psPolynomial1DEval(cScalingFactors[y], chebPolys[j]);
     298                        psPolynomial1DEval(rScalingFactors[x], chebPolys[i]) *
     299                        psPolynomial1DEval(cScalingFactors[y], chebPolys[j]);
    300300                }
    301301            }
  • trunk/psLib/src/imageops/psImageStats.c

    r1898 r1939  
    1010*  @author George Gusciora, MHPCC
    1111*
    12 *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-09-25 19:11:01 $
     12*  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-09-30 23:06:36 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    195195}
    196196
    197 psPolynomial1D* *p_psCreateChebyshevPolys(int maxChebyPoly)
     197psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly)
    198198{
    199199    psPolynomial1D **chebPolys = NULL;
     
    247247    float *cScalingFactors = NULL;
    248248    float *rScalingFactors = NULL;
    249     float tmp = 0.0;
    250249
    251250    // Create the sums[][] data structure.  This
     
    258257        sums[i] = (float *)psAlloc(coeffs->nY * sizeof(float));
    259258    }
    260 
    261259    // We scale the pixel positions to values
    262260    // between -1.0 and 1.0
     
    272270    chebPolys = p_psCreateChebyshevPolys(maxChebyPoly);
    273271
    274     // Sanity check for the Chebyshevs.
    275     for (i = 0; i < coeffs->nX; i++) {
    276         for (j = 0; j < coeffs->nY; j++) {
    277             tmp = 0.0;
    278             for (x = 0; x < input->numRows; x++) {
    279                 tmp +=
    280                     psPolynomial1DEval
    281                     (rScalingFactors[x], chebPolys[i]) * psPolynomial1DEval(rScalingFactors[x], chebPolys[j]);
    282 
     272
     273    /*
     274        // Sanity check for the Chebyshevs.
     275        for (i = 0; i < coeffs->nX; i++) {
     276            for (j = 0; j < coeffs->nY; j++) {
     277                tmp = 0.0;
     278                for (x = 0; x < input->numRows; x++) {
     279                    tmp +=
     280                        psPolynomial1DEval
     281                        (rScalingFactors[x], chebPolys[i]) * psPolynomial1DEval(rScalingFactors[x], chebPolys[j]);
     282     
     283                }
     284                // printf("SUM(Cheby(%d) * Cheby(%d))
     285                // is %f\n", i, j, tmp);
    283286            }
    284             // printf("SUM(Cheby(%d) * Cheby(%d))
    285             // is %f\n", i, j, tmp);
    286         }
    287     }
     287        }
     288    */
    288289
    289290    // Compute the sums[][] data structure.
     
    295296                    sums[i][j] +=
    296297                        input->data.F32[x][y] *
    297                         psPolynomial1DEval
    298                         (rScalingFactors[x],
    299                          chebPolys[i]) * psPolynomial1DEval(cScalingFactors[y], chebPolys[j]);
     298                        psPolynomial1DEval(rScalingFactors[x], chebPolys[i]) *
     299                        psPolynomial1DEval(cScalingFactors[y], chebPolys[j]);
    300300                }
    301301            }
Note: See TracChangeset for help on using the changeset viewer.