实现来自 [70] 的边缘检测算法的类: 更多...
#include <opencv2/ximgproc/structured_edge_detection.hpp>
|
| virtual void | computeOrientation (cv::InputArray src, cv::OutputArray dst) const =0 |
| | 该函数从边缘图像计算方向。
|
| |
| virtual void | detectEdges (cv::InputArray src, cv::OutputArray dst) const =0 |
| | 该函数检测 src 中的边缘并将它们绘制到 dst 中。
|
| |
| virtual void | edgesNms (cv::InputArray edge_image, cv::InputArray orientation_image, cv::OutputArray dst, int r=2, int s=0, float m=1, bool isParallel=true) const =0 |
| | 该函数在边缘图像中进行 edgenms,并抑制边缘强度在正交方向上更强的边缘。
|
| |
| | Algorithm () |
| |
| virtual | ~Algorithm () |
| |
| virtual void | clear () |
| | 清除算法状态。
|
| |
| virtual bool | empty () const |
| | 如果 Algorithm 为空(例如,在最开始或读取失败后),则返回 true。
|
| |
| virtual String | getDefaultName () const |
| |
| virtual void | read (const FileNode &fn) |
| | 从文件存储中读取算法参数。
|
| |
| virtual void | save (const String &filename) const |
| |
| void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
| |
| virtual void | write (FileStorage &fs) const |
| | 将算法参数存储到文件存储中。
|
| |
| void | write (FileStorage &fs, const String &name) const |
| |
◆ computeOrientation()
| Python |
|---|
| cv.ximgproc.StructuredEdgeDetection.computeOrientation( | src[, dst] | ) -> | dst |
◆ detectEdges()
| Python |
|---|
| cv.ximgproc.StructuredEdgeDetection.detectEdges( | src[, dst] | ) -> | dst |
该函数检测 src 中的边缘并将它们绘制到 dst 中。
该函数底层的算法比常见方法(例如 Sobel)对纹理的存在更鲁棒
- 参数
-
| src | 源图像(RGB,float,在 [0;1] 中)用于检测边缘 |
| dst | 目标图像(灰度,float,在 [0;1] 中),其中边缘被绘制 |
- 另见
- Sobel, Canny
◆ edgesNms()
| Python |
|---|
| cv.ximgproc.StructuredEdgeDetection.edgesNms( | edge_image, orientation_image[, dst[, r[, s[, m[, isParallel]]]]] | ) -> | dst |
该函数在边缘图像中进行 edgenms,并抑制边缘强度在正交方向上更强的边缘。
- 参数
-
| edge_image | 来自 detectEdges 函数的边缘图像。 |
| orientation_image | 来自 computeOrientation 函数的方向图像。 |
| dst | 抑制后的图像(灰度,float,在 [0;1] 中) |
| r | NMS 抑制的半径。 |
| s | 边界抑制的半径。 |
| m | 保守抑制的乘数。 |
| isParallel | 启用/禁用并行计算。 |
该类的文档从以下文件生成