Detecting centerlines and estimating widths of linear structures are useful in low level computer vision. In this paper we consider the detection of linear structures with two parallel borders in 2D images. During a distance propagation process, we use a novel method named centerline hit detection to select pixels on the centerlines. Experimental results show the effectiveness and efficiency of our method in various applications. The proposed method can readily serve as a preprocessing step for solving computer vision tasks such as enhancement, recognition and classification.