IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 18, 2012, 1:37:31 AM (14 years ago)
Author:
mhuber
Message:

rough fix for odd stack convolution when first image is rejected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackSources.c

    r31158 r34174  
    461461
    462462        // XXX something of a hack: require at least 2 detections or the nominated fraction of the max possible
    463         int minMatches = PS_MAX(2, fracMatch * num);// Minimum number of matches required
     463        //int minMatches = PS_MAX(2, fracMatch * num);// Minimum number of matches required
     464        //MEH - if many poor images, will hit oddity with num fraction. use numGoodImages instead
     465        int minMatches = PS_MAX(2, fracMatch * numGoodImages);// Minimum number of matches required
     466
     467        int good0 = 0;
     468        for (int i = 0; i < num; i++) {
     469            if (inputMask->data.U8[i]) {
     470                continue;
     471            }
     472            good0 = i;
     473            break;
     474        }
     475
    464476        for (int i = 0; i < matches->n; i++) {
    465477            pmSourceMatch *match = matches->data[i]; // Match of interest
     
    469481
    470482            // We need to grab a single instance of this source: just take the first available
    471             int image = match->image->data.S32[0]; // Index of image
    472             int index = match->index->data.S32[0]; // Index of source within image
     483            // MEH - if first available is a rejected image, then problem. so take first non-rejected instance above
     484            //int image = match->image->data.S32[0]; // Index of image
     485            //int index = match->index->data.S32[0]; // Index of source within image
     486            int image = match->image->data.S32[good0]; // Index of image
     487            int index = match->index->data.S32[good0]; // Index of source within image
    473488            psArray *sources = sourceLists->data[image]; // Sources for image
    474489            pmSource *source = sources->data[index]; // Source of interest
Note: See TracChangeset for help on using the changeset viewer.