Data matrix code, generating method and device thereof, and decoding method and device thereof
Gespeichert in:
| Titel: | Data matrix code, generating method and device thereof, and decoding method and device thereof |
|---|---|
| Patent Number: | 12164,999 |
| Publikationsdatum: | December 10, 2024 |
| Appl. No: | 17/634696 |
| Application Filed: | April 01, 2019 |
| Abstract: | Disclosed is a Data Matrix (DM) code. An image of the DM code consists of several color blocks arranged in a rectangular array, a circle of color blocks on the edge of the image constitutes a positioning region, and the color blocks inside the image constitute a coding region; the positioning region includes an “L”-shaped edge and a positioning edge opposite to the “L”-shaped edge, wherein the colors of the color blocks include at least three of eight colors, the eight colors being three standard RGB colors, four standard CMYK colors, and white. The positioning edge is formed by alternately arranging color blocks of two colors that are black after filtering by a channel in any color of RGB and white after filtering by a channel in the same color. |
| Inventors: | HANGZHOU BIOBANK BIOTECH INC. (Hangzhou, CN) |
| Assignees: | HANGZHOU BIOBANK BIOTECH INC. (Hangzhou, CN) |
| Claim: | 1. A Data Matrix (DM) code generating method, comprising: reading source data information; and converting the source data information into a binary data code stream according to corresponding rules in Datamatrix coding rules; successively dividing the binary data code stream into groups of three values, so as to obtain a plurality of data segments; converting each data segment into a corresponding color in accordance with a coding mapping rule, the coding mapping rule including: mapping 1 in each data segment as being equivalent to 255 and mapping 0 in each data segment as being equivalent to 0; and based on a particular coloring order, successively corresponding 0 and 255 in each data segment to a color channel of RGB, thereby generating particular colors; and generating a DM code image by filling color blocks in accordance with the particular colors and a filling rule in the Datamatrix coding rules, an image of the DM code including a plurality of color blocks arranged in arrays that form a rectangle, peripheral color blocks located on edges of the image constituting a positioning region, and inner color blocks inside the image constituting a coding region; the positioning region comprising an “L”-shaped edge and a positioning edge opposite to the “L”-shaped edge; wherein: colors of the plurality of color blocks comprise at least three of eight colors, the eight colors being three standard RGB colors, four standard CMYK colors, and white; and the positioning edge is formed by alternately arranging black color blocks and white color blocks, the black color blocks being obtained after filtering a channel in any color of RGB to black, and the white color blocks being obtained by filtering the channel to white. |
| Claim: | 2. The method according to claim 1 , wherein: when the particular coloring order, in the coding mapping rule, is red, green and blue in sequence, a corresponding relationship between each data segment and each color is as follows: 000 corresponds to black, 001 corresponds to blue, 010 corresponds to green, 011 corresponds to cyan, 100 corresponds to red, 101 corresponds to magenta, 110 corresponds to yellow, and 111 corresponds to white. |
| Claim: | 3. A DM code decoding method, comprising: reading a DM code image, the DM code image including a plurality of color blocks arranged in arrays that form a rectangle, peripheral color blocks located on edges of the image constituting a positioning region, and inner color blocks inside the image constituting a coding region; the positioning region comprising an “L”-shaped edge and a positioning edge opposite to the “L”-shaped edge, wherein colors of the plurality of color blocks comprise at least three of eight colors, the eight colors being three standard RGB colors, four standard CMYK colors, and white; and the positioning edge is formed by alternately arranging black color blocks and white color blocks, the black color blocks being obtained after filtering a channel in any color of RGB to black, and the white color blocks being obtained by filtering the channel to white; determining the positioning region and the coding region of the DM code image; restoring the coding region to binary data code streams; and converting the binary data code streams into source data information according to corresponding rules in Datamatrix decoding rules; wherein: determining a positioning region and a coding region of the DM code image comprises: performing successive filtering by three color channels, RGB, so as to obtain three coded grayscale images corresponding to each color channel, respectively; and determining, based on the obtained grayscale images, the positioning region and the coding region of the DM code image; restoring the coding region to binary data code streams comprises: converting the color of each color block into one data segment containing three binary values in accordance with a decoding mapping rule, the decoding mapping rule involving: making grayscale values close to 0 equivalent to 0 and grayscale values close to 255 equivalent to 1, and based on a particular order of filtering, enabling the grayscale values of the color blocks to correspond to particular data segments consisting of 0 and 1; and successively de-grouping all the data segments according to an order of arrangement of the data segments, to form complete binary data code streams. |
| Claim: | 4. The method according to claim 3 , wherein: when the particular order of filtering, in the decoding mapping rule, is red, green and blue in sequence, a corresponding relationship between each color and the data segment includes: black corresponds to 000, blue corresponds to 001, green corresponds to 010, cyan corresponds to 011, red corresponds to 100, magenta corresponds to 101, yellow corresponds to 110, and white corresponds to 111. |
| Claim: | 5. The method according to claim 3 , further comprising: determining the colors of the obtained DM code image, and if the DM code image has a black and white DM code, then decoding the DM code image according to the Datamatrix decoding rule to obtain the source data information; if the DM code image has a 2D color code, then proceeding to the step of converting the color of each color block into one data segment containing three binary values in accordance with a mapping rule. |
| Claim: | 6. The method according to claim 5 , wherein determining the colors of the obtained DM code image comprises: determining that the DM code image has the black and white DM code if, in the three grayscale images, the grayscale values of all the color blocks having non-zero grayscale values are all identical, otherwise determining that the DM code image has the 2D color code. |
| Claim: | 7. The method according to claim 3 , wherein determining, based on the obtained grayscale images, the positioning region and the coding region of the DM code image comprises: subjecting each grayscale image to Sobel operator's convolution computation and hough transform, respectively, to determine the positioning region of the DM code image, with the coding region of the DM code image being located inside the positioning region. |
| Claim: | 8. A DM code analysis device comprising: a source data information reading module, a coding module, a grouping module, a converting module, and a generating module; wherein: the source data information reading module is configured to read source data information; the coding module is configured to convert the source data information into binary data code streams according to corresponding rules in Datamatrix coding rules; the grouping module is configured to successively group the binary data code streams in groups of three values, so as to obtain several data segments; the converting module is configured to convert each data segment into a corresponding color in accordance with a coding mapping rule, the coding mapping rule involving: making 1 equivalent to 255 and 0 equivalent to 0 in each data segment; and based on a particular order of coloring, successively enabling 0 and 255 in the data segment to correspond to each color channel of RGB, thereby generating particular colors; and the generating module is configured to generate a DM code image by filling color blocks in accordance with the particular colors and a filling rule in the Datamatrix coding rules, an image of the DM code including a plurality of color blocks arranged in arrays that form a rectangle, peripheral color blocks located on edges of the image constituting a positioning region, and inner color blocks inside the image constituting a coding region; the positioning region comprising an “L”-shaped edge and a positioning edge opposite to the “L”-shaped edge; wherein: colors of the plurality of color blocks comprise at least three of eight colors, the eight colors being three standard RGB colors, four standard CMYK colors, and white; and the positioning edge is formed by alternately arranging black color blocks and white color blocks, the black color blocks being obtained after filtering a channel in any color of RGB to black, and the white color blocks being obtained by filtering the channel to white. |
| Claim: | 9. The device according to claim 8 , further comprising: a DM code reading module, a filtering module, a positioning module, a superposing module, an ordering module, and a decoding module; wherein: the DM code reading module is configured to read a target DM code image to be decoded; the filtering module is configured to perform successive filtering by three color channels, RGB, so as to obtain three coded grayscale images corresponding to each color channel, respectively; the positioning module is configured to determine a positioning region and a coding region of the target DM code image according to the obtained grayscale images; the superposing module is configured to convert the color of each color block into one data segment containing three binary values in accordance with a decoding mapping rule, the decoding mapping rule involving: making grayscale values close to 0 equivalent to 0 and grayscale values close to 255 equivalent to 1, and based on a particular order of filtering, enabling the grayscale values of the color blocks to correspond to particular data segments consisting of 0 and 1; the ordering module is configured to successively de-group all the data segments according to an order of arrangement of the data segments, to form complete binary data code streams; and the decoding module is configured to convert the binary data code streams into source data information according to corresponding rules in Datamatrix decoding rules. |
| Claim: | 10. The device according to claim 9 , wherein: the decoding device further comprises a determining module configured to: determine the colors of the target DM code image, and if the target DM code image has a black and white DM code, then decode the target DM code image according to the Datamatrix decoding rule to obtain the source data information; if the target DM code image has a 2D color code, then proceed to the step of converting the color of each color block into one data segment containing three binary values in accordance with a mapping rule. |
| Patent References Cited: | 2007/0046961 March 2007 Kashibuchi et al. 2011/0000958 January 2011 Herzig 102194091 September 2011 102968654 March 2013 105426945 March 2016 WO-2017198189 November 2017 |
| Other References: | The World Intellectual Property Organization (WIPO) International Search Report for PCT/CN2019/080729 Nov. 27, 2019 6 pages (with translation). cited by applicant |
| Primary Examiner: | Gudorf, Laura A |
| Attorney, Agent or Firm: | ANOVA LAW GROUP, PLLC |
| Dokumentencode: | edspgr.12164999 |
| Datenbank: | USPTO Patent Grants |
| Abstract: | Disclosed is a Data Matrix (DM) code. An image of the DM code consists of several color blocks arranged in a rectangular array, a circle of color blocks on the edge of the image constitutes a positioning region, and the color blocks inside the image constitute a coding region; the positioning region includes an “L”-shaped edge and a positioning edge opposite to the “L”-shaped edge, wherein the colors of the color blocks include at least three of eight colors, the eight colors being three standard RGB colors, four standard CMYK colors, and white. The positioning edge is formed by alternately arranging color blocks of two colors that are black after filtering by a channel in any color of RGB and white after filtering by a channel in the same color. |
|---|