Skip to content

感谢大佬开源,我结合论文和代码看了一下有一点疑问 #36

@HU75

Description

@HU75

process.py中有pair_marking_points函数,这其中我枚举了一下是有以下12种情况能够返回1或者-1,进而组成slot:

  • 返回1的情况:
    • 当point_a的形状是t_up或者l_up,同时point_b的形状为t_down或者l_down -> 4种
    • 当point_a的形状是t_middle,且point_b的形状为t_down或者l_down -> 2种
  • 返回-1的情况:
    • 当point_a的形状是为t_down或者l_down,同时point_b的形状是t_up或者l_up -> 4种
    • 当point_a的形状是t_middle,且point_b的形状是t_up或者l_up -> 2种

但是看一些解读以及论文中的Fig.5看确实有16种组合情况。请问下是我在哪里遗漏了吗?

def pair_marking_points(point_a, point_b):
"""See whether two marking points form a slot."""
vector_ab = np.array([point_b.x - point_a.x, point_b.y - point_a.y])
vector_ab = vector_ab / np.linalg.norm(vector_ab)
point_shape_a = detemine_point_shape(point_a, vector_ab)
point_shape_b = detemine_point_shape(point_b, -vector_ab)
if point_shape_a.value == 0 or point_shape_b.value == 0:
return 0
if point_shape_a.value == 3 and point_shape_b.value == 3:
return 0
if point_shape_a.value > 3 and point_shape_b.value > 3:
return 0
if point_shape_a.value < 3 and point_shape_b.value < 3:
return 0
if point_shape_a.value != 3:
if point_shape_a.value > 3:
return 1
if point_shape_a.value < 3:
return -1
if point_shape_a.value == 3:
if point_shape_b.value < 3:
return 1
if point_shape_b.value > 3:
return -1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions