1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-18 08:44:11 +08:00

Inheritage completed. Functions with KeyLine objects added.

This commit is contained in:
biagio montesano
2014-06-16 18:59:24 +02:00
parent 8f9bcb77f6
commit fc72a71b33
54 changed files with 2861 additions and 183 deletions

View File

@@ -43,7 +43,7 @@
#define __OPENCV_LINE_DESCRIPTOR_HPP__
#include "opencv2/line_descriptor/descriptor.hpp"
#include "opencv2/core.hpp"
//#include "opencv2/core.hpp"
namespace cv
{

View File

@@ -88,15 +88,15 @@ struct OctaveSingleLine
{
/*endPoints, the coordinate origin is the top-left corner of the original image.
*startPointX = sPointInOctaveX * (factor)^octaveCount; */
float startPointX;
float startPointY;
float endPointX;
float endPointY;
float startPointX;
float startPointY;
float endPointX;
float endPointY;
//endPoints, the coordinate origin is the top-left corner of the octave image.
float sPointInOctaveX;
float sPointInOctaveY;
float ePointInOctaveX;
float ePointInOctaveY;
float sPointInOctaveX;
float sPointInOctaveY;
float ePointInOctaveX;
float ePointInOctaveY;
//direction of a line, the angle between positive line direction (dark side is in the left) and positive X axis.
float direction;
//the summation of gradient magnitudes of pixels on lines

View File

@@ -48,6 +48,8 @@
#include "LineStructure.hpp"
#include "opencv2/core.hpp"
#include <opencv2/features2d.hpp>
namespace cv
@@ -76,7 +78,7 @@ namespace cv
};
class CV_EXPORTS_W BinaryDescriptor : public Feature2D
class CV_EXPORTS_W BinaryDescriptor: public Feature2D
{
public:
@@ -117,8 +119,9 @@ namespace cv
BinaryDescriptor::Params());
/* constructors with smart pointers */
CV_EXPORTS Ptr<BinaryDescriptor> createBinaryDescriptor();
CV_EXPORTS Ptr<BinaryDescriptor> createBinaryDescriptor(Params parameters);
static Ptr<BinaryDescriptor> createBinaryDescriptor();
static Ptr<BinaryDescriptor> createBinaryDescriptor(Params parameters);
~BinaryDescriptor();
/* read parameters from a FileNode object and store them (class function ) */
virtual void read( const cv::FileNode& fn );
@@ -131,6 +134,10 @@ namespace cv
CV_OUT std::vector<KeyPoint>& keypoints,
const Mat& mask=Mat() );
CV_WRAP void detectKL( const Mat& image,
CV_OUT std::vector<KeyLine>& keypoints,
const Mat& mask=Mat() );
/* requires line detection (more than one image) */
void detect( const std::vector<Mat>& images,
std::vector<std::vector<KeyPoint> >& keypoints,
@@ -158,6 +165,7 @@ namespace cv
/* check whether Gaussian pyramids were created */
bool empty() const;
/* definition of operator (), as required by Feature2D */
CV_WRAP_AS(detectAndCompute) virtual void operator()( InputArray image,
InputArray mask,
CV_OUT std::vector<KeyPoint>& keypoints,
@@ -166,14 +174,22 @@ namespace cv
protected:
/* implementation of line detection */
virtual void detectImpl( const Mat& image,
std::vector<KeyPoint>& keypoints,
const Mat& mask=Mat() ) const;
virtual void detectImplKL( const Mat& image,
std::vector<KeyLine>& keypoints,
const Mat& mask=Mat() ) const;
/* implementation of descriptors' computation */
virtual void computeImpl( const Mat& image,
std::vector<KeyPoint>& keypoints,
Mat& descriptors ) const;
/* function inherited by Algorithm */
AlgorithmInfo* info() const;
private: