摘要 |
Embodiments of the invention relate to decoding encoded barcode information from a camera-captured image by generating a binarized sequence from the camera-captured image and decoding the encoded barcode information from the binarized sequence. The camera-captured image is transformed into a preprocessed grayscale image, reducing noise and enhancing contrast between bars and spaces in the preprocessed image. A barcode orientation is identified that is parallel to bars in the preprocessed image. A projected sequence is generated by projecting pixels of the preprocessed image along the barcode orientation. The binarized sequence is generated by applying a threshold to detected peaks and valleys of the projected sequence. A barcode-encoding sequence is generated, from the binarized sequence, in which each barcode bar module and each barcode space module is represented by a single respective bit in the barcode-encoding sequence. The barcode encoded information is extracted from the barcode-encoding sequence.
|