Commit 8f9bcb77 authored by biagio montesano's avatar biagio montesano

Derivation from Feature2D completed. Warnings corrected.

parent a0237c31
...@@ -74,11 +74,9 @@ namespace cv ...@@ -74,11 +74,9 @@ namespace cv
/* number of pixels covered by the line */ /* number of pixels covered by the line */
unsigned int numOfPixels; unsigned int numOfPixels;
}; };
class CV_EXPORTS_W BinaryDescriptor : public FeatureDetector class CV_EXPORTS_W BinaryDescriptor : public Feature2D
{ {
public: public:
...@@ -114,9 +112,14 @@ namespace cv ...@@ -114,9 +112,14 @@ namespace cv
}; };
/* constructor */
CV_WRAP BinaryDescriptor(const BinaryDescriptor::Params &parameters = CV_WRAP BinaryDescriptor(const BinaryDescriptor::Params &parameters =
BinaryDescriptor::Params()); BinaryDescriptor::Params());
/* constructors with smart pointers */
CV_EXPORTS Ptr<BinaryDescriptor> createBinaryDescriptor();
CV_EXPORTS Ptr<BinaryDescriptor> createBinaryDescriptor(Params parameters);
/* read parameters from a FileNode object and store them (class function ) */ /* read parameters from a FileNode object and store them (class function ) */
virtual void read( const cv::FileNode& fn ); virtual void read( const cv::FileNode& fn );
...@@ -133,10 +136,12 @@ namespace cv ...@@ -133,10 +136,12 @@ namespace cv
std::vector<std::vector<KeyPoint> >& keypoints, std::vector<std::vector<KeyPoint> >& keypoints,
const std::vector<Mat>& masks=std::vector<Mat>() ) const; const std::vector<Mat>& masks=std::vector<Mat>() ) const;
/* requires descriptors computation (only one image) */
CV_WRAP void compute( const Mat& image, CV_WRAP void compute( const Mat& image,
CV_OUT CV_IN_OUT std::vector<KeyPoint>& keypoints, CV_OUT CV_IN_OUT std::vector<KeyPoint>& keypoints,
CV_OUT Mat& descriptors ) const; CV_OUT Mat& descriptors ) const;
/* requires descriptors computation (more than one image) */
void compute( const std::vector<Mat>& images, void compute( const std::vector<Mat>& images,
std::vector<std::vector<KeyPoint> >& keypoints, std::vector<std::vector<KeyPoint> >& keypoints,
std::vector<Mat>& descriptors ) const; std::vector<Mat>& descriptors ) const;
...@@ -155,28 +160,28 @@ namespace cv ...@@ -155,28 +160,28 @@ namespace cv
CV_WRAP_AS(detectAndCompute) virtual void operator()( InputArray image, CV_WRAP_AS(detectAndCompute) virtual void operator()( InputArray image,
InputArray mask, InputArray mask,
CV_OUT std::vector<KeyPoint>& keypoints, CV_OUT std::vector<KeyPoint>& keypoints,
OutputArray descriptors, OutputArray descriptors,
bool useProvidedKeypoints=false ) const = 0; bool useProvidedKeypoints=false ) const;
protected: protected:
virtual void detectImpl( const Mat& image, virtual void detectImpl( const Mat& image,
std::vector<KeyPoint>& keypoints, std::vector<KeyPoint>& keypoints,
const Mat& mask=Mat() ) const = 0; const Mat& mask=Mat() ) const;
virtual void computeImpl( const Mat& image, virtual void computeImpl( const Mat& image,
std::vector<KeyPoint>& keypoints, std::vector<KeyPoint>& keypoints,
Mat& descriptors ) const = 0; Mat& descriptors ) const;
AlgorithmInfo* info() const; AlgorithmInfo* info() const;
private: private:
/* conversion of an LBD descriptor to the decimal equivalent of its binary representation */ /* conversion of an LBD descriptor to its binary representation */
unsigned char binaryTest(float* f1, float* f2); unsigned char binaryConversion(float* f1, float* f2);
/* compute LBD descriptors */ /* compute LBD descriptors */
int computeLBD_(ScaleLines &keyLines); int computeLBD(ScaleLines &keyLines);
/* compute Gaussian pyramid of input image */ /* compute Gaussian pyramid of input image */
void computeGaussianPyramid(const Mat& image); void computeGaussianPyramid(const Mat& image);
......
...@@ -55,5 +55,7 @@ ...@@ -55,5 +55,7 @@
#include <iostream> #include <iostream>
#include <map> #include <map>
#include <utility> #include <utility>
#include <string>
#include <typeinfo>
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment