Abstract:The locating method of DPM 2D barcode image is studies in this paper. Because of the issue of reflective light of metal surface and the uneven surface, the DPM 2D barcode image collected will be of uneven illumination, low contrast, high light and other issues. These problems will impact on locating of DPM barcode greatly. In this paper, the homomorphic filtering method is used to enhance the image and the gradient projection method is used to locate the barcode region in preliminary. Because of the similar gray level between background and barcode which will result in segmentation error in the traditional thresholding method, an adaptive binarization method composed of Otsu method and neighborhood threshold method is used in this paper. Then the mathematical morphology method is used to fitting the "L" shape of Data Matrix barcode. Finally the convex hull algorithm is used to locate barcode region precisely. Experiment result shows that this method can solve uneven illumination and low contrast effectively and locate the barcode region quickly.