/// <summary>
 /// Deserializes this object from a given cv::FileStorage.
 /// </summary>
 /// <param name="node"></param>
 public void Load(FileStorage node)
 {
     ThrowIfDisposed();
     if (node == null)
     {
         throw new ArgumentNullException(nameof(node));
     }
     node.ThrowIfDisposed();
     NativeMethods.core_LDA_load_FileStorage(ptr, node.CvPtr);
     GC.KeepAlive(this);
     GC.KeepAlive(node);
 }
 /// <summary>
 /// Serializes this object to a given cv::FileStorage.
 /// </summary>
 /// <param name="fs"></param>
 public void Save(FileStorage fs)
 {
     ThrowIfDisposed();
     if (fs == null)
     {
         throw new ArgumentNullException(nameof(fs));
     }
     fs.ThrowIfDisposed();
     NativeMethods.core_LDA_save_FileStorage(ptr, fs.CvPtr);
     GC.KeepAlive(this);
     GC.KeepAlive(fs);
 }
Exemple #3
0
        /// <summary>
        /// Write PCA objects.
        /// Writes @ref eigenvalues @ref eigenvectors and @ref mean to specified FileStorage
        /// </summary>
        /// <param name="fs"></param>
        public void Write(FileStorage fs)
        {
            if (fs == null)
            {
                throw new ArgumentNullException(nameof(fs));
            }
            fs.ThrowIfDisposed();

            NativeMethods.HandleException(
                NativeMethods.core_PCA_write(ptr, fs.CvPtr));

            GC.KeepAlive(this);
            GC.KeepAlive(fs);
        }