IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 3:02:06 PM (16 years ago)
Author:
Paul Price
Message:

Implement chip mosaic for ppVizPattern. Pattern I/O is now correct: subtraction of the pattern from the pattern-subtracted image restores the original image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psModules/src/detrend/pmPattern.c

    r26845 r26847  
    8787
    8888    psImage *corr = psImageAlloc(order + 1, numRows, PS_TYPE_F64); // Corrections applied
     89    psImageInit(corr, NAN);
    8990
    9091    for (int y = 0; y < numRows; y++) {
     
    113114        }
    114115
     116        poly->coeff[0] -= background;
    115117        memcpy(corr->data.F64[y], poly->coeff, (order + 1) * PSELEMTYPE_SIZEOF(PS_TYPE_F64));
    116         corr->data.F64[y][0] -= background;
    117 
    118118        psVector *solution = psPolynomial1DEvalVector(poly, indices); // Solution vector
    119119        if (!solution) {
     
    125125
    126126        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];
    128128        }
    129129        psFree(solution);
     
    174174
    175175    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));
    177177        psVector *solution = psPolynomial1DEvalVector(poly, indices); // Solution vector
    178178        if (!solution) {
Note: See TracChangeset for help on using the changeset viewer.