Line segment detection is a fundamental task in the field of machine vision. Usually, the detection processes need various pre-processing, such as image filtering, edge detection and extraction, which have a significant impact on the line segment detection. To tackle this problem, this paper introduced a new concept named contour difference, and presented a new algorithm based on the difference to detect line segments. By use of the new difference, the process of line detection is converted to searching for local maximum in contour differences. The detection algorithm needs no any pre-processing on the input image beyond the calculation of contour difference. Experiments on gray scale field images show that the proposed method can localize most plants accurately, even in the inference of noise and blur.