Commit 0863960c authored by biagio montesano's avatar biagio montesano

Reinsertion of OctaveKeyLines

parent d5eeb91d
...@@ -42,6 +42,14 @@ the use of this software, even if advised of the possibility of such damage. ...@@ -42,6 +42,14 @@ the use of this software, even if advised of the possibility of such damage.
#include <vector> #include <vector>
/* struct to represent lines extracted from an octave */
struct OctaveLine{
unsigned int octaveCount;//the octave which this line is detected
unsigned int lineIDInOctave;//the line ID in that octave image
unsigned int lineIDInScaleLineVec;//the line ID in Scale line vector
float lineLength; //the length of line in original image scale
};
// A 2D line (normal equation parameters). // A 2D line (normal equation parameters).
struct SingleLine struct SingleLine
{ {
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "LineStructure.hpp" #include "LineStructure.hpp"
#include "opencv2/core.hpp" #include "opencv2/core.hpp"
namespace cv namespace cv
{ {
...@@ -56,11 +57,10 @@ namespace cv ...@@ -56,11 +57,10 @@ namespace cv
{ {
public: public:
virtual ~LineDescriptor(); virtual ~LineDescriptor();
void getLineBinaryDescriptor(std::vector<cv::Mat> & oct_binaryDescMat); void getLineBinaryDescriptors(cv::Mat &oct_binaryDescMat);
protected: protected:
virtual void getLineBinaryDescriptorImpl(std::vector<cv::Mat> & oct_binaryDescMat, virtual void getLineBinaryDescriptorsImpl(cv::Mat &oct_binaryDescMat);
ScaleLines &keyLines);
}; };
...@@ -102,11 +102,11 @@ namespace cv ...@@ -102,11 +102,11 @@ namespace cv
virtual void read( const cv::FileNode& fn ); virtual void read( const cv::FileNode& fn );
virtual void write( cv::FileStorage& fs ) const; virtual void write( cv::FileStorage& fs ) const;
void getLineBinaryDescriptor(cv::Mat & oct_binaryDescMat, ScaleLines &keyLines); void getLineBinaryDescriptors(cv::Mat &oct_binaryDescMat);
protected: protected:
virtual void getLineBinaryDescriptorImpl(std::vector<cv::Mat> & oct_binaryDescMat, ScaleLines &keyLines); virtual void getLineBinaryDescriptorsImpl(cv::Mat &oct_binaryDescMat);
AlgorithmInfo* info() const; AlgorithmInfo* info() const;
Params params; Params params;
...@@ -115,6 +115,9 @@ namespace cv ...@@ -115,6 +115,9 @@ namespace cv
private: private:
unsigned char binaryTest(float* f1, float* f2); unsigned char binaryTest(float* f1, float* f2);
int ComputeLBD_(ScaleLines &keyLines); int ComputeLBD_(ScaleLines &keyLines);
int OctaveKeyLines(std::vector<cv::Mat> & octaveImages, ScaleLines &keyLines);
void getLineParameters(cv::Vec4i &line_extremes, cv::Vec3i &lineParams);
float getLineDirection(cv::Vec3i &lineParams);
/* the local gaussian coefficient apply to the orthogonal line direction within each band */ /* the local gaussian coefficient apply to the orthogonal line direction within each band */
std::vector<float> gaussCoefL_; std::vector<float> gaussCoefL_;
...@@ -128,6 +131,9 @@ namespace cv ...@@ -128,6 +131,9 @@ namespace cv
/* vectot to store sizes of octave images */ /* vectot to store sizes of octave images */
std::vector<cv::Size> images_sizes; std::vector<cv::Size> images_sizes;
/* structure to store lines extracted from each octave image */
std::vector<std::vector<cv::Vec4i> > extractedLines;
}; };
} }
......
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