Changeset 25043
- Timestamp:
- Aug 10, 2009, 5:00:09 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpTransformReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpTransformReadout.c
r24494 r25043 178 178 psTrace("pswarp.transform", 1, "No overlap\n"); 179 179 } 180 181 // Store the variance factor and number of good pixels182 if (goodPixels > 0) {183 // Variance factor: large factor --> small scale184 float varFactor = psImageInterpolateVarianceFactor(input->image->numCols / 2.0 + input->image->col0,185 input->image->numRows / 2.0 + input->image->row0,186 interp->mode);187 psMetadataItem *vfItem = psMetadataLookup(output->analysis, PSWARP_ANALYSIS_VARFACTOR);188 if (vfItem) {189 psMetadataItem *goodpixItem = psMetadataLookup(output->analysis, PSWARP_ANALYSIS_GOODPIX);190 psAssert(goodpixItem, "It should be where we left it!");191 psAssert(vfItem->type == PS_TYPE_F32 && goodpixItem->type == PS_TYPE_S64,192 "Should be the type we said.");193 194 vfItem->data.F32 += varFactor * goodPixels;195 goodpixItem->data.S64 += goodPixels;196 } else {197 psMetadataAddF32(output->analysis, PS_LIST_TAIL, PSWARP_ANALYSIS_VARFACTOR, 0,198 "Variance factor weighted by the good pixels", varFactor * goodPixels);199 psMetadataAddS64(output->analysis, PS_LIST_TAIL, PSWARP_ANALYSIS_GOODPIX, 0,200 "Number of good pixels", goodPixels);201 }202 }203 180 psFree(interp); 204 181
Note:
See TracChangeset
for help on using the changeset viewer.
