Changeset 36375 for trunk/ppSim/src/ppSimSmoothReadout.c
- Timestamp:
- Dec 10, 2013, 2:55:11 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppSim/src/ppSimSmoothReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/ppSim/src/ppSimSmoothReadout.c
r29002 r36375 4 4 { 5 5 bool status; 6 psTimerStart ("ppSmooth"); 6 7 7 // XXX use these defaults?8 // float minGauss = 0.1;9 float nSigma = 4.0; 8 float nSigma = psMetadataLookupF32(&status, recipe, "CONVOLVE.NSIGMA"); // SIGMA convolutions (pixels) 9 if (!status) nSigma = 5.0; 10 10 11 float sigma = psMetadataLookupF32(&status, recipe, "SEEING"); // Seeing SIGMA (pixels) 11 12 12 // bool oldThreads = psImageConvolveSetThreads(true); // Old value of threading in psImageConvolve 13 char *modelName = psMetadataLookupStr(&status, recipe, "PSF.MODEL"); // Seeing SIGMA (pixels) 14 if (!strcmp (modelName, "PS_MODEL_GAUSS")) { 15 // bool oldThreads = psImageConvolveSetThreads(true); // Old value of threading in psImageConvolve 16 // smooth the image in place, applying the mask as we go 17 psImageSmooth(input->image, sigma, nSigma); 18 psLogMsg("ppSmooth", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("ppSmooth")); 19 return true; 20 } 13 21 14 psTimerStart ("ppSmooth"); 22 if (!strcmp (modelName, "PS_MODEL_PS1_V1")) { 23 // bool oldThreads = psImageConvolveSetThreads(true); // Old value of threading in psImageConvolve 24 // smooth the image in place, applying the mask as we go 25 psImageSmooth2dCacheData *smdata = psImageSmooth2dCacheAlloc(nSigma); 26 psImageSmooth2dCacheKernel_PS1_V1 (smdata, sigma, 1.0); 15 27 16 // smooth the image in place, applying the mask as we go 17 psImageSmooth(input->image, sigma, nSigma); 18 psLogMsg("ppSmooth", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("ppSmooth")); 28 psImageSmooth2dCache_F32 (input->image, smdata); 29 30 psFree (smdata); 31 psLogMsg("ppSmooth", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("ppSmooth")); 32 return true; 33 } 19 34 20 35 // psImageConvolveSetThreads(oldThreads); 21 return true; 36 psLogMsg("ppSmooth", PS_LOG_MINUTIA, "failed to smooth image: %f sec\n", psTimerMark("ppSmooth")); 37 return false; 22 38 } 23 39
Note:
See TracChangeset
for help on using the changeset viewer.
