IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 22, 2005, 12:49:29 PM (21 years ago)
Author:
gusciora
Message:

Implementing the psPoly nOrder/nTerm switch.

File:
1 edited

Legend:

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

    r4547 r5096  
    2828
    2929testDescription tests[] = {
    30                               {testPsImageHistogram,0,"psImageHistogram",0,false},
    31                               {testPsImageStats,1,"psImageStats",0,false},
    32                               {testPsImageFitPolynomial,2,"psImageFitPolynomial",0,false},
    33                               {testPsImagePixelInterpolate,3,"psImagePixelInterpolate",0,false},
    34                               {testPsImageEvalPolynom,4,"psImageEvalPolynom()",0,false},
     30                              {testPsImageHistogram, 0, "psImageHistogram", 0, false},
     31                              {testPsImageStats, 1, "psImageStats", 0, false},
     32                              {testPsImageFitPolynomial, 2, "psImageFitPolynomial", 0, false},
     33                              {testPsImagePixelInterpolate, 3, "psImagePixelInterpolate", 0, false},
     34                              {testPsImageEvalPolynom, 4, "psImageEvalPolynom()", 0, false},
    3535                              {NULL}
    3636                          };
     
    3838psS32 main(psS32 argc, char* argv[])
    3939{
     40    psLogSetFormat("HLNM");
    4041    psLogSetLevel(PS_LOG_INFO);
    4142
     
    374375}
    375376
     377// HEY: XXX
    376378static psS32 testPsImageFitPolynomial()
    377379{
    378     const int IMAGE_SIZE = 64;
     380    const int IMAGE_SIZE = 16;
    379381    const int CHEBY_X_DIM = 8;
    380382    const int CHEBY_Y_DIM = 8;
     
    406408        }
    407409    }
    408     my2DPoly = psPolynomial2DAlloc( CHEBY_X_DIM, CHEBY_Y_DIM, PS_POLYNOMIAL_CHEB );
     410    my2DPoly = psPolynomial2DAlloc( CHEBY_X_DIM-1, CHEBY_Y_DIM-1, PS_POLYNOMIAL_CHEB );
    409411    /*************************************************************************/
    410412    /*  Calculate Chebyshev Polynomials, no mask                     */
    411413    /*************************************************************************/
    412414    my2DPoly = psImageFitPolynomial( my2DPoly, tmpImage );
     415    if (my2DPoly == NULL) {
     416        printf("TEST ERROR: psImageFitPolynomial() returned NULL.\n");
     417        testStatus = false;
     418    }
    413419    for ( i = 0;i < CHEBY_X_DIM;i++ ) {
    414420        for ( j = 0;j < CHEBY_Y_DIM;j++ ) {
     
    447453        }
    448454    }
    449 
    450455
    451456    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error message for NULL coeffs argument.");
Note: See TracChangeset for help on using the changeset viewer.