①
junk_index1 = np.argwhere(gl==-1)
junk_index2 = np.intersect1d(query_index, camera_index)
intersect1d(x, y) 計算x和y中的公共元素,並返回有序結果.即同一camera下的相同id爲第二類 junk
junk_index = np.append(junk_index2, junk_index1) #.flatten())
②
# remove junk_index
mask = np.in1d(index, junk_index, invert=True) # 即保留junk 的index
index = index[mask]
np.in1d(x,y)# 返回x和y的交集