【发布时间】:2022-01-17 22:38:23
【问题描述】:
【问题讨论】:
【问题讨论】:
为多边形的顶点集计算image moments。
例如 - 将所有 x[i] 和 y[i] 求和,然后除以顶点数以获得质心坐标 (cx=m10/m00 and cy=m01/m00)。
对中心时刻做类似的事情。例如:
mu11 = sum((x[i]-cx)*(y[i]-cy))
以Theta(在示例部分中)通过质心的角度构建线。
如果多边形具有镜像对称性,每个顶点都会有另一个顶点作为镜像 - 找到任何一对就足够了,然后依次检查另一对)
供参考 - how to get mirror point against line
L = A + AB * ScalarProduct(AB, AP) / ScalarProduct(AB, AB)
Mirror point
P' = P + 2*(L-P) = 2*L-P
【讨论】: