Esempio n. 1
0
 public static extern void cvCalcCovarMatrix(IntPtr[] vects, int count, IntPtr covMat, IntPtr avg, CovarMatrixFlag flags);
Esempio n. 2
0
 /// <summary>
 /// computes covariation matrix of a set of samples
 /// </summary>
 /// <param name="samples"></param>
 /// <param name="covar"></param>
 /// <param name="mean"></param>
 /// <param name="flags"></param>
 /// <param name="ctype"></param>
 public static void CalcCovarMatrix(InputArray samples, OutputArray covar,
     OutputArray mean, CovarMatrixFlag flags, MatType ctype)
 {
     if (samples == null)
         throw new ArgumentNullException("samples");
     if (covar == null)
         throw new ArgumentNullException("covar");
     if (mean == null)
         throw new ArgumentNullException("mean");
     samples.ThrowIfDisposed();
     covar.ThrowIfNotReady();
     mean.ThrowIfNotReady();
     NativeMethods.core_calcCovarMatrix_InputArray(samples.CvPtr, covar.CvPtr, mean.CvPtr, (int)flags, ctype);
     covar.Fix();
     mean.Fix();
 }
Esempio n. 3
0
 /// <summary>
 /// computes covariation matrix of a set of samples
 /// </summary>
 /// <param name="samples"></param>
 /// <param name="covar"></param>
 /// <param name="mean"></param>
 /// <param name="flags"></param>
 /// <param name="ctype"></param>
 public static void CalcCovarMatrix(Mat[] samples, Mat covar, Mat mean,
     CovarMatrixFlag flags, MatType ctype)
 {
     if (samples == null)
         throw new ArgumentNullException("samples");
     if (covar == null)
         throw new ArgumentNullException("covar");
     if (mean == null)
         throw new ArgumentNullException("mean");
     covar.ThrowIfDisposed();
     mean.ThrowIfDisposed();
     IntPtr[] samplesPtr = EnumerableEx.SelectPtrs(samples);
     NativeMethods.core_calcCovarMatrix_Mat(samplesPtr, samples.Length, covar.CvPtr, mean.CvPtr, (int)flags, ctype);
 }
Esempio n. 4
0
 /// <summary>
 /// computes covariation matrix of a set of samples
 /// </summary>
 /// <param name="samples"></param>
 /// <param name="covar"></param>
 /// <param name="mean"></param>
 /// <param name="flags"></param>
 public static void CalcCovarMatrix(InputArray samples, OutputArray covar,
     OutputArray mean, CovarMatrixFlag flags)
 {
     CalcCovarMatrix(samples, covar, mean, flags, MatType.CV_64F);
 }
Esempio n. 5
0
 /// <summary>
 /// computes covariation matrix of a set of samples
 /// </summary>
 /// <param name="samples"></param>
 /// <param name="covar"></param>
 /// <param name="mean"></param>
 /// <param name="flags"></param>
 public static void CalcCovarMatrix(Mat[] samples, Mat covar, Mat mean, CovarMatrixFlag flags)
 {
     CalcCovarMatrix(samples, covar, mean, flags, MatType.CV_64F);
 }