IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 29, 2007, 5:50:28 PM (19 years ago)
Author:
Paul Price
Message:

Extensive changes to image subtraction codes. Discovered that I
wasn't (again) implementing the algorithm correctly --- I was
accumulating

sum_x,y C_i(x,y) sum_x,y C_j(x,y)

instead of

sum_x,y C_i(x,y) C_j(x,y)

i.e., I was doing the sums separately. I'm amazed that it was
actually getting fairly decent results before, but now it's doing it
properly. As part of this fix, added in, for each stamp, images
corresponding to the convolution of the reference with each of the
kernel components. This allows fast rejection (instead of generating
the kernel and convolving, can simply sum the individual convolutions
with the correct scaling).
Added use of FFT to do convolutions. This involved changing around
the convolvePixel function (now convolveRef, since it generates the
entire image for the convolution of the reference stamp with a kernel
component, rather than a single pixel as previously). Tested with
POIS and ISIS kernels, but no others yet. FFT is nice and fast for
the large (size = 10) kernels I've been using, so I also moved it in
to the convolveRef function for appropriate kernel types.
As part of the FFT move, discovered that my convolutions were around
the wrong way --- supposed to be convolved = image[y][x] * conv[y - v][x - u]
instead of conv[y + v][x + u]. However, this problem didn't manifest
itself previously because everything was consistently around the wrong
way. The FFT does it the Correct Way, so it revealed the problem. This
is now fixed throughout the image subtraction code.

File:
1 edited

Legend:

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

    r14636 r14701  
    5656        psRegion *region = regions->data[i]; // Region of interest
    5757        psVector *solution = solutions->data[i]; // Solution of interest
    58         if (!pmSubtractionConvolve(&convolved, NULL, NULL, image, NULL, NULL, 0, region, solution, kernels)) {
     58        if (!pmSubtractionConvolve(&convolved, NULL, NULL, image, NULL, NULL, 0,
     59                                   region, solution, kernels, true)) {
    5960            psError(PS_ERR_UNKNOWN, false, "Unable to convolve mask image in region %d.", i);
    6061            psFree(convolved);
Note: See TracChangeset for help on using the changeset viewer.