Application of topology for evaluation pictorial structures