OpenCV453
|
Class implements both functionalities for detection of lines and computation of their binary descriptor. [詳解]
#include <descriptor.hpp>
cv::Algorithmを継承しています。
クラス | |
struct | Params |
List of BinaryDescriptor parameters: [詳解] | |
公開メンバ関数 | |
BinaryDescriptor (const BinaryDescriptor::Params ¶meters=BinaryDescriptor::Params()) | |
Constructor [詳解] | |
~BinaryDescriptor () | |
CV_WRAP int | getNumOfOctaves () |
Get current number of octaves | |
CV_WRAP void | setNumOfOctaves (int octaves) |
Set number of octaves [詳解] | |
CV_WRAP int | getWidthOfBand () |
Get current width of bands | |
CV_WRAP void | setWidthOfBand (int width) |
Set width of bands [詳解] | |
CV_WRAP int | getReductionRatio () |
Get current reduction ratio (used in Gaussian pyramids) | |
CV_WRAP void | setReductionRatio (int rRatio) |
Set reduction ratio (used in Gaussian pyramids) [詳解] | |
virtual void | read (const cv::FileNode &fn) CV_OVERRIDE |
Read parameters from a FileNode object and store them [詳解] | |
virtual void | write (cv::FileStorage &fs) const CV_OVERRIDE |
Store parameters to a FileStorage object [詳解] | |
CV_WRAP void | detect (const Mat &image, CV_OUT 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 |
CV_WRAP void | compute (const Mat &image, CV_OUT CV_IN_OUT std::vector< KeyLine > &keylines, CV_OUT 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 | descriptorSize () const |
Return descriptor size | |
int | descriptorType () const |
Return data type | |
int | defaultNorm () const |
virtual void | operator() (InputArray image, InputArray mask, CV_OUT 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 CV_WRAP void | clear () |
Clears the algorithm state [詳解] | |
CV_WRAP void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
simplified API for language bindings これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。 | |
virtual CV_WRAP bool | empty () const |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read [詳解] | |
virtual CV_WRAP void | save (const String &filename) const |
virtual CV_WRAP String | getDefaultName () const |
静的公開メンバ関数 | |
static CV_WRAP Ptr< BinaryDescriptor > | createBinaryDescriptor () |
Create a BinaryDescriptor object with default parameters (or with the ones provided) and return a smart pointer to it | |
static Ptr< BinaryDescriptor > | createBinaryDescriptor (Params parameters) |
![]() | |
template<typename _Tp > | |
static Ptr< _Tp > | read (const FileNode &fn) |
Reads algorithm from the file node [詳解] | |
template<typename _Tp > | |
static Ptr< _Tp > | load (const String &filename, const String &objname=String()) |
Loads algorithm from the file [詳解] | |
template<typename _Tp > | |
static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) |
Loads algorithm from a String [詳解] | |
限定公開メンバ関数 | |
virtual void | detectImpl (const Mat &imageSrc, std::vector< KeyLine > &keylines, const Mat &mask=Mat()) const |
virtual void | computeImpl (const Mat &imageSrc, std::vector< KeyLine > &keylines, Mat &descriptors, bool returnFloatDescr, bool useDetectionData) const |
![]() | |
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 Feature Detection and Description and Descriptor Matchers. Retrieved information about lines is stored in line_descriptor::KeyLine objects.
cv::line_descriptor::BinaryDescriptor::BinaryDescriptor | ( | const BinaryDescriptor::Params & | parameters = BinaryDescriptor::Params() | ) |
Constructor
parameters | 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.
cv::line_descriptor::BinaryDescriptor::~BinaryDescriptor | ( | ) |
destructor
CV_WRAP void cv::line_descriptor::BinaryDescriptor::compute | ( | const Mat & | image, |
CV_OUT CV_IN_OUT std::vector< KeyLine > & | keylines, | ||
CV_OUT Mat & | descriptors, | ||
bool | returnFloatDescr = false |
||
) | const |
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) |
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 |
これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
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) |
|
protectedvirtual |
implementation of descriptors' computation
int cv::line_descriptor::BinaryDescriptor::defaultNorm | ( | ) | const |
returns norm mode
CV_WRAP void cv::line_descriptor::BinaryDescriptor::detect | ( | const Mat & | image, |
CV_OUT std::vector< KeyLine > & | keypoints, | ||
const Mat & | mask = Mat() |
||
) |
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 |
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 |
これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
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 |
|
protectedvirtual |
implementation of line detection
|
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) |
|
virtual |
Read parameters from a FileNode object and store them
fn | source FileNode file |
cv::Algorithmを再実装しています。
CV_WRAP void cv::line_descriptor::BinaryDescriptor::setNumOfOctaves | ( | int | octaves | ) |
Set number of octaves
octaves | number of octaves |
CV_WRAP void cv::line_descriptor::BinaryDescriptor::setReductionRatio | ( | int | rRatio | ) |
Set reduction ratio (used in Gaussian pyramids)
rRatio | reduction ratio |
CV_WRAP void cv::line_descriptor::BinaryDescriptor::setWidthOfBand | ( | int | width | ) |
Set width of bands
width | width of bands |
|
virtual |