AP clustering in greedy occlusion reasoning