IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2009, 11:47:42 AM (17 years ago)
Author:
Paul Price
Message:

Adding function psImageCovarianceTransfer to transfer the covariance factor (central value of covariance pseudo-matrix) from the covariance pseudo-matrix to the variance map. This allows the variance map to accurately reflect the true variance, without needing to apply the covariance factor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageCovariance.c

    r21383 r21466  
    221221    return trunc;
    222222}
     223
     224
     225bool psImageCovarianceTransfer(psImage *variance, psKernel *covar)
     226{
     227    PS_ASSERT_IMAGE_NON_NULL(variance, NULL);
     228    PS_ASSERT_KERNEL_NON_NULL(covar, NULL);
     229
     230    float factor = psImageCovarianceFactor(covar); // Factor to transfer
     231    psBinaryOp(variance, variance, "*", psScalarAlloc(factor, PS_TYPE_F32));
     232    psBinaryOp(covar->image, covar->image, "/", psScalarAlloc(factor, PS_TYPE_F32));
     233
     234    return true;
     235}
Note: See TracChangeset for help on using the changeset viewer.