该类实现了线条检测及其二值描述符计算的功能。更多...
#include <opencv2/line_descriptor/descriptor.hpp>
|
| | BinaryDescriptor (const BinaryDescriptor::Params ¶meters=BinaryDescriptor::Params()) |
| | 构造函数。
|
| |
| | ~BinaryDescriptor () |
| |
| void | compute (const Mat &image, std::vector< KeyLine > &keylines, Mat &descriptors, bool returnFloatDescr=false) const |
| | 需要计算描述符。
|
| |
| 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 |
| | 返回描述符大小。
|
| |
| int | descriptorType () const |
| | 返回数据类型。
|
| |
| void | detect (const Mat &image, std::vector< KeyLine > &keypoints, const Mat &mask=Mat()) |
| | 需要进行线条检测。
|
| |
| void | detect (const std::vector< Mat > &images, std::vector< std::vector< KeyLine > > &keylines, const std::vector< Mat > &masks=std::vector< Mat >()) const |
| |
| int | getNumOfOctaves () |
| | 获取当前八度数。
|
| |
| int | getReductionRatio () |
| | 获取当前缩减比率(用于高斯金字塔)
|
| |
| int | getWidthOfBand () |
| | 获取当前波段宽度。
|
| |
| virtual void | operator() (InputArray image, InputArray mask, std::vector< KeyLine > &keylines, OutputArray descriptors, bool useProvidedKeyLines=false, bool returnFloatDescr=false) const |
| | 定义操作符 '()' 以执行 KeyLine 检测和描述符的顺序计算。
|
| |
| virtual void | read (const cv::FileNode &fn) CV_OVERRIDE |
| | 从 FileNode 对象读取参数并存储。
|
| |
| void | setNumOfOctaves (int octaves) |
| | 设置八度数。
|
| |
| void | setReductionRatio (int rRatio) |
| | 设置缩减比率(用于高斯金字塔)
|
| |
| void | setWidthOfBand (int width) |
| | 设置波段宽度。
|
| |
| virtual void | write (cv::FileStorage &fs) const CV_OVERRIDE |
| | 将参数存储到 FileStorage 对象。
|
| |
| | Algorithm () |
| |
| virtual | ~Algorithm () |
| |
| virtual void | clear () |
| | 清除算法状态。
|
| |
| virtual bool | empty () const |
| | 如果 Algorithm 为空(例如,在最开始或读取不成功后),则返回 true。
|
| |
| virtual String | getDefaultName () const |
| |
| virtual void | save (const String &filename) const |
| |
| void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
| |
| void | write (FileStorage &fs, const String &name) const |
| |
该类实现了线条检测及其二值描述符计算的功能。
该类的接口主要基于经典的检测器和提取器,例如 Feature2d 的特征检测与描述和描述符匹配器。获取到的线条信息存储在line_descriptor::KeyLine 对象中。
◆ BinaryDescriptor()
构造函数。
- 参数
-
如果未提供参数,构造函数将设置默认值(请参阅上一节代码片段中的注释)。强烈建议使用默认值。
◆ ~BinaryDescriptor()
| cv::line_descriptor::BinaryDescriptor::~BinaryDescriptor |
( |
| ) |
|
◆ 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 |
需要计算描述符。
- 参数
-
| image | 输入图像 |
| keylines | 包含需要计算描述符的线条的向量 |
| descriptors | |
| returnFloatDescr | 标志(设置为 true 时,返回原始非二值描述符) |
◆ 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 |
这是一个重载的成员函数,为方便起见而提供。它与上述函数的区别仅在于接受的参数。
- 参数
-
| images | 输入图像 |
| keylines | 包含需要计算描述符的线条的向量集 |
| descriptors | |
| returnFloatDescr | 标志(设置为 true 时,返回原始非二值描述符) |
◆ computeImpl()
| virtual void cv::line_descriptor::BinaryDescriptor::computeImpl |
( |
const Mat & | imageSrc, |
|
|
std::vector< KeyLine > & | keylines, |
|
|
Mat & | descriptors, |
|
|
bool | returnFloatDescr, |
|
|
bool | useDetectionData ) const |
|
保护虚函数 |
◆ 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 |
◆ createBinaryDescriptor() [2/2 重载]
| Python |
|---|
| cv.line_descriptor.BinaryDescriptor.createBinaryDescriptor( | | ) -> | retval |
| cv.line_descriptor.BinaryDescriptor_createBinaryDescriptor( | | ) -> | retval |
◆ defaultNorm()
| int cv::line_descriptor::BinaryDescriptor::defaultNorm |
( |
| ) |
const |
◆ descriptorSize()
| int cv::line_descriptor::BinaryDescriptor::descriptorSize |
( |
| ) |
const |
◆ descriptorType()
| int cv::line_descriptor::BinaryDescriptor::descriptorType |
( |
| ) |
const |
◆ 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 |
需要进行线条检测。
- 参数
-
| image | 输入图像 |
| keypoints | 将存储一个或多个图像的提取线的向量 |
| mask | 仅检测感兴趣的 KeyLines 的掩码矩阵 |
◆ 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 |
这是一个重载的成员函数,为方便起见而提供。它与上述函数的区别仅在于接受的参数。
- 参数
-
| images | 输入图像 |
| keylines | 将存储一个或多个图像中提取的线条的向量集 |
| 遮罩 | 掩码矩阵向量,用于从每个输入图像中仅检测感兴趣的 KeyLine |
◆ detectImpl()
| virtual void cv::line_descriptor::BinaryDescriptor::detectImpl |
( |
const Mat & | imageSrc, |
|
|
std::vector< KeyLine > & | keylines, |
|
|
const Mat & | mask = Mat() ) const |
|
保护虚函数 |
◆ getNumOfOctaves()
| int cv::line_descriptor::BinaryDescriptor::getNumOfOctaves |
( |
| ) |
|
| Python |
|---|
| cv.line_descriptor.BinaryDescriptor.getNumOfOctaves( | | ) -> | retval |
◆ getReductionRatio()
| int cv::line_descriptor::BinaryDescriptor::getReductionRatio |
( |
| ) |
|
| Python |
|---|
| cv.line_descriptor.BinaryDescriptor.getReductionRatio( | | ) -> | retval |
◆ getWidthOfBand()
| int cv::line_descriptor::BinaryDescriptor::getWidthOfBand |
( |
| ) |
|
| Python |
|---|
| cv.line_descriptor.BinaryDescriptor.getWidthOfBand( | | ) -> | retval |
◆ 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 |
定义操作符 '()' 以执行 KeyLine 检测和描述符的顺序计算。
- 参数
-
| image | 输入图像 |
| mask | 掩码矩阵,用于从提取的线条中选择 KeyLines 中必须接受的线条(当 keylines 不为空时使用) |
| keylines | 包含输入线条的向量(填充后,将跳过检测部分,输入线条将作为描述符计算算法的输入) |
| descriptors | 将存储最终描述符的矩阵 |
| useProvidedKeyLines | 标志(设置为 true 时,将跳过检测阶段,仅使用 keylines 中提供的线条执行描述符计算) |
| returnFloatDescr | 标志(设置为 true 时,返回原始非二值描述符) |
◆ read()
| virtual void cv::line_descriptor::BinaryDescriptor::read |
( |
const cv::FileNode & | fn | ) |
|
|
virtual |
◆ setNumOfOctaves()
| void cv::line_descriptor::BinaryDescriptor::setNumOfOctaves |
( |
int | octaves | ) |
|
| Python |
|---|
| cv.line_descriptor.BinaryDescriptor.setNumOfOctaves( | octaves | ) -> | 无 |
◆ setReductionRatio()
| void cv::line_descriptor::BinaryDescriptor::setReductionRatio |
( |
int | rRatio | ) |
|
| Python |
|---|
| cv.line_descriptor.BinaryDescriptor.setReductionRatio( | rRatio | ) -> | 无 |
◆ setWidthOfBand()
| void cv::line_descriptor::BinaryDescriptor::setWidthOfBand |
( |
int | width | ) |
|
| Python |
|---|
| cv.line_descriptor.BinaryDescriptor.setWidthOfBand( | width | ) -> | 无 |
◆ write()
| virtual void cv::line_descriptor::BinaryDescriptor::write |
( |
cv::FileStorage & | fs | ) |
const |
|
virtual |
此类的文档生成自以下文件