摘要 |
The present disclosure relates to a straight line detection method and device, belonging to the field of image processing. The method comprises: acquiring a gradient histogram feature set of various pixel points in an image, the gradient histogram feature set being used for reflecting a straight line characteristic of a local part where the pixel points are located; according to the gradient histogram feature set of the various pixel points, determining at least one alternative direction of a straight line to be detected; and according to the alternative direction, determining the accurate direction and position of the straight line to be detected. The present disclosure solves the problem in the related art that the related straight line detection method will cause straight line breakage and inaccurate detection result when the edge intensity is weak or noise interference exists. The straight line detection method provided in the present disclosure does not use Hough transformation and does not need to conduct binarization on an image, thereby fully avoiding the impact of error caused by binarization, and improving the accuracy of straight line detection. |