cv::line_descriptor::BinaryDescriptor Class Reference
从图像提取行的二进制描述符

Class implements both functionalities for detection of lines and computation of their binary descriptor. 更多...

#include <opencv2/line_descriptor/descriptor.hpp>

Inheritance diagram for cv::line_descriptor::BinaryDescriptor:
cv::Algorithm

struct Params
List of BinaryDescriptor parameters: 更多...

Public Member Functions

BinaryDescriptor (const BinaryDescriptor::Params &parameters= BinaryDescriptor::Params ())
构造函数。 更多...
~BinaryDescriptor ()
void compute (const Mat &image, std::vector< KeyLine > &keylines, Mat &descriptors, bool returnFloatDescr=false) const
Requires descriptors computation. 更多...
void compute (const std::vector< Mat > &images, std::vector< std::vector< KeyLine > > &keylines, std::vector< Mat > &descriptors, bool returnFloatDescr=false) const
int defaultNorm () const
int descriptorSize () const
Return descriptor size. 更多...
int descriptorType () const
Return data type. 更多...
void detect (const Mat &image, std::vector< KeyLine > &keypoints, const Mat &mask= Mat ())
Requires line detection. 更多...
void detect (const std::vector< Mat > &images, std::vector< std::vector< KeyLine > > &keylines, const std::vector< Mat > &masks=std::vector< Mat >()) const
int getNumOfOctaves ()
Get current number of octaves. 更多...
int getReductionRatio ()
Get current reduction ratio (used in Gaussian pyramids) 更多...
int getWidthOfBand ()
Get current width of bands. 更多...
virtual void operator() ( InputArray image, InputArray mask, std::vector< KeyLine > &keylines, OutputArray descriptors, bool useProvidedKeyLines=false, bool returnFloatDescr=false) const
Define operator '()' to perform detection of KeyLines and computation of descriptors in a row. 更多...
virtual void read (const cv::FileNode &fn) CV_OVERRIDE
Read parameters from a FileNode object and store them. 更多...
void setNumOfOctaves (int octaves)
Set number of octaves. 更多...
void setReductionRatio (int rRatio)
Set reduction ratio (used in Gaussian pyramids) 更多...
void setWidthOfBand (int width)
Set width of bands. 更多...
virtual void write ( cv::FileStorage &fs) const CV_OVERRIDE
Store parameters to a FileStorage 对象。 更多...
- Public Member Functions inherited from cv::Algorithm
Algorithm ()
virtual ~Algorithm ()
virtual void clear ()
Clears the algorithm state. 更多...
virtual bool empty () const
返回 true 若 Algorithm is empty (e.g. in the very beginning or after unsuccessful read. 更多...
virtual 字符串 getDefaultName () const
virtual void save (const 字符串 &filename) const
void write (const Ptr < FileStorage > &fs, const 字符串 &name= 字符串 ()) const
simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 更多...

Static Public Member Functions

static Ptr < BinaryDescriptor > createBinaryDescriptor ()
创建 BinaryDescriptor object with default parameters (or with the ones provided) and return a smart pointer to it. 更多...
static Ptr < BinaryDescriptor > createBinaryDescriptor ( Params parameters)
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr < _Tp > load (const 字符串 &filename, const 字符串 &objname= 字符串 ())
Loads algorithm from the file. 更多...
template<typename _Tp >
static Ptr < _Tp > loadFromString (const 字符串 &strModel, const 字符串 &objname= 字符串 ())
Loads algorithm from a String. 更多...
template<typename _Tp >
static Ptr < _Tp > read (const FileNode &fn)
Reads algorithm from the file node. 更多...

Protected Member Functions

virtual void computeImpl (const Mat &imageSrc, std::vector< KeyLine > &keylines, Mat &descriptors, bool returnFloatDescr, bool useDetectionData) const
virtual void detectImpl (const Mat &imageSrc, std::vector< KeyLine > &keylines, const Mat &mask= Mat ()) const
- Protected Member Functions inherited from cv::Algorithm
void writeFormat ( FileStorage &fs) const

详细描述

Class implements both functionalities for detection of lines and computation of their binary descriptor.

Class' interface is mainly based on the ones of classical detectors and extractors, such as Feature2d's 特征检测和描述 and Descriptor Matchers . Retrieved information about lines is stored in line_descriptor::KeyLine 对象。

Constructor & Destructor Documentation

BinaryDescriptor()

cv::line_descriptor::BinaryDescriptor::BinaryDescriptor ( const BinaryDescriptor::Params & 参数 = BinaryDescriptor::Params () )

构造函数。

参数
参数 configuration parameters BinaryDescriptor::Params

If no argument is provided, constructor sets default values (see comments in the code snippet in previous section). Default values are strongly recommended.

~BinaryDescriptor()

cv::line_descriptor::BinaryDescriptor::~BinaryDescriptor ( )

destructor

成员函数文档编制

compute() [1/2]

void cv::line_descriptor::BinaryDescriptor::compute ( const Mat & image ,
std::vector< KeyLine > & keylines ,
Mat & descriptors ,
bool returnFloatDescr = false
) const
Python:
keylines, descriptors = cv.line_descriptor_BinaryDescriptor.compute( image, keylines[, descriptors[, returnFloatDescr]] )

Requires descriptors computation.

参数
image input image
keylines vector containing lines for which descriptors must be computed
descriptors
returnFloatDescr flag (when set to true, original non-binary descriptors are returned)

compute() [2/2]

void cv::line_descriptor::BinaryDescriptor::compute ( const std::vector< Mat > & images ,
std::vector< std::vector< KeyLine > > & keylines ,
std::vector< Mat > & descriptors ,
bool returnFloatDescr = false
) const
Python:
keylines, descriptors = cv.line_descriptor_BinaryDescriptor.compute( image, keylines[, descriptors[, returnFloatDescr]] )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

参数
images input images
keylines set of vectors containing lines for which descriptors must be computed
descriptors
returnFloatDescr flag (when set to true, original non-binary descriptors are returned)

computeImpl()

virtual void cv::line_descriptor::BinaryDescriptor::computeImpl ( const Mat & imageSrc ,
std::vector< KeyLine > & keylines ,
Mat & descriptors ,
bool returnFloatDescr ,
bool useDetectionData
) const
protected virtual

implementation of descriptors' computation

createBinaryDescriptor() [1/2]

static Ptr < BinaryDescriptor > cv::line_descriptor::BinaryDescriptor::createBinaryDescriptor ( )
static
Python:
retval = cv.line_descriptor.BinaryDescriptor_createBinaryDescriptor( )

创建 BinaryDescriptor object with default parameters (or with the ones provided) and return a smart pointer to it.

createBinaryDescriptor() [2/2]

static Ptr < BinaryDescriptor > cv::line_descriptor::BinaryDescriptor::createBinaryDescriptor ( Params 参数 )
static
Python:
retval = cv.line_descriptor.BinaryDescriptor_createBinaryDescriptor( )

defaultNorm()

int cv::line_descriptor::BinaryDescriptor::defaultNorm ( ) const

returns norm mode

descriptorSize()

int cv::line_descriptor::BinaryDescriptor::descriptorSize ( ) const

Return descriptor size.

descriptorType()

int cv::line_descriptor::BinaryDescriptor::descriptorType ( ) const

Return data type.

detect() [1/2]

void cv::line_descriptor::BinaryDescriptor::detect ( const Mat & image ,
std::vector< KeyLine > & keypoints ,
const Mat & mask = Mat ()
)
Python:
keypoints = cv.line_descriptor_BinaryDescriptor.detect( image[, mask] )

Requires line detection.

参数
image input image
keypoints vector that will store extracted lines for one or more images
mask mask matrix to detect only KeyLines of interest

detect() [2/2]

void cv::line_descriptor::BinaryDescriptor::detect ( const std::vector< Mat > & images ,
std::vector< std::vector< KeyLine > > & keylines ,
const std::vector< Mat > & masks = std::vector< Mat >()
) const
Python:
keypoints = cv.line_descriptor_BinaryDescriptor.detect( image[, mask] )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

参数
images input images
keylines set of vectors that will store extracted lines for one or more images
masks vector of mask matrices to detect only KeyLines of interest from each input image

detectImpl()

virtual void cv::line_descriptor::BinaryDescriptor::detectImpl ( const Mat & imageSrc ,
std::vector< KeyLine > & keylines ,
const Mat & mask = Mat ()
) const
protected virtual

implementation of line detection

getNumOfOctaves()

int cv::line_descriptor::BinaryDescriptor::getNumOfOctaves ( )
Python:
retval = cv.line_descriptor_BinaryDescriptor.getNumOfOctaves( )

Get current number of octaves.

getReductionRatio()

int cv::line_descriptor::BinaryDescriptor::getReductionRatio ( )
Python:
retval = cv.line_descriptor_BinaryDescriptor.getReductionRatio( )

Get current reduction ratio (used in Gaussian pyramids)

getWidthOfBand()

int cv::line_descriptor::BinaryDescriptor::getWidthOfBand ( )
Python:
retval = cv.line_descriptor_BinaryDescriptor.getWidthOfBand( )

Get current width of bands.

operator()()

virtual void cv::line_descriptor::BinaryDescriptor::operator() ( InputArray image ,
InputArray mask ,
std::vector< KeyLine > & keylines ,
OutputArray descriptors ,
bool useProvidedKeyLines = false ,
bool returnFloatDescr = false
) const
virtual

Define operator '()' to perform detection of KeyLines and computation of descriptors in a row.

参数
image input image
mask mask matrix to select which lines in KeyLines must be accepted among the ones extracted (used when keylines is not empty)
keylines vector that contains input lines (when filled, the detection part will be skipped and input lines will be passed as input to the algorithm computing descriptors)
descriptors matrix that will store final descriptors
useProvidedKeyLines flag (when set to true, detection phase will be skipped and only computation of descriptors will be executed, using lines provided in keylines )
returnFloatDescr flag (when set to true, original non-binary descriptors are returned)

read()

virtual void cv::line_descriptor::BinaryDescriptor::read ( const cv::FileNode & fn )
virtual

Read parameters from a FileNode object and store them.

参数
fn source FileNode file

Reimplemented from cv::Algorithm .

setNumOfOctaves()

void cv::line_descriptor::BinaryDescriptor::setNumOfOctaves ( int octaves )
Python:
None = cv.line_descriptor_BinaryDescriptor.setNumOfOctaves( octaves )

Set number of octaves.

参数
octaves number of octaves

setReductionRatio()

void cv::line_descriptor::BinaryDescriptor::setReductionRatio ( int rRatio )
Python:
None = cv.line_descriptor_BinaryDescriptor.setReductionRatio( rRatio )

Set reduction ratio (used in Gaussian pyramids)

参数
rRatio reduction ratio

setWidthOfBand()

void cv::line_descriptor::BinaryDescriptor::setWidthOfBand ( int width )
Python:
None = cv.line_descriptor_BinaryDescriptor.setWidthOfBand( width )

Set width of bands.

参数
width width of bands

write()

virtual void cv::line_descriptor::BinaryDescriptor::write ( cv::FileStorage & fs ) const
virtual

Store parameters to a FileStorage 对象。

参数
fs output FileStorage file

Reimplemented from cv::Algorithm .


The documentation for this class was generated from the following file: