Changeset 17460
- Timestamp:
- Apr 21, 2008, 8:19:14 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080413/psphot/src/pmFootprintArrayGrow.c
r17443 r17460 8 8 assert (footprints->n == 0 || pmFootprintTest(footprints->data[0])); 9 9 10 psTimerStart ("grow"); 11 10 12 if (footprints->n == 0) { // we don't know the size of the footprint's region 11 13 return psArrayAlloc(0); … … 16 18 */ 17 19 psImage *idImage = pmSetFootprintArrayIDs(footprints, true); 20 psLogMsg ("psphot", PS_LOG_DETAIL, "set footprint array IDs: %f sec\n", psTimerMark ("grow")); 21 18 22 if (r <= 0) { 19 23 r = 1; // r == 1 => no grow … … 32 36 } 33 37 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 34 45 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")); 35 49 psFree(circle); 36 50 37 51 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 38 54 assert (grown != NULL); 39 55 psFree(idImage); psFree(grownIdImage); … … 46 62 psFree((psArray *)peaks); 47 63 64 psLogMsg ("psphot", PS_LOG_DETAIL, "finished grow: %f sec\n", psTimerMark ("grow")); 65 48 66 return grown; 49 67
Note:
See TracChangeset
for help on using the changeset viewer.
