c# - HoughLinesP参数!单元?

标签 c# opencv

我正在使用 OpenCV 2.4.2

这是 OpenCV 文档中的引文

C++: void HoughLinesP(InputArray image, OutputArray lines, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0 )

Parameters:

image – 8-bit, single-channel binary source image. The image may be modified by the function.

lines – Output vector of lines. Each line is represented by a 4-element vector , where and are the ending points of each detected line segment.

rho – Distance resolution of the accumulator in pixels.

theta – Angle resolution of the accumulator in radians.

threshold – Accumulator threshold parameter. Only those lines are returned that get enough votes().

minLineLength – Minimum line length. Line segments shorter than that are rejected.

maxLineGap – Maximum allowed gap between points on the same line to link them

我的问题是

minLineLengthma​​xLineGap 是以像素为单位测量的吗?或者什么?

最佳答案

翻阅旧的 Intel OpenCV 手册,您可以看到它将 LineLength 描述为 Pixels http://opencv.jp/opencv-1.0.0_org/docs/opencvman_old.pdf

It retrieves no more than linesNumber line segments; each of those must be not shorter than lineLength pixels.

像素在这里似乎是最合乎逻辑的。 Rho,累加器的距离分辨率定义为以像素为单位。

此处的示例显示使用的值为 30:
http://www.scribd.com/doc/77374092/155/cv-HoughLinesP

关于c# - HoughLinesP参数!单元?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14022385/

相关文章:

C# 和 File.WriteAllText 错误

c++ - 在 C++ OpenCV 中的图像上制作 32x32 部分?

opencv - Droidcam未连接到OpenCV

android - 将OpenCV与Android Project集成

c# - 替换多个 JObject 中属性的 JSON 值

c# - 包含 HTML 显示原始文本的数据库字段

c# - C#中构造函数的where子句?

python - 计算图像中的单元格数

android - Opencv 的 javacameraview 无法在 Android Marshmallow 设备上打开相机

c# - NHibernate fluent HasMany映射插入NULL外键