ImageMagick的hough变换说明
预览: 我使用下面提到的代码进行了hough线检测:ImageMagick的hough变换说明,imagemagick,Imagemagick,预览: 我使用下面提到的代码进行了hough线检测: convert image.jpg -threshold 90% -canny 0x1+10%+30% \ \( +clone -background none \ -fill red -stroke red -strokewidth 2 \ -hough-lines 5x5+80 -write lines
convert image.jpg -threshold 90% -canny 0x1+10%+30% \
\( +clone -background none \
-fill red -stroke red -strokewidth 2 \
-hough-lines 5x5+80 -write lines.mvg \
\) -composite hough.png
我在一个.mvg文件中写下了该行的详细信息。.mvg文件内容如下所示:
# Hough line transform: 5x5+80
viewbox 0 0 640 360
line 448.256,0 473.43,360 # 104
line 0,74.5652 640,29.8121 # 158
line 0,289.088 640,244.335 # 156
line 0,292.095 640,247.342 # 133
line 154.541,0 179.714,360 # 125
line 151.533,0 176.707,360 # 145
在这里检查输出hough.png文件
问题:
#
是最大值。它默认为计数
,由行计数
设置,返回时受指定的阈值
影响。如果矩阵元素计数大于上一次高度/宽度迭代,则该数字将减少。所以如果将阈值设为-hough lines 5x5+80
,则发现行448.256,0 473.43360#104
超过阈值约24个像素(或行?)。下一次迭代将把最大值
放在80
threashold下面,因此我们停止比较矩阵元素
我也想知道坐标是如何分配的
我只能通过伪引用源代码来回答这个问题,但这是基本的三角学
如果((x>=45)%%(x