IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 10:15:32 AM (17 years ago)
Author:
Paul Price
Message:

Adding function to truncate a covariance matrix. This should help to keep them from growing too large (we're using kernels of half-size ~ 15 pixels for stack, which makes the covariance matrix grow by 60 pixels, which puts a big stress on psImageCovarianceCalculate).

File:
1 edited

Legend:

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

    r21298 r21316  
    55 * @author Paul Price, IfA
    66 *
    7  * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2009-02-05 00:42:48 $
     7 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2009-02-05 20:15:32 $
    99 * Copyright 2009 Institute for Astronomy, University of Hawaii
    1010 */
     
    2121// storage difficult; and if that's not enough, the time to do the calculation is definitely impractical).
    2222// Since there are (generally) lots of zeros in the covariance matrix, and the same basic pattern repeats (for
    23 // background pixels), we can just carry that pattern.  We carry this in a psKernel, since the values are the
    24 // covariance between the pixel of consideration (at 0,0 in the kernel) and neighbouring pixels.  Note that
    25 // this may not be strictly correct near sources, but this is the best we can do (and much better than most
    26 // currently do).
     23// background pixels), we can just carry that pattern ("covariance pseudo-matrix").  We carry this in a
     24// psKernel, since the values are the covariance between the pixel of consideration (at 0,0 in the kernel) and
     25// neighbouring pixels.  Note that this may not be strictly correct near sources, but this is the best we can
     26// do (and much better than most currently do).
    2727
    2828/// Allocate a covariance pseudo-matrix with no covariance
     
    5050    );
    5151
     52/// Truncate covariance pseudo-matrix
     53///
     54/// The covariance pseudo-matrix is truncated by removing the outer regions that contribute less than the
     55/// nominated fraction of the total.
     56psKernel *psImageCovarianceTruncate(
     57    const psKernel *covar,              ///< Covariance pseudo-matrix
     58    float frac                          ///< Fraction of covariance to truncate
     59    );
    5260
    5361/// @}
Note: See TracChangeset for help on using the changeset viewer.