IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21428


Ignore:
Timestamp:
Feb 9, 2009, 4:03:45 PM (17 years ago)
Author:
Paul Price
Message:

Fixing kernel for variance: not supposed to include the (sum k_ij)2
term in the normalisation.
Differing types (U8 on one side and IMAGE_MASK) for boolean on
argument list caused problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtraction.c

    r21363 r21428  
    6161    // Normalise so that the sum of the variance kernel is the square of the sum of the normal kernel
    6262    // This is required to keep the relative scaling between the image and the variance map
    63     psBinaryOp(out->image, out->image, "*", psScalarAlloc(PS_SQR(sumNormal) / sumVariance, PS_TYPE_F32));
     63    psBinaryOp(out->image, out->image, "*", psScalarAlloc(1.0 / sumVariance, PS_TYPE_F32));
    6464
    6565    return out;
     
    10871087    const psRegion *region = args->data[15]; // Region to convolve
    10881088    const pmSubtractionKernels *kernels = args->data[16]; // Kernels
    1089     bool doBG = PS_SCALAR_VALUE(args->data[17], PS_TYPE_IMAGE_MASK_DATA); // Do background subtraction?
    1090     bool useFFT = PS_SCALAR_VALUE(args->data[18], PS_TYPE_IMAGE_MASK_DATA); // Use FFT for convolution?
     1089    bool doBG = PS_SCALAR_VALUE(args->data[17], PS_TYPE_U8); // Do background subtraction?
     1090    bool useFFT = PS_SCALAR_VALUE(args->data[18], PS_TYPE_U8); // Use FFT for convolution?
    10911091
    10921092    return subtractionConvolvePatch(numCols, numRows, x0, y0, out1, out2, convMask, ro1, ro2, sys1, sys2,
Note: See TracChangeset for help on using the changeset viewer.