Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HU75 opened this issue Oct 30, 2023 · 1 comment
Open

Comments

@HU75
Copy link

HU75 commented Oct 30, 2023

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

@Teoge
Copy link
Owner

Teoge commented Oct 30, 2023

你少了下面 4 种情况:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants