IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31359


Ignore:
Timestamp:
Apr 24, 2011, 9:41:09 PM (15 years ago)
Author:
eugene
Message:

fix a typo in a comment; psImageMask/KeepOps were off by 0.5 pixels

Location:
branches/eam_branches/ipp-20110404/psLib/src/imageops
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/psLib/src/imageops/psImageGeomManip.c

    r23989 r31359  
    702702    } \
    703703    /* note: output(i,j) = input(i+0.5-dx,j+0.5-dy) */ \
    704     /* positive dx,dy moves pixel i-dx,j-dy to i,y */ \
     704    /* positive dx,dy moves pixel i-dx,j-dy to i,j */ \
    705705    /* also: pixel center is 0.5,0.5 */ \
    706706    for (int row = 0; row < numRows; row++) { \
  • branches/eam_branches/ipp-20110404/psLib/src/imageops/psImageMaskOps.c

    r25753 r31359  
    146146    for (int iy = 0; iy < image->numRows; iy++) { \
    147147        for (int ix = 0; ix < image->numCols; ix++) { \
    148             dx = ix + image->col0 - x; \
    149             dy = iy + image->row0 - y; \
     148            dx = ix + 0.5 + image->col0 - x; \
     149            dy = iy + 0.5 + image->row0 - y; \
    150150            r2 = PS_SQR(dx) + PS_SQR(dy); \
    151151            if (r2 <= R2) { \
     
    197197    for (int iy = 0; iy < image->numRows; iy++) { \
    198198        for (int ix = 0; ix < image->numCols; ix++) { \
    199             dx = ix + image->col0 - x; \
    200             dy = iy + image->row0 - y; \
     199            dx = ix + 0.5 + image->col0 - x; \
     200            dy = iy + 0.5 + image->row0 - y; \
    201201            r2 = PS_SQR(dx) + PS_SQR(dy); \
    202202            if (r2 > R2) { \
Note: See TracChangeset for help on using the changeset viewer.