Patent ID: 8915443

Claim:
A method for decoding a linear barcode in an image, by a sensor having a set of pixels, the method comprising: a) selecting a predetermined scanning line, comprising a first ordered set of pixels, in which each pixel is identified by a first index and has a respective individual impinged intensity value; b) decoding said barcode by constructing a profile of said barcode from the individual impinged intensity values of said pixels of said predetermined scanning line; c) obtaining a second set of scanning lines, which also comprises said predetermined scanning line, in which said scanning lines are ordered according to a second index and each scanning line comprises a respective first set of pixels for defining a third set of pixels, each identified by said first index and by said second index and having a respective individual impinged intensity value; and d) selecting a fourth ordered set of pixels from said third set of pixels and constructing an oversampled profile of said barcode by ordering individual impinged intensity values from the individual impinged intensity values of said pixels of said fourth set, said fourth set of pixels comprising pixels of said predetermined scanning line and further pixels of said third set that do not belong to said predetermined scanning line, to obtain a subpixel resolution that is able to decode said barcode wherein said selecting a fourth ordered set of pixels comprises: e) calculating, for each pixel of said third set a corresponding exact shift value depending on the value of said first index and of said second index of said pixel; and f) processing said exact shift values thus obtaining an ordered fifth set of said exact shift values, each exact shift value of said fifth set being associated with a respective pixel of said third set; and g) each pixel of said fourth set of pixels being selected and ordered according to the order indicated by said fifth set of exact shift values.