AdvancedEAST icon indicating copy to clipboard operation
AdvancedEAST copied to clipboard

据说[np.minimum(dis[i], dis[(i + 1) % 4]) for i in range(4)]顺序错了?

Open woshi91 opened this issue 5 years ago • 2 comments

def shrink(xy_list, ratio=cfg.shrink_ratio): if ratio == 0.0: return xy_list, xy_list diff_1to3 = xy_list[:3, :] - xy_list[1:4, :] diff_4 = xy_list[3:4, :] - xy_list[0:1, :] diff = np.concatenate((diff_1to3, diff_4), axis=0) dis = np.sqrt(np.sum(np.square(diff), axis=-1)) # determine which are long or short edges long_edge = int(np.argmax(np.sum(np.reshape(dis, (2, 2)), axis=0))) short_edge = 1 - long_edge # cal r length array #r = [np.minimum(dis[i], dis[(i + 1) % 4]) for i in range(4)] r = [np.minimum(dis[3], dis[(3 + 1) % 4])] for i in range(3): r.append(np.minimum(dis[i], dis[(i + 1) % 4]))

woshi91 avatar Feb 28 '19 05:02 woshi91

https://blog.csdn.net/linchuhai/article/details/84677249

woshi91 avatar Feb 28 '19 06:02 woshi91

Can anyone confirm this problem?

hcnhatnam avatar Mar 08 '19 15:03 hcnhatnam