This paper mainly studies the image contour detection algorithm which can distinguish edges of different strengths. Based on the study of Probability-of-Boundary operator, we find that defects such as response suppression and offset exist in the algorithm during the detection of corners and curved edges, thus an improved algorithm is proposed. This algorithm retains the advantage in Probability-of-Boundary algorithm which can effectively distinguish the edge strength, while improves the above-mentioned defects. And an improved algorithm is proposed to characterize the strength of boundary reasonably, making the test results in line with human subjective recognition results.