- Timestamp:
- Feb 10, 2010, 3:02:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/psModules/src/detrend/pmPattern.c
r26845 r26847 87 87 88 88 psImage *corr = psImageAlloc(order + 1, numRows, PS_TYPE_F64); // Corrections applied 89 psImageInit(corr, NAN); 89 90 90 91 for (int y = 0; y < numRows; y++) { … … 113 114 } 114 115 116 poly->coeff[0] -= background; 115 117 memcpy(corr->data.F64[y], poly->coeff, (order + 1) * PSELEMTYPE_SIZEOF(PS_TYPE_F64)); 116 corr->data.F64[y][0] -= background;117 118 118 psVector *solution = psPolynomial1DEvalVector(poly, indices); // Solution vector 119 119 if (!solution) { … … 125 125 126 126 for (int x = 0; x < numCols; x++) { 127 image->data.F32[y][x] += (background - solution->data.F32[x]);127 image->data.F32[y][x] -= solution->data.F32[x]; 128 128 } 129 129 psFree(solution); … … 174 174 175 175 for (int y = 0; y < numRows; y++) { 176 memcpy(poly->coeff, corr->data.F64[y], order* PSELEMTYPE_SIZEOF(PS_TYPE_F64));176 memcpy(poly->coeff, corr->data.F64[y], (order + 1) * PSELEMTYPE_SIZEOF(PS_TYPE_F64)); 177 177 psVector *solution = psPolynomial1DEvalVector(poly, indices); // Solution vector 178 178 if (!solution) {
Note:
See TracChangeset
for help on using the changeset viewer.
