IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15334


Ignore:
Timestamp:
Oct 18, 2007, 3:28:21 PM (19 years ago)
Author:
Paul Price
Message:

Attempting to fix apparent half-pixel errors in warping sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpTransformReadout_Opt.c

    r14902 r15334  
    179179            pswarpMap *map = sourceGrid->maps[xGrid][yGrid]; // Locally linear transformation
    180180            double xOut, yOut;          // Output coordinates
    181             if (!pswarpMapApply(&xOut, &yOut, map, xIn, yIn)) {
     181            if (!pswarpMapApply(&xOut, &yOut, map, xIn + 0.5, yIn + 0.5)) {
    182182                psError(PS_ERR_UNKNOWN, false, "Unable to transform coordinates for source at %f,%f\n",
    183183                        xIn, yIn);
     
    186186                return false;
    187187            }
    188             xOut += outCol0;
    189             yOut += outRow0;
     188            xOut += outCol0 - 0.5;
     189            yOut += outRow0 - 0.5;
    190190            if (xOut < minX || xOut > maxX || yOut < minY || yOut > maxY) {
    191191                // It's not in the output image
Note: See TracChangeset for help on using the changeset viewer.