features2d_BOWKMeansTrainer_cluster2() private method

private features2d_BOWKMeansTrainer_cluster2 ( IntPtr obj, IntPtr descriptors ) : IntPtr
obj IntPtr
descriptors IntPtr
return IntPtr
コード例 #1
0
        /// <summary>
        /// Clusters train descriptors.
        /// </summary>
        /// <param name="descriptors">Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
        /// The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object
        /// are clustered.In the second variant, input descriptors are clustered.</param>
        /// <returns></returns>
        public override Mat Cluster(Mat descriptors)
        {
            ThrowIfDisposed();
            descriptors.ThrowIfDisposed();
            IntPtr p = NativeMethods.features2d_BOWKMeansTrainer_cluster2(ptr, descriptors.CvPtr);

            GC.KeepAlive(descriptors);
            return(new Mat(p));
        }
コード例 #2
0
 /// <summary>
 /// Clusters train descriptors.
 /// </summary>
 /// <param name="descriptors">Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
 /// The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object
 /// are clustered.In the second variant, input descriptors are clustered.</param>
 /// <returns></returns>
 public override Mat Cluster(Mat descriptors)
 {
     ThrowIfDisposed();
     descriptors.ThrowIfDisposed();
     NativeMethods.HandleException(
         NativeMethods.features2d_BOWKMeansTrainer_cluster2(ptr, descriptors.CvPtr, out var p));
     GC.KeepAlive(this);
     GC.KeepAlive(descriptors);
     return(new Mat(p));
 }
コード例 #3
0
        /// <summary>
        /// Clusters train descriptors.
        /// </summary>
        /// <param name="descriptors">Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
        /// The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object
        /// are clustered.In the second variant, input descriptors are clustered.</param>
        /// <returns></returns>
        public override Mat Cluster(Mat descriptors)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(GetType().Name);
            }
            descriptors.ThrowIfDisposed();
            IntPtr p = NativeMethods.features2d_BOWKMeansTrainer_cluster2(ptr, descriptors.CvPtr);

            GC.KeepAlive(descriptors);
            return(new Mat(p));
        }