IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21482


Ignore:
Timestamp:
Feb 15, 2009, 9:50:40 AM (17 years ago)
Author:
eugene
Message:

fix error on psImageBicubeMin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20090208/psLib/src/math/psPolynomialUtils.c

    r21445 r21482  
    193193    min.y = yn / det;
    194194
     195    // sigma_xn^2 / xn^2 = sigma_11^2 / C11
     196
    195197    // without a supplied error, we calculate the normalized error
    196     double detErr2 = 4.0*PS_SQR(poly->coeff[1][1])/6.0 + 8.0*PS_SQR(poly->coeff[0][2]) + 8.0*PS_SQR(poly->coeff[2][0]);
    197     double xnErr2 = PS_SQR(poly->coeff[0][1])/6.0 + PS_SQR(poly->coeff[1][1])/6.0 + 2.0*PS_SQR(poly->coeff[1][0]) + 4.0*PS_SQR(poly->coeff[0][2])/6.0;
    198     double ynErr2 = PS_SQR(poly->coeff[1][0])/6.0 + PS_SQR(poly->coeff[1][1])/6.0 + 2.0*PS_SQR(poly->coeff[0][1]) + 4.0*PS_SQR(poly->coeff[2][0])/6.0;
    199 
    200     min.xErr = min.x * sqrt(xnErr2 / PS_SQR(xn) + detErr2 / PS_SQR(det));
    201     min.yErr = min.y * sqrt(ynErr2 / PS_SQR(yn) + detErr2 / PS_SQR(det));
     198    double fdetErr2 = 0.5/PS_SQR(poly->coeff[0][2]) + 0.5/PS_SQR(poly->coeff[2][0]) + 4.0/(6.0*PS_SQR(poly->coeff[1][1]));
     199    double fxnErr2 = 1.0/(6.0*PS_SQR(poly->coeff[0][1])) + 1.0/(6.0*PS_SQR(poly->coeff[1][0])) + 1.0/(6.0*PS_SQR(poly->coeff[1][1])) + 0.5/PS_SQR(poly->coeff[0][2]);
     200    double fynErr2 = 1.0/(6.0*PS_SQR(poly->coeff[0][1])) + 1.0/(6.0*PS_SQR(poly->coeff[1][0])) + 1.0/(6.0*PS_SQR(poly->coeff[1][1])) + 0.5/PS_SQR(poly->coeff[2][0]);
     201
     202    min.xErr = fabs(min.x) * sqrt(fxnErr2 + fdetErr2);
     203    min.yErr = fabs(min.y) * sqrt(fynErr2 + fdetErr2);
    202204
    203205    return min;
Note: See TracChangeset for help on using the changeset viewer.