Changeset 6186 for trunk/psLib/src/imageops/psImageStats.c
- Timestamp:
- Jan 23, 2006, 12:25:31 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageStats.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageStats.c
r5841 r6186 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.8 6$ $Name: not supported by cvs2svn $12 * @date $Date: 200 5-12-24 00:33:17$11 * @version $Revision: 1.87 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2006-01-23 22:25:31 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 212 212 213 213 return (scalingFactors); 214 }215 216 // XXX: Use a static array of Chebyshev polynomials.217 psPolynomial1D **p_psCreateChebyshevPolys(psS32 maxChebyPoly)218 {219 PS_ASSERT_INT_POSITIVE(maxChebyPoly, NULL);220 psPolynomial1D **chebPolys = NULL;221 psS32 i = 0;222 psS32 j = 0;223 224 chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * sizeof(psPolynomial1D *));225 for (i = 0; i < maxChebyPoly; i++) {226 // XXX: verify this, poly nOrder/nTerms change.227 chebPolys[i] = psPolynomial1DAlloc(i, PS_POLYNOMIAL_ORD);228 }229 230 // Create the Chebyshev polynomials.231 // Polynomial i has i-th order.232 chebPolys[0]->coeff[0] = 1;233 chebPolys[1]->coeff[1] = 1;234 for (i = 2; i < maxChebyPoly; i++) {235 for (j = 0; j < (1 + chebPolys[i - 1]->nX); j++) {236 chebPolys[i]->coeff[j + 1] = 2 * chebPolys[i - 1]->coeff[j];237 }238 for (j = 0; j < (1 + chebPolys[i - 2]->nX); j++) {239 chebPolys[i]->coeff[j] -= chebPolys[i - 2]->coeff[j];240 }241 }242 243 return (chebPolys);244 214 } 245 215 … … 302 272 // Determine how many Chebyshev polynomials 303 273 // are needed, then create them. 304 // XXX: record eor verify the poly order/nterm change274 // XXX: record or verify the poly order/nterm change 305 275 maxChebyPoly = coeffs->nX; 306 276 if (coeffs->nY > coeffs->nX) {
Note:
See TracChangeset
for help on using the changeset viewer.
