IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 11, 2007, 11:20:24 AM (19 years ago)
Author:
magnier
Message:

fixed overscan / image offsets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmBias.c

    r13754 r13755  
    298298                psImage *overscan = NULL; // Overscan image from iterator
    299299                while ((overscan = psListGetAndIncrement(iter))) {
    300                     // the overscan and image may not be aligned.  pixels->data represents the
    301                     // image row pixels. 
     300                    // the overscan and image might not be aligned.  pixels->data represents
     301                    // the image row pixels.
    302302                    int diff = overscan->row0 - image->row0; // Offset between the two regions
    303303                    for (int i = PS_MAX(0,diff); i < PS_MIN(image->numRows, overscan->numRows + diff); i++) {
     
    345345                psImage *overscan = NULL; // Overscan image from iterator
    346346                while ((overscan = psListGetAndIncrement(iter))) {
    347                     int diff = image->col0 - overscan->col0; // Offset between the two regions
     347                    // the overscan and image might not be aligned.  pixels->data represents
     348                    // the image row pixels.
     349                    int diff = overscan->col0 - image->col0; // Offset between the two regions
    348350                    for (int i = PS_MAX(0,diff); i < PS_MIN(image->numCols, overscan->numCols + diff); i++) {
    349                         // i is column on overscan
     351                        int I = i - diff;
     352                        // i is column on image
     353                        // I is column on overscan
    350354                        psVector *values = pixels->data[i];
    351355                        int index = values->n; // Index in the vector
    352356                        values = psVectorRealloc(values, values->n + overscan->numRows);
    353                         for (int j = 0; j < overscan->numRows; j++) {
    354                             values->data.F32[index++] = overscan->data.F32[j][i];
     357                        for (int J = 0; J < overscan->numRows; J++) {
     358                            values->data.F32[index++] = overscan->data.F32[J][I];
    355359                        }
    356360                        values->n += overscan->numRows;
Note: See TracChangeset for help on using the changeset viewer.