def strict_local_maximum(prob_map):
prob_gau = np.zeros(prob_map.shape)
sn.gaussian_filter(prob_map, 2,
output=prob_gau,
mode='mirror')
prob_fil = np.zeros(prob_map.shape)
sn.rank_filter(prob_gau, -2,
output=prob_fil,
footprint=np.ones([3, 3]))
temp = np.logical_and(prob_gau > prob_fil,
prob_map > HIGH_PROB) * 1.
idx = np.where(temp > 0)
return idx
评论列表
文章目录