IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17460


Ignore:
Timestamp:
Apr 21, 2008, 8:19:14 AM (18 years ago)
Author:
eugene
Message:

convert to FFT for grow (should be dynamic based on circle size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080413/psphot/src/pmFootprintArrayGrow.c

    r17443 r17460  
    88    assert (footprints->n == 0 || pmFootprintTest(footprints->data[0]));
    99
     10    psTimerStart ("grow");
     11
    1012    if (footprints->n == 0) {           // we don't know the size of the footprint's region
    1113        return psArrayAlloc(0);
     
    1618     */
    1719    psImage *idImage = pmSetFootprintArrayIDs(footprints, true);
     20    psLogMsg ("psphot", PS_LOG_DETAIL, "set footprint array IDs: %f sec\n", psTimerMark ("grow"));
     21
    1822    if (r <= 0) {
    1923        r = 1;                          // r == 1 => no grow
     
    3236    }
    3337
     38# if (1)   
     39    psImage *f32ImageIn = psImageCopy (NULL, idImage, PS_TYPE_F32);
     40    psImage *f32ImageOut = psImageConvolveFFT(NULL, f32ImageIn, NULL, 0, circle);
     41    psImage *grownIdImage = psImageCopy (NULL, f32ImageOut, PS_TYPE_S32);
     42    psFree (f32ImageIn);
     43    psFree (f32ImageOut);
     44# else
    3445    psImage *grownIdImage = psImageConvolveDirect(NULL, idImage, circle); // Here's the actual grow step
     46# endif
     47
     48    psLogMsg ("psphot", PS_LOG_DETAIL, "convolved with grow disc: %f sec\n", psTimerMark ("grow"));
    3549    psFree(circle);     
    3650
    3751    psArray *grown = pmFootprintsFind(grownIdImage, 0.5, 1); // and here we rebuild the grown footprints
     52    psLogMsg ("psphot", PS_LOG_DETAIL, "found grown footprints: %f sec\n", psTimerMark ("grow"));
     53
    3854    assert (grown != NULL);
    3955    psFree(idImage); psFree(grownIdImage);
     
    4662    psFree((psArray *)peaks);
    4763
     64    psLogMsg ("psphot", PS_LOG_DETAIL, "finished grow: %f sec\n", psTimerMark ("grow"));
     65
    4866    return grown;
    4967   
Note: See TracChangeset for help on using the changeset viewer.