IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2007, 12:59:04 PM (19 years ago)
Author:
eugene
Message:

accepting updates from HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20071023/psModules/src/imcombine/pmSubtractionKernels.c

    r15399 r15516  
    44
    55#include <stdio.h>
    6 #include <string.h>
     6#include <strings.h>
    77#include <pslib.h>
    88
     
    488488    PS_ASSERT_INT_NONNEGATIVE(spatialOrder, NULL);
    489489    PS_ASSERT_INT_NONNEGATIVE(inner, NULL);
    490     PS_ASSERT_INT_LESS_THAN(inner, size, NULL);
     490    PS_ASSERT_INT_LESS_THAN_OR_EQUAL(inner, size, NULL);
    491491    PS_ASSERT_INT_NONNEGATIVE(ringsOrder, NULL);
    492492
     
    572572                    for (int v = -size; v <= size; v++) {
    573573                        int v2 = PS_SQR(v);   // Square of v
    574                         float vPoly = power(v, vOrder); // Value of v^vOrder
     574//                        float vPoly = power(v, vOrder); // Value of v^vOrder
     575                        float vPoly = powf(v/(float)size, vOrder); // Value of v^vOrder
    575576
    576577                        for (int u = -size; u <= size; u++) {
     
    578579                            int distance2 = u2 + v2; // Distance from the centre
    579580                            if (distance2 > lower2 && distance2 < upper2) {
    580                                 float uPoly = power(u, uOrder); // Value of u^uOrder
     581//                                float uPoly = power(u, uOrder); // Value of u^uOrder
     582                                float uPoly = powf(u/(float)size, uOrder); // Value of u^uOrder
    581583
    582584                                float polyVal = uPoly * vPoly; // Value of polynomial
Note: See TracChangeset for help on using the changeset viewer.