Changeset 28303
- Timestamp:
- Jun 10, 2010, 4:50:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20100610/ppStack/src/ppStackTarget.c
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/ppStack/src/ppStackTarget.c merged eligible /branches/czw_branch/20100427/ppStack/src/ppStackTarget.c 27784-28042 /branches/haf_branches/ipp.20100512/ppStack/src/ppStackTarget.c 27935-28180 /branches/pap/ppStack/src/ppStackTarget.c 27706-28005
r28256 r28303 164 164 165 165 psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); // Statistics for background 166 float mean = NAN; // Measured mean variance 166 167 if (!psImageBackground(bg, NULL, variance, mask, maskVal, rng)) { 167 psError(PPSTACK_ERR_DATA, false, "Can't measure background for image."); 168 psFree(rng); 169 return NULL; 168 psErrorClear(); 169 // Retry using all the available pixels 170 bg->nSubsample = variance->numCols * variance->numRows + 1; 171 if (!psImageStats(bg, variance, mask, maskVal)) { 172 psLogMsg("ppStack", PS_LOG_DETAIL, 173 "Couldn't measure mean variance for image %d; retrying.", i); 174 psErrorClear(); 175 // Retry with desperate statistic 176 bg->options = PS_STAT_SAMPLE_MEAN; 177 if (!psImageStats(bg, variance, mask, maskVal)) { 178 psWarning("Unable to measure mean variance for image %d --- rejecting.", i); 179 psErrorStackPrint(stderr, "Unable to measure mean variance for image %d", i); 180 options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] |= PPSTACK_MASK_PSF; 181 goto DONE; 182 } else { 183 // Desperate retry 184 mean = bg->sampleMean; 185 } 186 } else { 187 // Retry with all available pixels 188 mean = bg->robustMedian; 189 } 190 } else { 191 // First attempt 192 mean = bg->robustMedian; 170 193 } 171 194 … … 177 200 } 178 201 202 DONE: 203 psFree(bg); 179 204 if (!ppStackFilesIterateUp(config)) { 180 205 psFree(rng); -
Property svn:mergeinfo
set to (toggle deleted branches)
Note:
See TracChangeset
for help on using the changeset viewer.
