- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试实现级联霍夫变换(我已经实现了“普通”版本。)但我无法理解以下内容:
在图像上应用 HT 后,我在霍夫空间中留下了直线。 Cascaded 版本的 HT 需要我将 hough 空间拆分为 3 个子空间,以便解决无界值的问题。
我该怎么做呢?
这是霍夫空间如何分割的图片:
In order to restore the boundedness of the parameter space while preserving the symmetric space duality, we will split the (a, b)-space into three bounded subspaces, as shown in the figure below. The first subspace also has coordinates a and b, but only for | a | <= 1 and | b | <= 1. If | a | > 1 and | b | <= | a | , the point (a, b) turns up in the second subspace, with coordinates 1/a and b/a. If, finally, | b | > 1 and | a | < | b |, we use a third subspace with coordinates 1/b and a/b.
这是我非常困惑的地方,假设我在霍夫空间中有一条线。违反了怎么拆分 |一个 | <= 1 和 |乙 | <= 1?
我是否简单地遍历行中的所有像素,如果有问题的像素的坐标大于 |一个 | <= 1 和 |乙 | <= 1,我把它画在第二个子空间?
如果此类问题在 Stack Overlow 上不受欢迎,我深表歉意 - 是否有其他网站可以让我提出有关算法的问题?
最佳答案
假设您有一个点(x, y)
。在呈现的霍夫变换下,它转到直线
a x + b + y = 0
这对应于每个子空间图中的不同线:
Subspace 1: a x + b + y = 0
Subspace 2: x + (b/a) + (1/a) y = 0
Subspace 2: (a/b) x + 1 + (1/b) y = 0
例如点 (2, 1)
你得到三行:
Subspace 1: 2a + b + 1 = 0
Subspace 2: 2 + (b/a) + (1/a) = 0
Subspace 2: 2(a/b) + 1 + (1/b) = 0
或者放入y = m x + c
形式:
Subspace 1: y = -2x - 1
Subspace 2: y = -x - 2
Subspace 2: y = -x/2 - 1
关于algorithm - 将坐标拆分为 3 个子空间以解决无界性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4094309/
我是一名优秀的程序员,十分优秀!