IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

fixed overscan / image offsets

File:
1 edited

Legend:

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

    r12696 r13754  
    298298                psImage *overscan = NULL; // Overscan image from iterator
    299299                while ((overscan = psListGetAndIncrement(iter))) {
    300                     int diff = image->row0 - overscan->row0; // Offset between the two regions
     300                    // the overscan and image may not be aligned.  pixels->data represents the
     301                    // image row pixels. 
     302                    int diff = overscan->row0 - image->row0; // Offset between the two regions
    301303                    for (int i = PS_MAX(0,diff); i < PS_MIN(image->numRows, overscan->numRows + diff); i++) {
    302                         // i is row on overscan
     304                        int j = i - diff;
     305                        // i is row on image
     306                        // j is row on overscan
    303307                        psVector *values = pixels->data[i];
    304308                        int index = values->n; // Index in the vector
    305309                        values = psVectorRealloc(values, values->n + overscan->numCols);
    306310                        values->n += overscan->numCols;
    307                         memcpy(&values->data.F32[index], overscan->data.F32[i],
     311                        memcpy(&values->data.F32[index], overscan->data.F32[j],
    308312                               overscan->numCols * PSELEMTYPE_SIZEOF(PS_TYPE_F32));
    309313                        index += overscan->numCols;
Note: See TracChangeset for help on using the changeset viewer.