Perceptual grouping is an important mechanism in human visual system, which happened in the middle stage of information processing. In this paper, we mainly care about edge perceptual grouping, and define new measurement of gestalt rules. Proximity, good continuation and similarity of edges are measured by local features, distance, orientation changes and HSV histogram difference. Closure of a contour is assured by global topological property considering edges affinity probability. Experiment results show good performance of our model, especially when gap or occlusion happens.