OpenCvSharp.BOWImgDescriptorExtractor.SetVocabulary C# (CSharp) Method

SetVocabulary() public method

Sets a visual vocabulary.
public SetVocabulary ( OpenCvSharp.Mat vocabulary ) : void
vocabulary OpenCvSharp.Mat Vocabulary (can be trained using the inheritor of BOWTrainer ). /// Each row of the vocabulary is a visual word(cluster center).
return void
        public void SetVocabulary(Mat vocabulary)
        {
            if (IsDisposed)
                throw new ObjectDisposedException(GetType().Name);
            if (vocabulary == null)
                throw new ArgumentNullException(nameof(vocabulary));
            NativeMethods.features2d_BOWImgDescriptorExtractor_setVocabulary(ptr, vocabulary.CvPtr);
            GC.KeepAlive(vocabulary);
        }