Abstract
Abstract
The positioning problem of the barcode is easily affected by factors such as uneven illumination and complex background. Based on the EDLines line detection algorithm, a positioning algorithm that can deal with the barcode positioning problem under non-uniform lighting conditions is proposed. First, the EDLines algorithm is used to detect the straight-line segment of the image, and the midpoint coordinates of all line segments are extracted. Since the midpoint coordinates near the barcode are relatively densely distributed, the density-based HDBSCAN point clustering algorithm is used for all midpoint coordinates for density clustering. Then a filtering strategy based on the consistency of line segment direction is proposed to preliminarily filter the clustering results, and one or more point clustering results that may belong to the barcode area are obtained. Then the RANSAC algorithm is used to perform line fitting on the point clustering results. The accuracy of the straight-line fitting results is judged by direction consistency screening, and the intersection of the fitted straight line and the straight-line segment to which the centroid belongs is calculated for the results that meet the expectations, and the width of the barcode area is obtained. Finally, the straight-line segment obtained by screening is calculated. The average length and the height of the barcode area are got, to accurately locate the barcode position. Compared with the previous algorithms on the public barcode dataset and the self-made barcode dataset, the algorithm has good positioning accuracy and running speed.
Subject
Computer Science Applications,History,Education