表格线识别通用库文档
载入中...
搜索中...
未找到
cm::imp::LinesDetection类 参考

线检测动作类 更多...

#include <image_preprocess.hpp>

类 cm::imp::LinesDetection 继承关系图:
cm::imp::LinesDetection 的协作图:

struct  DashedLinesDetection
 虚线(表示模糊不清的实线)检测(仅支持长线的霍夫直线检测)
 
struct  DottedLinesDetection
 点线(由小线段或点构成的线)检测(仅支持长线的霍夫直线检测)
 
struct  SolidLinesDetection
 实线检测(支持任意长度线的霍夫直线检测)
 

Public 成员函数

 LinesDetection (const SolidLinesDetection &_, LineType line_type, const Percent &ksize_or_scale=1.0/75)
 线检测动作的构造函数
 
 LinesDetection (const DashedLinesDetection &_, LineType line_type, const Percent &ksize_or_scale=1.0/200)
 线检测动作的构造函数
 
 LinesDetection (const DottedLinesDetection &_, LineType line_type, const Percent &dilate_ksize_or_scale=5, const Percent &open_ksize_or_scale=1.0/30)
 线检测动作的构造函数
 
 LinesDetection (const LinesDetection &lines_detection)=default
 线检测类默认构造函数
 
 ~LinesDetection ()=default
 线检测析构函数
 
cv::Mat Preprocess (const cv::Mat &image) const override
 预处理图像
 
- Public 成员函数 继承自 cm::ImagePreprocessor
 ImagePreprocessor ()=default
 图像预处理器类的默认构造函数
 
 ImagePreprocessor (const ImagePreprocessor &img_preprocessor)=default
 图像预处理器类的拷贝构造函数
 
virtual ~ImagePreprocessor ()=default
 图像预处理器类的析构函数
 
ImagePreprocessor operator| (const ImagePreprocessor &img_preprocessor) const
 图像预处理器类重载 | 运算符
 
ImagePreprocessoroperator|= (const ImagePreprocessor &img_preprocessor)
 图像预处理器类重载 |= 运算符
 
ImagePreprocessorAddAction (const ImagePreprocessor &img_preprocessor)
 增加图像预处理动作
 
cv::Mat operator() (const cv::Mat &image) const
 图像预处理器类重载括号运算符
 

静态 Public 属性

static const struct cm::imp::LinesDetection::SolidLinesDetection SOLID
 实线
 
static const struct cm::imp::LinesDetection::DashedLinesDetection DASHED
 虚线
 
static const struct cm::imp::LinesDetection::DottedLinesDetection DOTTED
 点线
 

详细描述

线检测动作类

该类共有继承 ImagePreprocessor ,用于对图像进行各种线的检测。

注意
仅支持单通道图
作者
dreamy-xay
日期
2023-12-17

在文件 image_preprocess.hpp609 行定义.

构造及析构函数说明

◆ LinesDetection() [1/4]

cm::imp::LinesDetection::LinesDetection ( const SolidLinesDetection & _,
LineType line_type,
const Percent & ksize_or_scale = 1.0 / 75 )
inlineexplicit

线检测动作的构造函数

该构造函数用于初始化线检测对象,根据线的类型和参数进行初始化操作,并调用初始化函数 Init() 。在构造函数中,通过获取实线二值图(先做单向开运算,再做单向闭运算),对图像进行预处理以获得实线二值图。

参数
_获取实线二值图(先做单向开运算,再做单向闭运算)
line_type线类型,仅支持横线和竖线,即 cm::HLINEcm::VLINE
ksize_or_scale开运算核大小一半,闭运算核大小(支持百分数和大于1的整数,为百分数时,检测横线表示宽度的百分比,反之表示高度的百分比) 默认为 1.0 / 75
作者
dreamy-xay
日期
2024-01-27

在文件 image_preprocess.hpp642 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ LinesDetection() [2/4]

cm::imp::LinesDetection::LinesDetection ( const DashedLinesDetection & _,
LineType line_type,
const Percent & ksize_or_scale = 1.0 / 200 )
inlineexplicit

线检测动作的构造函数

该构造函数用于初始化线检测对象,根据线的类型和参数进行初始化操作,并调用初始化函数Init()。在构造函数中,通过获取虚线(表示模糊不清的实线)二值图(只做单向腐蚀),对图像进行预处理以获得虚线二值图。

参数
_获取虚线(表示模糊不清的实线)二值图(只做单向腐蚀)
line_type线类型,仅支持横线和竖线,即 cm::HLINEcm::VLINE
ksize_or_scale腐蚀核大小(支持百分数和大于1的整数,为百分数时,检测横线表示宽度的百分比,反之表示高度的百分比) 默认为 1.0 / 200
作者
dreamy-xay
日期
2024-01-27

在文件 image_preprocess.hpp657 行定义.

函数调用图:

◆ LinesDetection() [3/4]

cm::imp::LinesDetection::LinesDetection ( const DottedLinesDetection & _,
LineType line_type,
const Percent & dilate_ksize_or_scale = 5,
const Percent & open_ksize_or_scale = 1.0 / 30 )
inlineexplicit

线检测动作的构造函数

该构造函数用于初始化点线检测对象,根据线的类型和参数进行初始化操作,并调用初始化函数Init()。在构造函数中,通过获取点线(由小线段或点构成的线)二值图,对图像进行预处理以获得点线二值图。

参数
_获取点线(由小线段或点构成的线)二值图(先做单向轻微膨胀,再做单向剧烈开运算)
line_type线类型,仅支持横线和竖线,即 cm::HLINEcm::VLINE
dilate_ksize_or_scale膨胀核大小(支持百分数和大于1的整数,为百分数时,检测横线表示宽度的百分比,反之表示高度的百分比) 默认为 5
open_ksize_or_scale开运算核大小(支持百分数和大于1的整数,为百分数时,检测横线表示宽度的百分比,反之表示高度的百分比) 默认为 1.0 / 30
作者
dreamy-xay
日期
2024-01-27

在文件 image_preprocess.hpp673 行定义.

函数调用图:

◆ LinesDetection() [4/4]

cm::imp::LinesDetection::LinesDetection ( const LinesDetection & lines_detection)
default

线检测类默认构造函数

◆ ~LinesDetection()

cm::imp::LinesDetection::~LinesDetection ( )
default

线检测析构函数

成员函数说明

◆ Preprocess()

cv::Mat cm::imp::LinesDetection::Preprocess ( const cv::Mat & image) const
inlineoverridevirtual

预处理图像

该函数用于对输入图像进行预处理,以便后续线检测操作。根据线的类型和参数进行不同的图像处理操作,并返回处理后的图像。

参数
image需要预处理的图像
返回
预处理后的图像
作者
dreamy-xay
日期
2024-01-27

重载 cm::ImagePreprocessor .

在文件 image_preprocess.hpp693 行定义.

类成员变量说明

◆ DASHED

const LinesDetection::DashedLinesDetection cm::imp::LinesDetection::DASHED
static

虚线

在文件 image_preprocess.hpp757 行定义.

◆ DOTTED

const LinesDetection::DottedLinesDetection cm::imp::LinesDetection::DOTTED
static

点线

在文件 image_preprocess.hpp759 行定义.

◆ SOLID

const LinesDetection::SolidLinesDetection cm::imp::LinesDetection::SOLID
static

实线

在文件 image_preprocess.hpp755 行定义.


该类的文档由以下文件生成: