Patent ID: 9652652
Date: 2017-05-16
CPC Classifications: G06K

Claim:
1. A method of identifying a two-dimensional bar code in digital image data of the bar code, the bar code comprising first and second type elements arranged in an ordered grid and having an outline that comprises an L-shape solid line without transitions between the first and second type elements, the method comprising: calculating a gradient field from the digital image data, the gradient field specifying a gradient of the pixel value in the digital image data; calculating gradient magnitude data from the gradient field; performing a thresholding operation on the calculated gradient magnitude data and obtaining edge segment image data; detecting linear segments in the edge segment image data; identifying pairs of opposite segments of the detected linear segments based on an angular criterion between two of the detected linear segments and based on a distance criterion considering a distance between one extremity of each of the two linear segments; and sampling partial digital image data corresponding to a rectangle area in the digital image data and detecting a presence of the first and second type elements in the partial digital image data, the rectangle area being defined by one of the identified pairs of detected linear segments, wherein digital image data of a first segment of an identified pair of opposite segments is scanned and transitions between first and second type elements along the first segment are counted and, in case no transitions were counted along the first segment, digital image data of a second segment of the pair of opposite segments is scanned and transitions between first and second type elements along the second segment are counted.