mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
DescriptorExtractor: added defaultNorm() to return default norm type.
Added the defaultNorm() method to the DescriptorExtractor class. This method returns the default norm type for each descriptor type. The tests and C/C++ samples were updated to get the norm type directly from the DescriptorExtractor inherited classes. This was reported in feature report #2182 (http://code.opencv.org/issues/2182). It will make it possible to get the norm type usually applied matching method for each descriptor, instead of passing it manually.
This commit is contained in:
@@ -35,6 +35,7 @@ Abstract base class for computing descriptors for image keypoints. ::
|
||||
|
||||
virtual int descriptorSize() const = 0;
|
||||
virtual int descriptorType() const = 0;
|
||||
virtual int defaultNorm() const = 0;
|
||||
|
||||
static Ptr<DescriptorExtractor> create( const String& descriptorExtractorType );
|
||||
|
||||
@@ -114,6 +115,7 @@ them into a single color descriptor. ::
|
||||
virtual void write( FileStorage& ) const;
|
||||
virtual int descriptorSize() const;
|
||||
virtual int descriptorType() const;
|
||||
virtual int defaultNorm() const;
|
||||
protected:
|
||||
...
|
||||
};
|
||||
@@ -141,6 +143,7 @@ Strecha C., Fua P. *BRIEF: Binary Robust Independent Elementary Features* ,
|
||||
virtual void write( FileStorage& ) const;
|
||||
virtual int descriptorSize() const;
|
||||
virtual int descriptorType() const;
|
||||
virtual int defaultNorm() const;
|
||||
protected:
|
||||
...
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user