Changeset 1939 for trunk/psLib/src/imageops/psImageStats.c
- Timestamp:
- Sep 30, 2004, 1:06:36 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageStats.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageStats.c
r1898 r1939 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.3 7$ $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 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 195 195 } 196 196 197 psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly)197 psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly) 198 198 { 199 199 psPolynomial1D **chebPolys = NULL; … … 247 247 float *cScalingFactors = NULL; 248 248 float *rScalingFactors = NULL; 249 float tmp = 0.0;250 249 251 250 // Create the sums[][] data structure. This … … 258 257 sums[i] = (float *)psAlloc(coeffs->nY * sizeof(float)); 259 258 } 260 261 259 // We scale the pixel positions to values 262 260 // between -1.0 and 1.0 … … 272 270 chebPolys = p_psCreateChebyshevPolys(maxChebyPoly); 273 271 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); 283 286 } 284 // printf("SUM(Cheby(%d) * Cheby(%d)) 285 // is %f\n", i, j, tmp); 286 } 287 } 287 } 288 */ 288 289 289 290 // Compute the sums[][] data structure. … … 295 296 sums[i][j] += 296 297 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]); 300 300 } 301 301 }
Note:
See TracChangeset
for help on using the changeset viewer.
