CN108694430B - Three-dimensional code generation and analysis method - Google Patents

Three-dimensional code generation and analysis method Download PDF

Info

Publication number
CN108694430B
CN108694430B CN201810451122.0A CN201810451122A CN108694430B CN 108694430 B CN108694430 B CN 108694430B CN 201810451122 A CN201810451122 A CN 201810451122A CN 108694430 B CN108694430 B CN 108694430B
Authority
CN
China
Prior art keywords
dimensional code
color
pure
dimensional
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810451122.0A
Other languages
Chinese (zh)
Other versions
CN108694430A (en
Inventor
李峰
尹春芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HANNAN TIAN JIAN ANTI-FORGERY SCIENCE&TTECHNOLOGY Co.,Ltd.
Original Assignee
Hannan Tian Jian Anti Forgery Science&ttechnology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hannan Tian Jian Anti Forgery Science&ttechnology Co ltd filed Critical Hannan Tian Jian Anti Forgery Science&ttechnology Co ltd
Priority to CN201810451122.0A priority Critical patent/CN108694430B/en
Publication of CN108694430A publication Critical patent/CN108694430A/en
Priority to PCT/CN2019/072372 priority patent/WO2019214291A1/en
Application granted granted Critical
Publication of CN108694430B publication Critical patent/CN108694430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • G06K19/06159Constructional details the marking being relief type, e.g. three-dimensional bar codes engraved in a support

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a method for generating and analyzing a three-dimensional code, which comprises the following steps: superposing a plurality of carriers provided with two-dimensional codes, and superposing areas of the two-dimensional codes on different carriers after superposition; the two-dimensional codes on the carriers are different in color and at least partially different in represented information; respectively determining a first area and a second area formed on each carrier after superposition; for any carrier, the first area is an area where the two-dimensional code on the carrier and the two-dimensional code on the other carrier have color superposition, and the second area is an area where the color superposition does not exist; and acquiring and presenting a composite color of the colors of the first areas on the multiple carriers which are mutually overlapped, and processing the multiple carriers which are mutually overlapped to present the color of the second area on each layer of carrier to acquire the three-dimensional code. The scheme of the embodiment overcomes the defect that the two-dimensional code is easy to copy, improves the anti-counterfeiting function and further enlarges the information capacity.

Description

Three-dimensional code generation and analysis method
Technical Field
The embodiment of the invention relates to a coding and decoding technology, in particular to a three-dimensional code generating and analyzing method.
Background
The conventional two-dimensional code was introduced in japan in the nineties of the last century and is now widely used worldwide. The two-dimensional code has the advantages of large information capacity, wide coding range, high decoding reliability and the like, but the two-dimensional code belongs to a planar graph and is easy to copy, so that the two-dimensional code has a great defect in the aspect of anti-counterfeiting.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention provide a three-dimensional code generating and analyzing method, which can overcome the defect that a two-dimensional code is easily copied, improve an anti-counterfeit function, and further expand information capacity.
To achieve the object of the embodiment of the present invention, an embodiment of the present invention provides a three-dimensional code generating method, which may include:
superposing a plurality of carriers provided with the two-dimensional codes according to a preset sequence, and superposing areas of the two-dimensional codes on different carriers after superposition; the colors of the two-dimensional codes on the carriers to be superposed are different, and the represented information is at least partially different;
respectively determining a first area and a second area formed on each carrier after superposition; for any carrier which is subjected to superposition, the first area is an area where the two-dimensional code on the carrier and the two-dimensional codes on other carriers have color superposition, and the second area is an area where the two-dimensional code on the carrier and the two-dimensional codes on any other carriers have no color superposition;
and acquiring and presenting a composite color of the colors of the first areas on the multiple mutually superposed carriers, and processing the multiple mutually superposed carriers to present the color of the second area on each layer of carrier, so as to acquire the three-dimensional code with the three-dimensional structure.
Optionally, the method further comprises: before a plurality of carriers provided with two-dimensional codes are superposed according to a preset sequence, acquiring the two-dimensional codes on each carrier according to an object to be coded;
acquiring the two-dimensional code on each carrier according to the object to be encoded may include:
generating a plurality of first two-dimensional codes with different pure colors, the same area and the same version directly according to an object to be coded, wherein the version of the first two-dimensional codes is determined according to the character length of the object to be coded; alternatively, the first and second electrodes may be,
the method comprises the steps of equally dividing an object to be coded into a plurality of sub-objects according to the character length of the object to be coded, and respectively generating a plurality of second two-dimensional codes with different pure colors, the same area and the same version for the plurality of sub-objects, wherein the version of the second two-dimensional codes is determined according to the character length of the sub-objects.
Alternatively, obtaining a composite color of the colors of the first regions on the plurality of carriers superimposed on each other may include:
traversing the positions of the pixel points in the first area on each layer of carrier according to a preset traversing sequence;
acquiring red, green and blue (RGB) values of pure-color pixels at the position of each pixel point on each layer of carrier;
synthesizing the RGB values of a plurality of pure-color pixels corresponding to the same pixel point on the multilayer carrier,
and setting the color corresponding to the synthesized RGB value as the corresponding synthesized color at the position of the same pixel point.
Optionally, the method may further include:
acquiring a covering layer with the same size as the two-dimensional code; the color of the area corresponding to the first area of each carrier on the covering layer is the composite color, and the second area is hollowed;
and correspondingly covering the covering layer on the uppermost layer of the plurality of physically superposed carriers to form the three-dimensional code together with the plurality of carriers.
Optionally, the two-dimensional code is a quick response QR code.
Optionally, the color of the two-dimensional code on each carrier is a pure color; the solid color comprises: red, green or blue.
Alternatively, the RGB value of each pixel corresponding to each pure color in the plurality of two-dimensional codes having the same area and the same version is less than or equal to 180.
The embodiment of the invention also provides a three-dimensional code analysis method, based on the three-dimensional code generated by the three-dimensional code generation method, the method can comprise the following steps:
determining a plurality of pure colors constituting the current three-dimensional code;
extracting a plurality of pure-color two-dimensional codes from the three-dimensional code on the basis of each pure color;
analyzing each pure-color two-dimensional code according to a preset decoding rule to obtain character information corresponding to each pure-color two-dimensional code;
and combining multiple groups of character information corresponding to the pure-color two-dimensional codes to obtain the decoding information of the three-dimensional codes.
Alternatively, determining the plurality of solid colors constituting the current three-dimensional code may include:
acquiring a positioning point of the three-dimensional code through an image recognition technology;
determining the RGB value of a pixel in a positioning point;
and determining a plurality of pure colors forming the current three-dimensional code according to the RGB values of the pixels in the positioning points.
Optionally, extracting a plurality of solid-color two-dimensional codes from the three-dimensional code on a basis of each solid color respectively may include:
determining all pixel points containing a first pure color to be acquired according to the RGB value of each pixel point in the three-dimensional code;
and determining positions corresponding to all pixel points including the first pure color as the first pure color and determining positions corresponding to all pixel points not including the first pure color as white on a two-dimensional code with the same area and version as the three-dimensional code to form a pure-color two-dimensional code corresponding to the first pure color.
The three-dimensional code generation method of the embodiment of the invention can comprise the following steps: superposing a plurality of carriers provided with the two-dimensional codes according to a preset sequence, and superposing areas of the two-dimensional codes on different carriers after superposition; the colors of the two-dimensional codes on the carriers to be superposed are different, and the represented information is at least partially different; respectively determining a first area and a second area formed on each carrier after superposition; for any carrier which is subjected to superposition, the first area is an area where the two-dimensional code on the carrier and the two-dimensional codes on other carriers have color superposition, and the second area is an area where the two-dimensional code on the carrier and the two-dimensional codes on any other carriers have no color superposition; and acquiring and presenting a composite color of the colors of the first areas on the multiple mutually superposed carriers, and processing the multiple mutually superposed carriers to present the color of the second area on each layer of carrier, so as to acquire the three-dimensional code with the three-dimensional structure. Through the scheme of the embodiment, the defect that the two-dimensional code is easy to copy is overcome, the anti-counterfeiting function is improved, and the information capacity is further enlarged.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the embodiments of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the examples of the application do not constitute a limitation of the embodiments of the invention.
FIG. 1 is a flowchart of a three-dimensional code generation method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a pure-color two-dimensional code corresponding to three pure colors of pure red, pure green, and pure blue respectively according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a physical superposition of a plurality of pure-color two-dimensional codes according to an embodiment of the present invention;
fig. 4(a) is a schematic diagram of a physical superposition method of a pure red two-dimensional code and a pure green two-dimensional code according to an embodiment of the present invention;
fig. 4(b) is a schematic color distribution diagram of a three-dimensional code obtained by physically superimposing a pure red two-dimensional code and a pure green two-dimensional code according to an embodiment of the present invention;
fig. 5(a) is a schematic diagram of a physical superposition method of a pure red two-dimensional code, a pure green two-dimensional code, and a pure blue two-dimensional code according to an embodiment of the present invention;
fig. 5(b) is a schematic color distribution diagram of a three-dimensional code obtained by physically superimposing a pure red two-dimensional code, a pure green two-dimensional code, and a pure blue two-dimensional code according to an embodiment of the present invention;
FIG. 6 is a schematic view of a cover layer according to an embodiment of the present invention;
FIG. 7 is a flowchart of a method for setting the color of the first area on the uppermost carrier to a composite color of a plurality of solid colors superimposed on each other according to an embodiment of the present invention;
fig. 8 is a flowchart of a three-dimensional code parsing method according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Example one
An embodiment of the present invention provides a three-dimensional code generation method, as shown in fig. 1, the method may include S101-S104:
s101, overlapping a plurality of carriers provided with two-dimensional codes according to a preset sequence, wherein areas where the two-dimensional codes on different carriers are overlapped after overlapping; the colors of the two-dimensional codes on the carriers to be superposed are different, and the information represented by the two-dimensional codes is at least partially different.
In the embodiment of the present invention, in order to embody the structural characteristics of the three-dimensional code, a specific carrier is required to carry the generated multiple pure-color two-dimensional codes, and then the carriers of the multiple pure-color two-dimensional codes are superimposed, so that the multiple pure-color two-dimensional codes form a three-dimensional structure, thereby obtaining the three-dimensional code with the three-dimensional structure, where a schematic superimposed diagram of the three-dimensional code is shown in fig. 3.
In embodiments of the present invention, the carrier may include, but is not limited to: paper, sheets of various materials (e.g., wood chips, metal sheets, plastic sheets, synthetic material sheets, etc.), solid coatings, and the like.
Optionally, the method further comprises: before a plurality of carriers provided with two-dimensional codes are superposed according to a preset sequence, the two-dimensional codes on each carrier are obtained according to an object to be coded.
In the embodiment of the present invention, the object to be encoded may be any information including a web page link and identity information, one or more two-dimensional codes may be generated according to the object to be encoded and any one of the existing two-dimensional code generation rules, and the one or more two-dimensional codes are arranged on the carrier of the two-dimensional code, so as to obtain a three-dimensional code by overlapping the plurality of carriers.
In the embodiment of the present invention, the two-dimensional codes on each carrier refer to color block areas disposed on the carrier, and the color block areas and blank areas (e.g., white areas without colors) are organized and interlaced according to a certain rule to form an area where the two-dimensional codes on each carrier are located, as shown in each two-dimensional code in fig. 2.
Optionally, the two-dimensional code is a quick response QR code.
In the embodiment of the present invention, the two-dimensional code may be any type of two-dimensional code currently existing, and a specific type of the two-dimensional code is not limited. The two-dimensional code may include: bar two-dimensional codes and matrix two-dimensional codes, including but not limited to QR codes.
In the embodiment of the present invention, a QR code will be taken as an example to describe the scheme of the embodiment of the present invention.
In the embodiment of the invention, the three primary colors of the computer are red (R), green (G) and blue (B), that is, each pixel has RGB value, so that a colorful world can be represented, only because the RGB value of each pixel is different. Such as: the RGB value (0, 0, 0) means that the specific gravity of red, green and blue is the lowest, and the RGB value (0, 0, 0) represents black; conversely, when the RGB value is (255, 255, 255), that is, the content of red, green and blue reaches the highest value, the color represented by the RGB value (255, 255, 255) is white. Similarly, if the RGB value is (255, 0, 0) indicating pure red, (0, 255, 0) indicating pure green, and (0, 0, 255) indicating pure blue. Therefore, we present a wide variety of colors because of the variation in RGB values.
Optionally, acquiring the two-dimensional code on each carrier according to the object to be encoded may include:
generating a plurality of first two-dimensional codes with different pure colors, the same area and the same version directly according to an object to be coded, wherein the version of the first two-dimensional codes is determined according to the character length of the object to be coded; alternatively, the first and second electrodes may be,
the method comprises the steps of equally dividing an object to be coded into a plurality of sub-objects according to the character length of the object to be coded, and respectively generating a plurality of second two-dimensional codes with different pure colors, the same area and the same version for the plurality of sub-objects, wherein the version of the second two-dimensional codes is determined according to the character length of the sub-objects.
In the embodiment of the invention, the density of the two-dimensional code patterns with the same area is closely related to the version of the two-dimensional code, and the longer the bearing content is, the higher the version number is required. The difference in version numbers may cause the positions of the graphic symbols on the same area to deviate, so that the graphic symbols cannot be accurately fused and cannot be decoded, and thus, a plurality of pure-color two-dimensional codes generated in the embodiment of the present invention need to have the same area and the same version.
In the embodiment of the present invention, based on the above principle, when the length of the character of the object to be encoded is small and the two-dimensional code of a lower version can be used to carry the information of the object to be encoded, a plurality of pure-color two-dimensional codes having the same area and the same version, that is, the first two-dimensional code, can be directly generated according to all the characters of the whole object to be encoded.
In the embodiment of the present invention, the object to be encoded may also be equally divided as needed, that is, according to the character length of the object to be encoded, the current object to be encoded is equally divided into a plurality of sub-objects having the same character length, wherein the sum of the character lengths of the plurality of sub-objects is equal to the character length of the original encoded object before the equal division.
In the embodiment of the present invention, the object to be encoded is equally divided according to the character length of the object to be encoded, so that it is ensured that a plurality of sub-objects can be encoded by using the two-dimensional codes of the same version, so as to generate a plurality of two-dimensional codes having different pure colors, the same area, and the same version, that is, the second two-dimensional code.
Optionally, the color of the two-dimensional code on each carrier is a pure color; the solid colors may include: red, green or blue.
In the embodiment of the present invention, in order to avoid that the generated color is difficult to identify when decoding, the pure color for generating the pure-color two-dimensional code may be any two or three of three primary colors of red, green, and blue. That is, the number of the generated pure-color two-dimensional codes may be two or three, so that any two pure-color two-dimensional codes are superimposed in a subsequent scheme, or three pure-color two-dimensional codes are superimposed.
In the embodiment of the present invention, as shown in fig. 2, a schematic diagram of three pure-color two-dimensional code patterns is shown.
In the embodiment of the invention, the content of the three-dimensional code is borne by the plurality of two-dimensional code patterns through the scheme.
In the embodiment of the present invention, the stacking sequence of each carrier may be customized according to an application scenario, an actual requirement, or a personal preference, and the specific sequence is not limited. For example, for the superposition of a pure red two-dimensional code and a pure green two-dimensional code, the pure red two-dimensional code may be stacked on an upper layer, the pure green two-dimensional code may be stacked on a lower layer, or the pure red two-dimensional code may be stacked on a lower layer, and the pure green two-dimensional code may be stacked on an upper layer. In the specific implementation, the stacking order may be randomly determined, or may be artificially specified in advance.
S102, respectively determining a first area and a second area formed on each carrier after superposition; for any carrier which is subjected to superposition, the first area is an area where the two-dimensional code on the carrier and the two-dimensional code on other carriers have color superposition, and the second area is an area where the two-dimensional code on the carrier and the two-dimensional code on any other carriers have no color superposition.
In the embodiment of the present invention, a pure red two-dimensional code and a pure green two-dimensional code are taken as an example to describe a physical stacking process of two pure color two-dimensional codes, as shown in fig. 4(a), a schematic diagram of a physical stacking method of a pure red two-dimensional code and a pure green two-dimensional code is shown, and fig. 4(b) is a schematic diagram of a color distribution of a three-dimensional code obtained after physical stacking is shown.
In the embodiment of the present invention, as can be seen from fig. 4(b), the yellow color in the structural three-dimensional code pattern is formed by overlapping red and green colors, i.e., the first region, and there are pure red and pure green portions in the structural three-dimensional code pattern, which means that the region is not overlapped yet, i.e., the second region.
In the embodiment of the present invention, a pure red two-dimensional code, a pure green two-dimensional code, and a pure blue two-dimensional code are taken as examples to illustrate a physical stacking process of three pure color two-dimensional codes, as shown in fig. 5(a), a schematic diagram of a physical stacking method of a pure red two-dimensional code, a pure green two-dimensional code, and a pure blue two-dimensional code, and fig. 5(b) a schematic diagram of a color distribution of a three-dimensional code obtained after physical stacking.
In the embodiment of the present invention, as can be seen from fig. 5(b), the gray color (particularly, light gray color) in the structural three-dimensional code pattern is a superposition of three pure colors (pure red, pure green, pure blue), and the yellow, violet and cyan colors are pure red and pure green, pure red and pure blue, and pure blue and pure green, respectively.
Alternatively, the RGB value of each pixel corresponding to each pure color in the plurality of two-dimensional codes having the same area and the same version is less than or equal to 180.
In the embodiment of the present invention, after three primary colors with a content of 100% are superimposed, white color is formed, but in order to more effectively embody the color effect of the three-dimensional code, the background color of the three-dimensional code is usually white, so if three superimposed portions of pure colors appear in the three-dimensional code (which usually appears in a positioning region), the structural three-dimensional code cannot be positioned and analyzed, and therefore, in order to ensure that the three pure colors can be distinguished from the white color after being fused, the pure color content cannot be higher than 70%, that is, about 180% (taking 180 as an example in the present application), in a specific implementation, the pure color content may be appropriately adjusted according to a specific requirement.
In the embodiment of the present invention, based on the limitation of the pure color content, the superimposed areas of the three pure colors (pure red, pure green, and pure blue) in the above embodiment appear gray (specifically light gray).
In the embodiment of the invention, in the physical superposition process, because the areas and the versions of the plurality of pure-color two-dimensional codes are the same, the positions of the same pixel point are determined to be consistent before and after combination.
In the embodiment of the invention, because different colors in the three-dimensional code represent different information, the storage capacity of the structural three-dimensional code can at least reach 2 to 3 times of the capacity of the traditional two-dimensional code, and the information capacity of the traditional two-dimensional code is expanded.
S103, obtaining and presenting a composite color of the colors of the first areas on the multiple carriers which are mutually overlapped, and processing the multiple carriers which are mutually overlapped to present the color of the second area on each layer of the carriers, so as to obtain the three-dimensional code with the three-dimensional structure.
In the embodiment of the present invention, the colors of different areas on the three-dimensional code can be obtained through the superposition, because the three-dimensional code of the embodiment of the present invention is obtained through physical superposition of carriers of a plurality of pure-color two-dimensional codes, and is not simply multi-color printed, the corresponding first area on the surface of the three-dimensional code does not directly present the superposed color when the three-dimensional code is superposed, and similarly, the pure color of the second area on the non-uppermost carrier is not directly presented due to shielding of the carrier above the carrier, and therefore, in order to reflect the information carried by the three-dimensional code through a plurality of colors, the carrier of the three-dimensional code needs to be further processed, so that the composite color of the first area and the pure color of the second area can be visually presented to the user.
In the embodiment of the present invention, the synthesized color of the first area may be directly presented through the uppermost layer carrier, for example, the synthesized color may be set on the first area on the surface of the uppermost layer carrier by recoloring (e.g., printing, spraying, stamping, etc.); in other embodiments, a cover layer may be added to the uppermost support surface, through which the synthesized color is exhibited, and embodiments of which may be described below.
Optionally, the method may further include:
acquiring a covering layer with the same size as the two-dimensional code; the color of the area corresponding to the first area of each carrier on the covering layer is a composite color of the superposed pure colors, and the second area is hollowed out.
And correspondingly covering the covering layer on the uppermost layer of the plurality of physically superposed carriers to form the three-dimensional code together with the plurality of carriers.
In an embodiment of the invention, the second area is hollowed out in order to subsequently present the pure color of the second area on each carrier.
In the embodiment of the present invention, a schematic diagram of the covering layer is shown in fig. 6, and the material and implementation method of the covering layer are not limited in this application.
In the embodiment of the present invention, the covering layer may be a colored film, or may be a new carrier having the same material and area as the carrier, and the first area portion is provided with a synthesized color.
In the embodiment of the present invention, before implementing the above scheme, the synthetic color of the first region needs to be obtained, which may specifically be implemented by the following scheme:
alternatively, as shown in fig. 7, acquiring a composite color of the colors of the first regions on the plurality of carriers superimposed on each other may include S201 to S204:
s201, traversing the positions of the pixel points in the first area on each layer of carrier according to a preset traversing sequence;
s202, acquiring red, green and blue (RGB) values of pure-color pixels at the position of each pixel point on each layer of carrier;
s203, synthesizing RGB values of a plurality of pure-color pixels corresponding to the same pixel point on the multilayer carrier;
and S204, setting the color corresponding to the synthesized RGB value as the corresponding synthesized color at the position of the same pixel point.
In the embodiment of the invention, the position of the pixel point is taken as a main line to perform traversal, and the traversal process is to obtain corresponding pure-color pixel characteristics from the same position of the pure-color two-dimensional code respectively and then synthesize a new structural three-dimensional code pixel value. Such as: the RGB values of the pixels on the same pixel point of the three superimposed pure-color two-dimensional codes are (180, 0, 0), (0, 180, 0) and (255, 255, 255), respectively, and since (255, 255, 255) indicates that the current position is blank, that is, the current pixel point position is a superposition of pure red and pure green, the RGB value at the pixel point position on the structural three-dimensional code is (180, 180, 0), indicating yellow. Similarly, when the RGB values of the pixels on the same pixel point of the three superimposed pure-color two-dimensional codes are (180, 0, 0), (0, 180, 0) and (0, 0, 180), the RGB values respectively represent three pure colors of pure red, pure green and pure blue, and then the RGB value of the pixel point of the synthesized structure three-dimensional code is (180, 180, 180), which is a gray close to white, that is, the aforementioned light gray. After traversing is completed, the pixel characteristics (namely RGB values and colors represented by the RGB values) of all the pixel points on the structural three-dimensional code pattern are clear, and the pattern of the first area of the structural three-dimensional code is formed.
In the embodiment of the present invention, a color rendering method of the second region is explained below. Since the three-dimensional code with the three-dimensional structure is to be obtained in the embodiment of the present invention, the three-dimensional structure needs to be adopted for the color rendering, and if the implementation method of the color of the second region is also the same as the above method of rendering the color of the first region, a two-dimensional code is still obtained in essence, and is not a three-dimensional code.
In an embodiment of the present invention, the stacked multi-layer carriers may be processed by carving (for example, but not limited to, laser carving, hand carving) on the color representation of the second region, so that the pure color of the first region on each layer of the carriers can be represented. Specifically, the second region of each layer of carrier can be obtained (except for the bottommost layer of carrier, since the bottommost layer of carrier does not shield the color of the second region on other carriers, the carving process is not performed on the second region), and the region presenting white in the second region is carved to be hollowed out, so that the hollow out presents the pure color on the next layer of carrier.
In the embodiment of the present invention, it should be noted that, in the above-mentioned scheme, the white area in the second area is engraved because, when the white area is superimposed with a color at the same position on the other layer of carrier, the white area is still a pure color on the other layer of carrier, and therefore, the color of the area is not superimposed, and the white color does not reflect or carry any encoded information when the corresponding pure color two-dimensional code is generated, so that the white color can be regarded as transparent or a part of the lower layer of carrier that is hidden by the pure color should be engraved on the white area of the second area on the carrier.
In the embodiment of the present invention, it should be further noted that the positions of the first area and the second area on each layer of the carrier are the same, or the first area and the second area on each layer of the carrier are completely corresponding.
In the embodiment of the invention, the local coding rule of the structural three-dimensional code is completely compatible with the traditional two-dimensional code, the cross section of the structural three-dimensional code is made of multicolor layer materials, different colors are presented by carving different depths, the multicolor layer characteristics of the structural three-dimensional code are fully utilized, and the structural three-dimensional code is a comprehensive body of a plurality of two-dimensional codes in the aspect of information bearing capacity, so that the information bearing capacity of the structural three-dimensional code is multiplied, the structural three-dimensional code cannot be copied, and the structural three-dimensional code has strong anti-counterfeiting capacity.
Example two
The embodiment of the present invention further provides a three-dimensional code parsing method, as shown in fig. 8, based on the three-dimensional code generated by the three-dimensional code generating method, the method may include S301 to S304:
s301, determining a plurality of pure colors forming the current three-dimensional code.
Alternatively, determining the plurality of solid colors constituting the current three-dimensional code may include:
acquiring a positioning point of the three-dimensional code through an image recognition technology;
determining the RGB value of a pixel in a positioning point;
and determining a plurality of pure colors forming the current three-dimensional code according to the RGB values of the pixels in the positioning points.
In the embodiment of the invention, the purpose of the link is to accurately judge which pure-color two-dimensional codes the structural three-dimensional code is formed by overlapping, and specifically, each pure-color two-dimensional code can be obtained by determining a plurality of pure colors contained in the three-dimensional code and then positioning each pure color on the two-dimensional code with the same area and the same version.
In the embodiment of the invention, the three-dimensional code is realized by depending on the superposition of the two-dimensional code, so that the characteristics of the two-dimensional code exist. For example, for a three-dimensional code obtained by superimposing a plurality of pure-color QR codes, a positioning point also exists on the three-dimensional code, and the positioning point is a feature of each pure-color two-dimensional code, and the positioning point of each pure-color two-dimensional code necessarily presents a corresponding pure color, and after the plurality of pure-color two-dimensional codes are superimposed, the positioning point of the obtained three-dimensional code is also necessarily a superimposed region of the plurality of pure colors, so that all pure colors of the three-dimensional code that are half full can be analyzed through the colors of the positioning points. Specifically, the locating point of the structural three-dimensional code can be retrieved by using an image recognition method, and the RGB values of the pixels in the locating point can be analyzed to know which pure colors the structural three-dimensional code is composed of. For example: if the RGB value is (180, 180, 0), the structural three-dimensional code consists of two pure colors of pure red and pure green; the RGB value is (0, 180, 180) means that the structural three-dimensional code consists of two pure colors of pure green and pure blue; similarly, if the RGB value is (180, 180, 180), it means that the structural three-dimensional code pattern is composed of three pure colors of pure red, pure green, and pure blue.
In the embodiment of the invention, in practical application, because a certain deviation of color usually occurs due to equipment and the like, before determining the pure color of the three-dimensional code through the RGB values, the deviation condition of the color needs to be judged first. Specifically, points with RGB values higher than 200 can be found, and the values of the points should be 255 and white, so that the difference can be found, and batch color rectification can be performed according to the difference. The RGB value of the pixel point is adjusted to be: 0. 255 or 180, so as to ensure the normal operation of other links.
And S302, extracting a plurality of pure-color two-dimensional codes from the three-dimensional codes respectively on the basis of each pure color.
Optionally, extracting a plurality of solid-color two-dimensional codes from the three-dimensional code on a basis of each solid color respectively may include:
determining all pixel points containing a first pure color to be acquired according to the RGB value of each pixel point in the three-dimensional code;
and determining positions corresponding to all pixel points including the first pure color as the first pure color and determining positions corresponding to all pixel points not including the first pure color as white on a two-dimensional code with the same area and version as the three-dimensional code to form a pure-color two-dimensional code corresponding to the first pure color.
In the embodiment of the present invention, after obtaining the solid color included in the structural three-dimensional code through the foregoing scheme, each pixel point including the solid color is determined from the current structural three-dimensional code, and in a two-dimensional code having the same area and version as the three-dimensional code, if the positions of the pixel points including the solid color in the three-dimensional code are respectively corresponding to the two-dimensional code, and the pixel points are set to be the solid color, and positions of other pixel points on the two-dimensional code except the positions set to be the solid color are set to be white, the obtained two-dimensional code is the solid two-dimensional code corresponding to the solid color.
In the embodiment of the present invention, "on the two-dimensional code having the same area and the same version as the three-dimensional code," wherein "the same version" means that the version is completely the same as the version of the plurality of solid-color two-dimensional codes originally superimposed to constitute the structural three-dimensional code, and is not the version of the three-dimensional code itself.
S303, analyzing each pure-color two-dimensional code according to a preset decoding rule to obtain character information corresponding to each pure-color two-dimensional code;
in the embodiment of the present invention, since the pure-color two-dimensional code completely follows the two-dimensional code (such as QR code) decoding rule, here, only the conventional two-dimensional code decoding rule needs to be used for decoding, and details are not repeated here.
S304, combining a plurality of groups of character information corresponding to the plurality of pure-color two-dimensional codes to obtain decoding information of the three-dimensional codes.
In the embodiment of the present invention, according to the aforementioned principle of equally dividing the object to be encoded, the obtained groups of character information are subjected to inverse processing, so that corresponding decoding information can be synthesized.
In the embodiment of the invention, if the object to be coded is not divided equally at first, each set of character information obtained currently is decoding information of the three-dimensional code.
The three-dimensional code generation method of the embodiment of the invention can comprise the following steps: superposing a plurality of carriers provided with the two-dimensional codes according to a preset sequence, and superposing areas of the two-dimensional codes on different carriers after superposition; the colors of the two-dimensional codes on the carriers to be superposed are different, and the represented information is at least partially different; respectively determining a first area and a second area formed on each carrier after superposition; for any carrier which is subjected to superposition, the first area is an area where the two-dimensional code on the carrier and the two-dimensional codes on other carriers have color superposition, and the second area is an area where the two-dimensional code on the carrier and the two-dimensional codes on any other carriers have no color superposition; and acquiring and presenting a composite color of the colors of the first areas on the multiple mutually superposed carriers, and processing the multiple mutually superposed carriers to present the color of the second area on each layer of carrier, so as to acquire the three-dimensional code with the three-dimensional structure. Through the scheme of the embodiment, the defect that the two-dimensional code is easy to copy is overcome, the anti-counterfeiting function is improved, and the information capacity is further enlarged.
Although the embodiments of the present invention have been described above, the above descriptions are only for the convenience of understanding the present invention, and are not intended to limit the embodiments of the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the invention as defined by the appended claims.

Claims (10)

1. A three-dimensional code generation method, characterized in that the method comprises:
superposing a plurality of carriers provided with the two-dimensional codes according to a preset sequence, and superposing areas of the two-dimensional codes on different carriers after superposition; the colors of the two-dimensional codes on the carriers to be superposed are different, and the represented information is at least partially different;
respectively determining a first area and a second area formed on each carrier after superposition; for any carrier which is subjected to superposition, the first area is an area where the two-dimensional code on the carrier and the two-dimensional codes on other carriers have color superposition, and the second area is an area where the two-dimensional code on the carrier and the two-dimensional codes on any other carriers have no color superposition;
and acquiring and presenting a composite color of the colors of the first areas on the multiple mutually superposed carriers, and processing the multiple mutually superposed carriers to present the color of the second area on each layer of carrier, so as to acquire the three-dimensional code with the three-dimensional structure.
2. The three-dimensional code generation method according to claim 1, characterized by further comprising: before a plurality of carriers provided with two-dimensional codes are superposed according to a preset sequence, acquiring the two-dimensional codes on each carrier according to an object to be coded;
the acquiring the two-dimensional code on each carrier according to the object to be coded comprises:
directly acquiring a plurality of first two-dimensional codes with different pure colors, the same area and the same version according to the object to be coded, wherein the version of the first two-dimensional code is determined according to the character length of the object to be coded; alternatively, the first and second electrodes may be,
equally dividing the object to be coded into a plurality of sub-objects according to the character length of the object to be coded, and respectively generating a plurality of second two-dimensional codes with different pure colors, the same area and the same version for the plurality of sub-objects, wherein the version of the second two-dimensional codes is determined according to the character length of the sub-objects.
3. The three-dimensional code generation method according to claim 1, wherein said obtaining a composite color of the colors of the first regions on the plurality of carriers superimposed on each other includes:
traversing the positions of the pixel points of the first area on each layer of carrier according to a preset traversing sequence;
acquiring red, green and blue (RGB) values of pure-color pixels at the position of each pixel point on each layer of carrier;
synthesizing the RGB values of a plurality of pure-color pixels corresponding to the same pixel point on the multilayer carrier,
and setting the color corresponding to the synthesized RGB value as the corresponding synthesized color at the position of the same pixel point.
4. The three-dimensional code generation method according to any one of claims 1 to 3, characterized in that the method further comprises:
acquiring a covering layer with the same size as the two-dimensional code; the color of the area corresponding to the first area of each carrier on the covering layer is the synthesized color, and the second area is hollowed;
and correspondingly covering the covering layer on the uppermost layer of the plurality of physically superposed carriers to form the three-dimensional code together with the plurality of carriers.
5. The three-dimensional code generation method according to any one of claims 1 to 3, wherein the two-dimensional code is a Quick Response (QR) code.
6. The three-dimensional code generation method according to any one of claims 1 to 3, wherein the color of the two-dimensional code on each carrier is a solid color; the solid colors include: red, green or blue.
7. The three-dimensional code generation method according to any one of claims 1 to 3, wherein the RGB value of the pixel corresponding to each pure color in the plurality of two-dimensional codes having the same area and the same version is less than or equal to 180.
8. A three-dimensional code analysis method based on the three-dimensional code generated by the three-dimensional code generation method according to any one of claims 1 to 7, the method comprising:
determining a plurality of pure colors constituting the current three-dimensional code;
extracting a plurality of pure-color two-dimensional codes from the three-dimensional codes on the basis of each pure color respectively;
analyzing each pure-color two-dimensional code according to a preset decoding rule to obtain character information corresponding to each pure-color two-dimensional code;
and combining multiple groups of character information corresponding to the pure-color two-dimensional codes to obtain the decoding information of the three-dimensional codes.
9. The method of claim 8, wherein the determining the plurality of solid colors that constitute the current three-dimensional code comprises:
acquiring a positioning point of the three-dimensional code through an image recognition technology;
determining the RGB value of the pixel in the positioning point;
and determining a plurality of pure colors forming the current three-dimensional code according to the RGB values of the pixels in the positioning points.
10. The method of claim 8, wherein the extracting a plurality of solid-color two-dimensional codes from the three-dimensional code on a per-solid-color basis comprises:
determining all pixel points containing a first pure color to be acquired according to the RGB value of each pixel point in the three-dimensional code;
and determining positions corresponding to all pixel points including the first pure color as the first pure color and determining positions corresponding to all pixel points not including the first pure color as white on a two-dimensional code with the same area and version as the three-dimensional code to form a pure-color two-dimensional code corresponding to the first pure color.
CN201810451122.0A 2018-05-11 2018-05-11 Three-dimensional code generation and analysis method Active CN108694430B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810451122.0A CN108694430B (en) 2018-05-11 2018-05-11 Three-dimensional code generation and analysis method
PCT/CN2019/072372 WO2019214291A1 (en) 2018-05-11 2019-01-18 Three-dimensional code generating and parsing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810451122.0A CN108694430B (en) 2018-05-11 2018-05-11 Three-dimensional code generation and analysis method

Publications (2)

Publication Number Publication Date
CN108694430A CN108694430A (en) 2018-10-23
CN108694430B true CN108694430B (en) 2021-08-03

Family

ID=63847336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810451122.0A Active CN108694430B (en) 2018-05-11 2018-05-11 Three-dimensional code generation and analysis method

Country Status (2)

Country Link
CN (1) CN108694430B (en)
WO (1) WO2019214291A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694430B (en) * 2018-05-11 2021-08-03 海南天鉴防伪科技有限公司 Three-dimensional code generation and analysis method
CN110210596B (en) * 2019-04-17 2020-05-19 清华大学 Device and method for forming double-layer quick response matrix code symbol
CN110348553B (en) * 2019-06-30 2021-01-26 东莞市恒德光电设备制造有限公司 Laser marking method for random three-dimensional code
CN111222611B (en) * 2020-01-18 2023-07-07 江苏提米智能科技有限公司 Color-based stacked three-dimensional code encoding method, encoding device, decoding method, decoding device and storage medium
DE202021001643U1 (en) * 2021-05-04 2021-11-29 Armin Khadjavi 3D code

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615791A (en) * 2015-03-09 2015-05-13 浪潮集团有限公司 Three-dimensional code generating and parsing method and device
CN104680218A (en) * 2015-02-12 2015-06-03 航天信息股份有限公司 Multi-space two-dimensional code, and generation method and decoding method of multi-space two-dimensional code
CN106485306A (en) * 2016-09-14 2017-03-08 华南理工大学 One kind is based on color-coded Quick Response Code and preparation method thereof and recognition methods
CN107627701A (en) * 2017-08-07 2018-01-26 江阴升辉包装材料有限公司 A kind of vacuum skin packaging film and its cross-linking treatment method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202075754U (en) * 2011-05-18 2011-12-14 深圳市鑫全图科技有限公司 Outputting inputting device of invisible three-dimensional codes
CN106295755A (en) * 2015-05-27 2017-01-04 东莞文胜鼎电子科技有限公司 Two-dimensional code generation method, detection method, detection device and antifalsification label
CN105760914B (en) * 2016-02-01 2018-09-25 中国计量学院 The generation method of Raman three-dimension code and recognition methods
CN108694430B (en) * 2018-05-11 2021-08-03 海南天鉴防伪科技有限公司 Three-dimensional code generation and analysis method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680218A (en) * 2015-02-12 2015-06-03 航天信息股份有限公司 Multi-space two-dimensional code, and generation method and decoding method of multi-space two-dimensional code
CN104615791A (en) * 2015-03-09 2015-05-13 浪潮集团有限公司 Three-dimensional code generating and parsing method and device
CN106485306A (en) * 2016-09-14 2017-03-08 华南理工大学 One kind is based on color-coded Quick Response Code and preparation method thereof and recognition methods
CN107627701A (en) * 2017-08-07 2018-01-26 江阴升辉包装材料有限公司 A kind of vacuum skin packaging film and its cross-linking treatment method

Also Published As

Publication number Publication date
CN108694430A (en) 2018-10-23
WO2019214291A1 (en) 2019-11-14

Similar Documents

Publication Publication Date Title
CN108694430B (en) Three-dimensional code generation and analysis method
CN104680218B (en) A kind of more space two-dimensional codes and its generation, coding/decoding method
JP4764231B2 (en) Image processing apparatus, control method, and computer program
CN1829609B (en) Method of encoding a latent image
JP4915883B2 (en) Printed matter for preventing forgery, method for producing the same, and recording medium storing software for producing halftone data
JP4635160B2 (en) Anti-counterfeit printed matter
CN104899586B (en) Method and device is identified to the word content for including in image
CN108437449B (en) 3D printing color presentation method, device and system
CN102761766A (en) Method for depth map generation
KR20130069596A (en) Two-dimensional code with a logo, device for generating a two-dimensional code with a logo, method for generating a two-dimensional code with a logo, and program
JP4142614B2 (en) Trapping method, trapping program, trapping apparatus, and printing system
CN110942126B (en) Method for generating star array three-dimensional code
CN1962287B (en) Method for making multiple optical watermark
CN108381905B (en) 3D printing color presentation method and device based on octree error diffusion
JPH11353436A (en) Emblem code and its coding method
CN110276428A (en) A kind of four-dimension code encoding and decoding method
CN101954804A (en) Frequency conversion screening anti-counterfeiting printing process
CN107748908A (en) A kind of individual two-dimensional code constructing method
CN103295045A (en) Color logic discoloring two-dimensional code and generating method thereof
JP4649612B2 (en) Authentic printed material
RU2337403C2 (en) Method for obtaining latent image
CN110020702A (en) A kind of two dimensional code and its generation method
CN110120006B (en) Amplified halftone hidden image based stereoscopic display and hiding method
CN110120005B (en) Displaying and hiding method for three-dimensional effect of halftone hidden image
JP5990791B2 (en) Anti-counterfeit printed matter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210114

Address after: No. 19 Xinghai Road, Haikou Hi-tech Industrial Development Zone, Hainan Province, 570314

Applicant after: HANNAN TIAN JIAN ANTI-FORGERY SCIENCE&TTECHNOLOGY Co.,Ltd.

Address before: 570102, 3, 906, Overseas Chinese Building, 17 Datong Road, Hainan, Haikou

Applicant before: Li Feng

GR01 Patent grant
GR01 Patent grant