IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2011, 10:37:54 AM (15 years ago)
Author:
eugene
Message:

compile-time option for separable (but unthreaded) bilinear interpolation (which is faster?); correct psImageMaskCircle for 0.5 pixel offset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageMaskOps.c

    r25753 r31446  
    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.