Click or drag to resize
Accord.NET (logo)

BagOfVisualWordsTPoint Class

Bag of Visual Words
Inheritance Hierarchy
SystemObject
  Accord.MachineLearningParallelLearningBase
    Accord.MachineLearningBaseBagOfWordsBagOfVisualWordsTPoint, TPoint, Double, IUnsupervisedLearningIClassifierDouble, Int32, Double, Int32, IImageFeatureExtractorTPoint, UnmanagedImage
      Accord.ImagingBaseBagOfVisualWordsBagOfVisualWordsTPoint, TPoint, Double, IUnsupervisedLearningIClassifierDouble, Int32, Double, Int32, IImageFeatureExtractorTPoint
        Accord.ImagingBagOfVisualWordsTPoint

Namespace:  Accord.Imaging
Assembly:  Accord.Vision (in Accord.Vision.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public class BagOfVisualWords<TPoint> : BaseBagOfVisualWords<BagOfVisualWords<TPoint>, TPoint, double[], IUnsupervisedLearning<IClassifier<double[], int>, double[], int>, IImageFeatureExtractor<TPoint>>
where TPoint : Object, IFeatureDescriptor<double[]>
Request Example View Source

Type Parameters

TPoint
The IFeaturePoint type to be used with this class, such as SpeededUpRobustFeaturePoint.

The BagOfVisualWordsTPoint type exposes the following members.

Constructors
  NameDescription
Public methodBagOfVisualWordsTPoint(IImageFeatureExtractorTPoint, IUnsupervisedLearningIClassifierDouble, Int32, Double, Int32)
Constructs a new BagOfVisualWords.
Public methodBagOfVisualWordsTPoint(IImageFeatureExtractorTPoint, Int32)
Constructs a new BagOfVisualWords.
Top
Properties
  NameDescription
Public propertyClustering
Gets the clustering algorithm used to create this model.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyDetector
Gets the feature extractor used to identify features in the input data.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyMaxDescriptorsPerInstance
Gets or sets the maximum number of descriptors per image that should be used to learn the codebook. Default is 0 (meaning to use all descriptors).
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyNumberOfDescriptors
Gets or sets the maximum number of descriptors that should be used to learn the codebook. Default is 0 (meaning to use all descriptors).
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyNumberOfInputs
Gets the number of inputs accepted by the model.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyNumberOfOutputs
Gets the number of outputs generated by the model.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyNumberOfWords
Gets the number of words in this codebook.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyParallelOptions
Gets or sets the parallelization options for this algorithm.
(Inherited from ParallelLearningBase.)
Public propertyStatistics
Gets statistics about the last codebook learned.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public propertyToken
Gets or sets a cancellation token that can be used to cancel the algorithm while it is running.
(Inherited from ParallelLearningBase.)
Top
Methods
  NameDescription
Public methodCompute(Bitmap) Obsolete.
Computes the Bag of Words model.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodCompute(TPoint) Obsolete.
Computes the Bag of Words model.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodCompute(Bitmap, Double) Obsolete.
Computes the Bag of Words model.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodFor
Executes a parallel for using the feature detector in a thread-safe way.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodGetFeatureVector(ListTFeature) Obsolete.
Gets the codeword representation of a given image.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodGetFeatureVector(Bitmap) Obsolete.
Gets the codeword representation of a given image.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodGetFeatureVector(String) Obsolete.
Gets the codeword representation of a given image.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodGetFeatureVector(UnmanagedImage) Obsolete.
Gets the codeword representation of a given image.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInit
Initializes this instance.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Protected methodInnerLearnT
Generic learn method implementation that should work for any input type. This method is useful for re-using code between methods that accept Bitmap, BitmapData, UnmanagedImage, filenames as strings, etc.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodLearn(Bitmap, Double)
Learns a model that can map the given inputs to the desired outputs.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodLearn(String, Double)
Learns a model that can map the given inputs to the desired outputs.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodLearn(TFeature, Double)
Learns a model that can map the given inputs to the desired outputs.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodLearn(TInput, Double)
Learns a model that can map the given inputs to the desired outputs.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSave(Stream) Obsolete.
Saves the bag of words to a stream.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodSave(String) Obsolete.
Saves the bag of words to a file.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransform(Bitmap)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(Bitmap)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(String)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(String)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(ListTPoint)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(TInput)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(TInput)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(Bitmap, Double)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(Bitmap, Int32)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(Bitmap, Double)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(Bitmap, Int32)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(String, Double)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(String, Int32)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(String, Double)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(String, Int32)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfVisualWordsTModel, TFeature, TPoint, TClustering, TExtractor.)
Public methodTransform(IEnumerableTPoint, Double)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(IEnumerableTPoint, Int32)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(TInput, Double)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(TInput, Int32)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(TInput, Double)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Public methodTransform(TInput, Int32)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseBagOfWordsTModel, TPoint, TFeature, TClustering, TExtractor, TInput.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The bag-of-words (BoW) model can be used to extract finite length features from otherwise varying length representations. This class can uses any feature detector to determine a coded representation for a given image.

For a simpler, non-generic version of the Bag-of-Words model which defaults to the SURF features detector, please see BagOfVisualWords.

Examples

Please see BagOfVisualWords.

See Also