OpenCV  5.0.0alpha
Open Source Computer Vision
Loading...
Searching...
No Matches
cv::line_descriptor::BinaryDescriptor Class Reference

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

#include <opencv2/line_descriptor/descriptor.hpp>

Collaboration diagram for cv::line_descriptor::BinaryDescriptor:

Classes

struct  Params
 List of BinaryDescriptor parameters: More...
 

Public Member Functions

 BinaryDescriptor (const BinaryDescriptor::Params &parameters=BinaryDescriptor::Params())
 Constructor.
 
 ~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 object.
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state.
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
 
virtual String getDefaultName () const
 
virtual void save (const String &filename) const
 
void write (FileStorage &fs, const String &name) const
 

Static Public Member Functions

static Ptr< BinaryDescriptorcreateBinaryDescriptor ()
 Create a BinaryDescriptor object with default parameters (or with the ones provided) and return a smart pointer to it.
 
static Ptr< BinaryDescriptorcreateBinaryDescriptor (Params parameters)
 
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 Loads algorithm from the file.
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String.
 
template<typename _Tp >
static Ptr< _Tpread (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
 

Detailed Description

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 Feature Detection and Description and Descriptor Matchers. Retrieved information about lines is stored in line_descriptor::KeyLine objects.

Constructor & Destructor Documentation

◆ BinaryDescriptor()

cv::line_descriptor::BinaryDescriptor::BinaryDescriptor ( const BinaryDescriptor::Params & parameters = BinaryDescriptor::Params())

Constructor.

Parameters
parametersconfiguration 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

Member Function Documentation

◆ compute() [1/2]

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

Requires descriptors computation.

Parameters
imageinput image
keylinesvector containing lines for which descriptors must be computed
descriptors
returnFloatDescrflag (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:
cv.line_descriptor.BinaryDescriptor.compute(image, keylines[, descriptors[, returnFloatDescr]]) -> keylines, descriptors

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

Parameters
imagesinput images
keylinesset of vectors containing lines for which descriptors must be computed
descriptors
returnFloatDescrflag (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
protectedvirtual

implementation of descriptors' computation

◆ createBinaryDescriptor() [1/2]

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

Create a 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 parameters)
static
Python:
cv.line_descriptor.BinaryDescriptor.createBinaryDescriptor() -> retval
cv.line_descriptor.BinaryDescriptor_createBinaryDescriptor() -> retval

◆ 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:
cv.line_descriptor.BinaryDescriptor.detect(image[, mask]) -> keypoints

Requires line detection.

Parameters
imageinput image
keypointsvector that will store extracted lines for one or more images
maskmask 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:
cv.line_descriptor.BinaryDescriptor.detect(image[, mask]) -> keypoints

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

Parameters
imagesinput images
keylinesset of vectors that will store extracted lines for one or more images
masksvector 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
protectedvirtual

implementation of line detection

◆ getNumOfOctaves()

int cv::line_descriptor::BinaryDescriptor::getNumOfOctaves ( )
Python:
cv.line_descriptor.BinaryDescriptor.getNumOfOctaves() -> retval

Get current number of octaves.

◆ getReductionRatio()

int cv::line_descriptor::BinaryDescriptor::getReductionRatio ( )
Python:
cv.line_descriptor.BinaryDescriptor.getReductionRatio() -> retval

Get current reduction ratio (used in Gaussian pyramids)

◆ getWidthOfBand()

int cv::line_descriptor::BinaryDescriptor::getWidthOfBand ( )
Python:
cv.line_descriptor.BinaryDescriptor.getWidthOfBand() -> retval

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.

Parameters
imageinput image
maskmask matrix to select which lines in KeyLines must be accepted among the ones extracted (used when keylines is not empty)
keylinesvector 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)
descriptorsmatrix that will store final descriptors
useProvidedKeyLinesflag (when set to true, detection phase will be skipped and only computation of descriptors will be executed, using lines provided in keylines)
returnFloatDescrflag (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.

Parameters
fnsource FileNode file

Reimplemented from cv::Algorithm.

◆ setNumOfOctaves()

void cv::line_descriptor::BinaryDescriptor::setNumOfOctaves ( int octaves)
Python:
cv.line_descriptor.BinaryDescriptor.setNumOfOctaves(octaves) -> None

Set number of octaves.

Parameters
octavesnumber of octaves

◆ setReductionRatio()

void cv::line_descriptor::BinaryDescriptor::setReductionRatio ( int rRatio)
Python:
cv.line_descriptor.BinaryDescriptor.setReductionRatio(rRatio) -> None

Set reduction ratio (used in Gaussian pyramids)

Parameters
rRatioreduction ratio

◆ setWidthOfBand()

void cv::line_descriptor::BinaryDescriptor::setWidthOfBand ( int width)
Python:
cv.line_descriptor.BinaryDescriptor.setWidthOfBand(width) -> None

Set width of bands.

Parameters
widthwidth of bands

◆ write()

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

Store parameters to a FileStorage object.

Parameters
fsoutput FileStorage file

Reimplemented from cv::Algorithm.


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