core_PCA_project() private method

private core_PCA_project ( IntPtr obj, IntPtr vec ) : IntPtr
obj IntPtr
vec IntPtr
return IntPtr
Example #1
0
        /// <summary>
        /// projects vector from the original space to the principal components subspace
        /// </summary>
        /// <param name="vec"></param>
        /// <returns></returns>
        public Mat Project(InputArray vec)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("PCA");
            }
            if (vec == null)
            {
                throw new ArgumentNullException("vec");
            }
            vec.ThrowIfDisposed();
            IntPtr ret = NativeMethods.core_PCA_project(ptr, vec.CvPtr);

            return(new Mat(ret));
        }
Example #2
0
 /// <summary>
 /// projects vector from the original space to the principal components subspace
 /// </summary>
 /// <param name="vec"></param>
 /// <param name="result"></param>
 public void Project(InputArray vec, OutputArray result)
 {
     if (disposed)
     {
         throw new ObjectDisposedException("PCA");
     }
     if (vec == null)
     {
         throw new ArgumentNullException("vec");
     }
     if (result == null)
     {
         throw new ArgumentNullException("result");
     }
     vec.ThrowIfDisposed();
     result.ThrowIfNotReady();
     NativeMethods.core_PCA_project(ptr, vec.CvPtr, result.CvPtr);
     result.Fix();
 }