Changeset 35541
- Timestamp:
- May 9, 2013, 10:54:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419/pswarp/src/pswarpUpdateMetadata.c
r35535 r35541 48 48 psAssert(covariances, "Should be there"); 49 49 psArray *covars = psListToArray(covariances); // Array of covariance matrices 50 psKernel *covar = psImageCovarianceAverage(covars);51 psFree(covars);52 psMetadataRemoveKey(readout->analysis, PSWARP_ANALYSIS_COVARIANCES);50 if (covars->n) { 51 psKernel *covar = psImageCovarianceAverage(covars); 52 psMetadataRemoveKey(readout->analysis, PSWARP_ANALYSIS_COVARIANCES); 53 53 54 // Correct covariance matrix scale for the mean (square root of the) Jacobian55 double jacobian = psMetadataLookupF64(NULL, readout->analysis, PSWARP_ANALYSIS_JACOBIAN); // Jacobian56 int goodPixels = psMetadataLookupS32(NULL, readout->analysis, PSWARP_ANALYSIS_GOODPIX); // Good pixels57 jacobian /= goodPixels;58 readout->covariance = psImageCovarianceScale(covar, jacobian);59 psFree(covar);54 // Correct covariance matrix scale for the mean (square root of the) Jacobian 55 double jacobian = psMetadataLookupF64(NULL, readout->analysis, PSWARP_ANALYSIS_JACOBIAN); // Jacobian 56 int goodPixels = psMetadataLookupS32(NULL, readout->analysis, PSWARP_ANALYSIS_GOODPIX); // Good pixels 57 jacobian /= goodPixels; 58 readout->covariance = psImageCovarianceScale(covar, jacobian); 59 psFree(covar); 60 60 61 if (readout->variance) {61 if (readout->variance) { 62 62 psImageCovarianceTransfer(readout->variance, readout->covariance); 63 } 64 65 psFree(covars); 63 66 } 64 67 }
Note:
See TracChangeset
for help on using the changeset viewer.
