CN114463426A - Method and system for designing and identifying parallelogram point cloud code based on triangular segmentation - Google Patents
Method and system for designing and identifying parallelogram point cloud code based on triangular segmentation Download PDFInfo
- Publication number
- CN114463426A CN114463426A CN202210121989.6A CN202210121989A CN114463426A CN 114463426 A CN114463426 A CN 114463426A CN 202210121989 A CN202210121989 A CN 202210121989A CN 114463426 A CN114463426 A CN 114463426A
- Authority
- CN
- China
- Prior art keywords
- information
- point cloud
- code
- generating
- positioning
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000011218 segmentation Effects 0.000 title claims abstract description 13
- 238000012937 correction Methods 0.000 claims abstract description 32
- 239000011159 matrix material Substances 0.000 claims description 26
- 230000009466 transformation Effects 0.000 claims description 16
- 230000001154 acute effect Effects 0.000 claims description 10
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000013461 design Methods 0.000 claims description 5
- 230000004807 localization Effects 0.000 claims 1
- 230000008569 process Effects 0.000 abstract description 16
- 238000010586 diagram Methods 0.000 description 9
- 238000000605 extraction Methods 0.000 description 7
- 238000007781 pre-processing Methods 0.000 description 6
- 230000007797 corrosion Effects 0.000 description 3
- 238000005260 corrosion Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 229910002056 binary alloy Inorganic materials 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 239000002537 cosmetic Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000001771 impaired effect Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000000873 masking effect Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000012785 packaging film Substances 0.000 description 1
- 229920006280 packaging film Polymers 0.000 description 1
- 239000000123 paper Substances 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 239000004033 plastic Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/10544—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
- G06K7/10821—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
- G06K7/10831—Arrangement of optical elements, e.g. lenses, mirrors, prisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/10544—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
- G06K7/10821—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
- G06K7/10861—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices sensing of data fields affixed to objects or articles, e.g. coded labels
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/14—Transformations for image registration, e.g. adjusting or mapping for alignment of images
- G06T3/147—Transformations for image registration, e.g. adjusting or mapping for alignment of images using affine transformations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/66—Analysis of geometric attributes of image moments or centre of gravity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Electromagnetism (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Geometry (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
The invention discloses a method and a system for designing and identifying a parallelogram point cloud code based on triangular segmentation, wherein the method comprises the following steps: acquiring original hidden information, and coding the original hidden information to acquire information group information, wherein the information group information is used for providing data for generating a point cloud code; generating positioning group information, generating unit point cloud codes based on the information group information and the positioning group information, generating point cloud codes based on a plurality of unit point cloud codes, and outputting the point cloud codes, wherein the point cloud codes are parallelograms; and decoding the point cloud code and identifying information in the point cloud code. The invention processes the information to be hidden to form a parallelogram point cloud code, thereby obviously improving the concealment, the information quantity, the identification precision, the error correction capability and the confidentiality.
Description
Technical Field
The invention relates to the technical field of point cloud code positioning and identification, in particular to a parallelogram point cloud code design and identification method and system based on triangular segmentation.
Background
With the continuous development of market economy in China, more and more fake and shoddy products flood the lives of people and seriously destroy the market economy order in China. Traditional antifalsification label, two-dimensional code can be torn easily, destroy or the secondary is used, and the unable normal inspection of commodity is checked and is traced to the source, leads to market to make fake and sells the mistake goods action and takes place in the time, has seriously impaired original person and consumer's rights and interests. Although the existing anti-counterfeiting technology is continuously updated, many technical schemes have bugs or defects. Bar codes come out in the last 40 th century, and are widely used in various industries such as food, books, postal service, etc. due to the characteristics of high input speed, high reliability, low cost, etc. However, the bar code has small recorded information amount, large occupied space, easy copying and poor anti-counterfeiting performance. In this big data age today, the range of barcode applications is greatly limited.
Therefore, in the 80 s of the last century, the two-dimensional code came from birth. The bar code can store information only in the horizontal direction, and the two-dimensional code can store data in both the horizontal and vertical directions, so that the information storage capacity greatly exceeds that of the bar code. Due to the characteristics of quick response, large capacity, high fault tolerance and the like, the QR code is distinguished in various two-dimensional codes. Nowadays, QR codes are applied to various industries such as clothing, cosmetics, food, electronic commerce, online payment and the like.
The two-dimensional code is designed for convenient identification and has no anti-counterfeiting effect. The technology of utilizing two-dimensional code to carry out anti-fake work at present, it is the information carrier medium with the two-dimensional code mostly, utilize special printing ink or printing technology to process the two-dimensional code for can't observe by naked eye under the normal environment, and can only discern through special equipment. Although the two-dimensional code can be prevented from being maliciously damaged or being used for the second time to a certain extent, the cost is high, and a consumer cannot use a mobile phone for identification, so that the practicability of the two-dimensional code is greatly limited.
Therefore, a point cloud code with high concealment, large information amount, high identification precision, and strong error correction capability and confidentiality is needed to make up for the vacancy of the anti-counterfeiting two-dimensional code for merchandise anti-counterfeiting, anti-fleeing, and tracing.
Disclosure of Invention
The invention aims to provide a method and a system for designing and identifying a triangularly sliced parallelogram point cloud code, which are used for solving the problems in the prior art, processing information to be hidden to form the parallelogram point cloud code and remarkably improving the concealment, the information content, the identification precision, the error correction capability and the confidentiality.
In order to achieve the purpose, the invention provides the following scheme: the invention provides a method for designing and identifying a triangularly segmented parallelogram point cloud code, which comprises the following steps:
acquiring original hidden information, and coding the original hidden information to acquire information group information, wherein the information group information is used for providing data for generating a point cloud code;
generating positioning group information, generating unit point cloud codes based on the information group information and the positioning group information, generating point cloud codes based on a plurality of unit point cloud codes, and outputting the point cloud codes, wherein the point cloud codes are parallelograms;
and decoding the point cloud code and identifying information in the point cloud code.
Optionally, the encoding processing is performed on the original hidden information, and obtaining information group information includes:
encoding the original hidden information to obtain encoded data information, wherein the original hidden information comprises one or a combination of English letters, Chinese characters, URLs and numbers;
generating point cloud code size and error correction information based on the original hidden information;
and processing the point cloud code size, the encoded data information and the error correction information to obtain information group information.
Optionally, encoding the original hidden information includes: if the original hidden information is a number, directly coding; if the original hidden information is characters or URL, firstly carrying out ASCII code value conversion and then carrying out encoding.
Optionally, the processing the point cloud code size, the encoded data information, and the error correction information includes:
adding a mask to the point cloud size to obtain a mask corresponding to the point cloud code size;
performing matrix traversal on the mask corresponding to the point cloud code size, the encoded data information and the error correction information to obtain a binary code source graph;
adding a randomness offset to the binary code source graph to obtain a code source graph added with the randomness offset, wherein the code source graph is a square;
and carrying out affine transformation on the code source graph, and converting the square into a parallelogram to obtain information group information.
Optionally, generating location group information, generating a plurality of unit point cloud codes based on the information group information and the location group information, and generating a point cloud code based on the plurality of unit point cloud codes includes:
generating positioning group information and embedding the positioning group information into a point cloud code image;
embedding the information group information into the positioning information group area to generate a unit point cloud code;
and combining a plurality of unit point cloud codes to generate a point cloud code.
Optionally, the unit point cloud code is an isosceles acute triangle or a right-angled triangle.
Optionally, decoding the point cloud code, and identifying information in the point cloud code comprises:
scanning the point cloud code, processing the scanned image, and identifying a positioning information group containing positioning information characteristics;
analyzing the positioning information group, and extracting coding information in a quadrilateral area formed by the positioning information group;
and decoding the coded information and identifying the information in the point cloud code.
Also provides a parallelogram point cloud code design and identification system based on triangular segmentation, which comprises a coding part, a decoding part and a decoding part,
the encoding part is used for acquiring original hidden information, and encoding the original hidden information to acquire information group information;
the code generation part is used for generating positioning group information, generating unit point cloud codes based on the information group information and the positioning group information, generating point cloud codes based on a plurality of unit point cloud codes, and outputting the point cloud codes, wherein the point cloud codes are parallelograms;
the decoding part is used for decoding the point cloud code and identifying the information in the point cloud code.
Optionally, the encoding part includes a data reading module, a mask generating module, a randomness shifting module and a transforming module, the data reading module is configured to encode the original hidden information, directly encode if the original hidden information is a number, and generate a point cloud code size and error correction information based on the original hidden information; if the original hidden information is characters or URL, firstly carrying out ASCII code value conversion and then carrying out encoding; the mask generating module is used for adding a mask to the point cloud size to obtain a mask corresponding to the point cloud code size; the random offset module is configured to add random offset to a code source graph obtained after matrix traversal is performed on the mask corresponding to the size of the point cloud code, the encoded data information, and the error correction information, so as to obtain a code source graph to which random offset is added, where the code source graph is binary data and is a square; and the transformation module is used for carrying out affine transformation on the code source graph and converting the square into a parallelogram so as to obtain information group information.
Optionally, the code generation part comprises a positioning generation module and a code generation module,
the positioning generation module is used for generating positioning group information and embedding the positioning group information into the point cloud code image;
the code generation module is used for embedding the information group information into the positioning information group area to generate a standard unit point cloud code, wherein the unit point cloud code is an isosceles acute triangle or a right-angled triangle; and combining a plurality of standard unit point cloud codes to generate a point cloud code.
The invention discloses the following technical effects:
according to the method and the system for designing and identifying the parallelogram point cloud code based on the triangular segmentation, the fault tolerance rate of the parallelogram point cloud code is high, and the basic unit point cloud code comprises the error correcting code with the selectable length, so that the unit point cloud code can still be normally decoded even if the unit point cloud code is slightly stained or covered; meanwhile, each basic unit is composed of two equilateral triangles or 4 right-angled triangles, and a group of undamaged and covered intact triangular areas in different areas can be selected for splicing to form a basic quadrilateral identification unit, so that the robustness of the method is greatly improved. Meanwhile, the amount of stored information is flexible, and the unit point cloud code size and the fault tolerance rate can be adjusted according to the storage requirement. The concealment is high, the point cloud code represents one bit of effective information by a single point, and the point cloud code is almost invisible to naked eyes when being jet-printed on a package, so that the possibility of tearing, damaging, copying and counterfeiting can be effectively reduced. The confidentiality is strong, and due to the quadrilateral characteristic of the point cloud code and the randomness of information storage, the condition that the regularity is obvious when the traditional quadrilateral two-dimensional code is horizontally spliced is effectively avoided when a plurality of unit point cloud codes are spliced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of a method for designing and identifying a parallelogram point cloud code based on triangular segmentation in the embodiment of the invention;
FIG. 2 is a schematic diagram of a binary code source diagram obtained by traversing a matrix according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of information set information of a point cloud code according to an embodiment of the present invention;
FIG. 4 is a diagram of a positioning mode of a point cloud code according to an embodiment of the present invention, illustrating an angular positioning set and a center positioning set of a quadrilateral point cloud code;
FIG. 5 is a schematic diagram of an area formed after embedding positioning information according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a unit point cloud code according to an embodiment of the present invention;
FIG. 7 is a code diagram illustrating the four quadrilateral unit point cloud code concatenations in the embodiment of the present invention;
fig. 8 is a schematic view illustrating an identification process of a point cloud code location group according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The invention provides a parallelogram point cloud code design and identification method based on triangular segmentation. Specifically, as shown in fig. 1, the method includes the following steps:
the method comprises the steps of obtaining original hidden information, carrying out coding processing on the original hidden information, and obtaining information group information, wherein the information group information refers to a point cloud code image obtained by coding input information, adding error-tolerant codes, masking, traversing a matrix to obtain a code source image, adding random offset and carrying out radial transformation. Namely the point cloud code information set.
The encoding process comprises the following steps:
read input information (hidden information):
reading input information through equipment, wherein the input data can be English letters, Chinese characters, URL (uniform resource locator) and numbers, and if the input data are the numbers, the input data are directly converted into binary codes; if the characters or the URL are characters, the characters or the URL need to be firstly converted into ASCII code values and then subjected to binary coding. In this embodiment, the valid information is stored in the cryptogram in binary data form, and the input information that needs to be stored is decimal data, so an effective conversion mode is required to realize efficient conversion. A string of decimal data (within the required length size) is first converted into binary data. For data which does not satisfy the maximum storage length, a bit complementing process is performed with 0, for example, different sizes of point cloud codes are first determined according to different input information amounts, the maximum decimal length of a unit point cloud code of the current size can be input to be 37, and if only 27 bits of data need to be stored, 0 is complemented with 10 bits of data before the 27 bits of data.
Generating corresponding information:
and generating the required point cloud code size, the encoded data information and the error correction information according to the read binary encoding data. In this embodiment, the length of the encoded data is determined according to the length of the read data and the fault tolerance requirement of the user, and an appropriate size of the point cloud code is selected.
And (3) encoding:
after obtaining the binary data corresponding to the input information, it needs to be encoded. The encoding process involves a problem of error correction rate. The error correction rate is substantially the ratio of the length of the error correction code to the total code length. For example, in the unit point cloud code, in addition to the angle location group and the center location group, a maximum of 32 valid information groups (32 × 8-bit binary data) can be stored, and if an error correction rate of 50% is required, 16 valid information groups are required for storing the error correction code, and only the remaining 16 information groups are required for storing the input information. Different error correction rates may be achieved by changing the lengths of the input information and the error correction information. Different information code lengths and error correction code lengths can be set by using reed-solomon coding, so that the idea of the overall coding is that of the reed-solomon coding. Firstly, converting binary data corresponding to input information into 256-bit data of-128 to 127 in each group of 8 bits for encoding. For example, if 37 decimal point cloud code is input and converted into 16 × 8 binary data after binary conversion, each 8 decimal point cloud code is converted into 16 256 binary data, and the 16 256 binary data is encoded (50% error correction) to generate 16+16 256 binary data. Since the data stored in the cryptogram should be binary data, the 32-bit 256-bit number is also converted back to binary, and each 256-bit number can be converted into 8-bit binary, so that 32 × 8-bit binary data is finally obtained. The error correction code and the length of the information code are recorded in a decoding process and used when decoding.
Storing effective information:
after obtaining the encoded valid information, it is also necessary to store the information in the binary two-dimensional matrix. The storage mode is that one storage is carried out every 8 bits, the areas of the middle and four vertexes are skipped, all the areas are set to be 0 (the areas of the central positioning group and the angular positioning group are reserved), the coordinate positions of the stored effective information in the point cloud code are recorded in a generating and decoding program, and in the decoding process, through the known information storage positions, one binary system can be obtained every 8 bits, and the corresponding coded binary data can be obtained again.
Adding a mask:
after the valid information is stored, in order to eliminate the situation that a large number of 0 (large area of blank can appear in the generated code) appear in the two-dimensional matrix when the length of the storable information is far larger than the length of the input information, a layer of mask needs to be added. The mask principle is to randomly generate 1 binary two-dimensional matrix (the value of which appears randomly), and then perform exclusive or on the two-dimensional matrix and the binary two-dimensional matrix for storing information. Of course, the masked binary two-dimensional matrix needs to be recorded in the decoding procedure, otherwise, the layer of mask cannot be taken out to recover the effective information matrix.
Generating a code source graph:
after the codes and the information are stored and masked, a two-dimensional binary matrix (only 0 or 1 of data) is obtained. It is enlarged by a factor of 4, i.e. 4 x 4 pixels represent a cell (this is to comply with the jet printing specification). Taking a 20 × 20 two-dimensional matrix, a blank picture of 80 × 80 pixels is generated, and then every 4 × 4 pixels is regarded as a unit, and the central pixel point in the unit represents the value of the corresponding 20 × 20 matrix. If the value in the matrix is 1, the value of the center pixel point in the corresponding cell is 255, otherwise it is 0. Finally, a square point-like code source graph (with blanks at the center and four corners) is obtained after traversing the two-dimensional matrix, as shown in the attached figure 2;
adding a randomness offset:
random offset is added to the code source graph, and the phenomenon that too many effective points are in the same row or the same column and the point set arrangement rule is obvious in the generated point cloud code is reduced. Adding coordinate offset to the coordinate position of an information point in a code source graph by using a random offset module, wherein the random amount is controlled to be between 0 and 0.2 of the minimum distance between initial points;
generating a point cloud code information set:
affine transformation is performed on the code source graph added with the random offset, and the square is converted into a parallelogram to obtain a point cloud code information set, as shown in fig. 3. The affine transformation matrix is:
x′=m11*x+m12*y+m13
y′=m21*x+m22*y+m23
wherein, (x, y) is the original coordinates, and (x ', y') is the transformed coordinates; m11, m12, m21 and m22 are rotation amounts, and m13 and m23 are translation amounts.
Generating positioning group information, generating unit point cloud codes based on the information group information and the positioning group information, generating point cloud codes based on a plurality of unit point cloud codes, and outputting the point cloud codes, wherein the point cloud codes are parallelograms. The code generation process specifically comprises the following steps:
generating a point cloud code positioning group:
and generating positioning group information, generating a quadrilateral unit point cloud code frame with 60-degree and 120-degree inner angles of corresponding sizes according to the point cloud code size determined during encoding, and embedding the positioning information group into the quadrilateral unit point cloud code frame. The positioning information is respectively fixed at four corners and the central position of a quadrilateral unit point cloud code frame, and the rotating and distorted point cloud code can be corrected in the decoding process.
The positioning information in this embodiment is unified as an acute triangle: two angles are 70 degrees and one angle is 40 degrees. The distance between the center location point and the three location points in the unit triangle area where the center is located is divided into two types, as shown in fig. 4, the distance from the vertex of an angle of 40 degrees is longer, and the distance from the vertex of an angle of 70 degrees is shorter, so as to determine the position and the direction of the location group. Wherein, the acute angle of the central positioning group of the unit point cloud code points to the right-up direction, and the positions and directions of the 5 positioning groups are as shown in figure 5. In addition, the positioning information may also be a right triangle.
Generating a unit point cloud code:
the code source graph added with the random offset is affine transformed into a point cloud code information group of a corresponding quadrilateral point cloud code size (because a square source code graph with a vacant center and four corners is adopted before transformation, point code information cannot be generated in a corresponding area of a parallelogram after transformation) to be embedded into a unit point cloud code positioning group (an acute angle of the center positioning group points to the direction right above), and a standard unit point cloud code is generated as shown in figure 6;
point cloud code splicing:
because the point cloud codes are parallelogram, the four unit point cloud codes can be seamlessly spliced, and the angular positioning groups between the unit codes can be shared without mutual influence; generating a point cloud code map suitable for the size of the commodity package according to actual requirements, wherein the splicing effect of the four unit point cloud codes is shown in the attached figure 7;
packaging and printing, and outputting a point cloud code:
and printing the generated picture, namely performing jet printing on materials such as plastic packaging films, paper, glass, metal and the like.
Positioning points with the same area size as the data points are adopted in the four corners of the parallelogram point cloud code in the embodiment, the positioning points are shared by the code pattern symbol arrays, the requirement of the two-dimensional code on a quiet area is eliminated, the same code pattern can be repeatedly printed and seamlessly spliced into the code pattern array, and the code pattern is easy and convenient to obtain; the method for decoding the bar code is simplified, the code diagram is small and exquisite, the minimum unit point cloud code can reach 4mm, the coding efficiency is improved, and meanwhile the packaging space is saved. The quadrilateral point cloud code can be clearly seen without naked eyes, and a blank layout is not required to be occupied independently, so that the printing and typesetting of commodity packages are not influenced, and the use is convenient and flexible.
And decoding the point cloud code and identifying information in the point cloud code. The decoding process performs the following steps:
scanning the pattern:
scanning the positions printed with the point cloud codes on the commodity package by using a camera device;
image preprocessing:
since the images collected by the code scanning device are all color images, the required information does not relate to colors, and the collected images have various noise points and errors, image preprocessing is firstly needed to eliminate the noise points as much as possible. The preprocessing process comprises the operations of image binaryzation and expansion corrosion. After binarization and expansion corrosion, a binary image is obtained. Then traversing all pixels in the image, calculating and marking a connected region in a black point of the image, then calculating respective barycentric coordinates of all the connected regions according to the pixel area and the coordinates in the connected region, and then storing the coordinates into a two-dimensional vector for later use;
screening and positioning groups:
the obtained barycentric coordinates are subjected to pattern recognition, and 5 positioning information groups containing the positioning information features are recognized, wherein the recognition step is shown in fig. 8. The detailed process of positioning the information group is as follows: because there are three length relations between the positioning points in a basic quadrilateral unit: the length of the edge, and two distances from the central positioning point to the vertex. The sequence of the 4 angular positioning groups is determined according to the acute angle directions of the central positioning groups, and simultaneously 2 equilateral triangle areas with different position information or 4 right-angle triangle areas with different position information can be determined. Screening out all positioning group information, and finding out a complete unit point cloud code according to the relation of distance and angle between the positioning groups; if the information of a certain triangular area in the unit is lost or damaged to cause that the triangular area cannot be identified, searching the triangular areas at the same positions of other basic units, and then splicing to form a complete basic parallelogram unit; finally, determining the angle difference between the unit point cloud code and the standard point cloud code according to the acute angle direction of the central positioning group; mapping all barycentric coordinates of the inner points of the unit point cloud code back to a standard point cloud code coordinate system by using the obtained angle difference to finish rotation correction; the mapping formula is as follows:
x1=(x-x0)*cosθ-(y-y0)*sinθ+x0
y1=(x-x0)*sinθ+(y-y0)*cosθ+y0
wherein, (x, y) is the original coordinate, (x)0,y0) As a rotation center coordinate, (x)1,y1) To map the coordinates, θ is the angular difference.
Information extraction:
and extracting the coded information in the quadrilateral area formed by the 5 positioning information to obtain binary coded information, wherein the extraction process of the information extraction module is opposite to the code generation process of the code generation module. And extracting a point cloud code information group from the identified complete unit point cloud code, and then carrying out affine inverse transformation and removing random offset to obtain a square code source diagram.
And (3) data decoding:
the obtained square code source image is subjected to matrix traversal and reduced by 4 times, black pixel points in the code source image represent 0, white pixels in the code source image represent 1, a binary two-dimensional matrix can be obtained, for the two-dimensional matrix, masks need to be removed firstly, namely, the obtained two-dimensional matrix and the recorded mask two-dimensional matrix are subjected to exclusive OR operation, and an effective information two-dimensional matrix is obtained. And extracting the effective information two-dimensional matrix by 8 bits according to the storage position of the effective information during coding, and converting each 8 bits into 256-bit data of-128 to 127. And finally, the error correcting code and the information code length information stored during encoding are extracted. After the lengths of the information code and the error correction code are known, the information code and the error correction code with the known lengths can be put into a decoding program, and the decoding program can correct the information code according to the error correction code and restore the information code into the input information code. If the decoding is successful, the 256-system information code is converted into a binary system, and then each 8 bits are converted into a 2-bit decimal number in sequence to obtain input information; if the decoding fails (the 256-system numbers obtained when the decoding fails are all-52, the decoding success or not can be judged according to the 256-system numbers), the number of the error bits in the way of identification is excessive, and the error bits are identified again until the decoding succeeds.
Acquiring information:
and returning the identification result to the mobile equipment or the server to complete the identification process of the quadrilateral point cloud code.
In the embodiment, a parallelogram point cloud code design and identification system based on triangular segmentation is also provided, the system comprises a coding part, a decoding part and a decoding part,
and the coding part is used for acquiring original hidden information, coding the original hidden information and acquiring coded information. The encoding part comprises a data reading module, a mask generating module, a randomness deviation module and a transformation module, wherein the data reading module is used for encoding original hidden information and generating point cloud code size and error correction information based on the original hidden information; if the original hidden information is a number, directly coding; if the original hidden information is characters or URL, firstly carrying out ASCII code value conversion and then carrying out encoding; the mask generating module is used for adding a mask to the point cloud size to obtain a mask corresponding to the point cloud code size; the random offset module is used for adding random offset to the mask corresponding to the size of the point cloud code, the coded data information and the error correction information to obtain a code source graph added with the random offset, wherein the code source graph is binary data; and the transformation module is used for carrying out affine transformation on the code source graph and converting the square into a parallelogram so as to obtain information group information.
The code generation part is used for generating positioning group information, generating standard unit point cloud codes based on the coding information and the positioning group information, generating point cloud codes based on a plurality of standard unit point cloud codes and outputting the point cloud codes, wherein the point cloud codes are parallelograms; the code generating part comprises a positioning generating module and a code generating module, and the positioning generating module is used for generating positioning group information and embedding the positioning group information into the point cloud code map; the code generation module is used for sequentially storing the coded information into the positioning information group area and generating unit point cloud codes, wherein the unit point cloud codes are isosceles acute triangles; and combining the unit point cloud codes to generate a point cloud code.
And the decoding part is used for decoding the point cloud code and identifying the information in the point cloud code. The decoding part comprises a reading module, an image preprocessing module, a positioning module, an information extraction module and a data decoding module, wherein the scanning device is used for scanning a part printed with a point cloud code on a commodity package to obtain a point cloud code image, the image preprocessing module performs graying, expansion and corrosion treatment on the obtained image, connected areas are marked, and the barycentric coordinates of each connected area are sequentially calculated and stored, the positioning module performs mode identification on the central coordinates obtained by the preprocessing module to identify a positioning information group containing positioning information characteristics, the information extraction module extracts coding information in a quadrilateral area formed by the most basic unit positioning information to obtain binary coding information, and the extraction process of the information extraction module is opposite to the code generation process of the code generation module. Decoding the coded information by a data decoding module, wherein the decoding comprises mask removing, error correcting and decoding; if the obtained data cannot be corrected or decoded correctly, the number of error bits in the identified graph is excessive, the identification is carried out again until the decoding is successful, the code word is restored, and corresponding information is returned to the reading module.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the present invention in its spirit and scope. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (10)
1. The method for designing and identifying the parallelogram point cloud code based on the triangular segmentation is characterized by comprising the following steps of:
acquiring original hidden information, and coding the original hidden information to acquire information group information, wherein the information group information is used for providing data for generating a point cloud code;
generating positioning group information, generating unit point cloud codes based on the information group information and the positioning group information, generating point cloud codes based on a plurality of unit point cloud codes, and outputting the point cloud codes, wherein the point cloud codes are parallelograms;
and decoding the point cloud code and identifying information in the point cloud code.
2. The method for designing and identifying the point cloud code of the parallelogram based on the triangular segmentation as claimed in claim 1, wherein the encoding of the original hidden information to obtain the information group information comprises:
encoding the original hidden information to obtain encoded data information, wherein the original hidden information comprises one or a combination of English letters, Chinese characters, URLs and numbers;
generating point cloud code size and error correction information based on the original hidden information;
and processing the point cloud code size, the encoded data information and the error correction information to obtain information group information.
3. The method for designing and identifying the point cloud code of the triangulated parallelogram as claimed in claim 2, wherein the encoding the original hidden information comprises: if the original hidden information is a number, directly coding; if the original hidden information is characters or URL, firstly carrying out ASCII code value conversion and then carrying out encoding.
4. The method for designing and identifying the point cloud code of the parallelogram based on the triangle cut according to claim 2 or 3, wherein the processing of the point cloud code size, the encoded data information and the error correction information comprises:
adding a mask to the point cloud size to obtain a mask corresponding to the point cloud code size;
performing matrix traversal on the mask corresponding to the point cloud code size, the encoded data information and the error correction information to obtain a binary code source graph;
adding a randomness offset to the binary code source graph to obtain a code source graph added with the randomness offset, wherein the code source graph is a square;
and carrying out affine transformation on the code source graph, and converting the square into a parallelogram to obtain information group information.
5. The method of claim 1, wherein generating location group information, generating a plurality of unit point cloud codes based on the information group information and the location group information, and generating point cloud codes based on the plurality of unit point cloud codes comprises:
generating positioning group information and embedding the positioning group information into a point cloud code image;
embedding the information group information into the positioning information group area to generate a unit point cloud code;
and combining a plurality of unit point cloud codes to generate a point cloud code.
6. The method for designing and identifying the triangulated parallelogram point cloud code according to claim 1 or 5, wherein the unit point cloud code is an isosceles acute triangle or a right triangle.
7. The method of claim 1, wherein the point cloud code is decoded, and identifying information in the point cloud code comprises:
scanning the point cloud code, processing the scanned image, and identifying a positioning information group containing positioning information characteristics;
analyzing the positioning information group, and extracting coding information in a quadrilateral area formed by the positioning information group;
and decoding the coded information and identifying the information in the point cloud code.
8. A parallelogram point cloud code design and identification system based on triangular segmentation is characterized by comprising a coding part, a decoding part and a decoding part,
the encoding part is used for acquiring original hidden information, and encoding the original hidden information to acquire information group information;
the code generation part is used for generating positioning group information, generating unit point cloud codes based on the information group information and the positioning group information, generating point cloud codes based on a plurality of unit point cloud codes, and outputting the point cloud codes, wherein the point cloud codes are parallelograms;
the decoding part is used for decoding the point cloud code and identifying the information in the point cloud code.
9. The system for designing and identifying point cloud code of parallelogram based on triangular segmentation as claimed in claim 8, wherein the encoding part includes a data reading module for encoding the original hidden information, directly encoding if the original hidden information is digital, generating size and error correction information of point cloud code based on the original hidden information, a mask generating module, a randomness shifting module and a transformation module; if the original hidden information is characters or URL, firstly carrying out ASCII code value conversion and then carrying out encoding; the mask generating module is used for adding a mask to the point cloud size to obtain a mask corresponding to the point cloud code size; the random offset module is configured to add random offset to a code source graph obtained after matrix traversal is performed on the mask corresponding to the size of the point cloud code, the encoded data information, and the error correction information, so as to obtain a code source graph to which random offset is added, where the code source graph is binary data and is a square; and the transformation module is used for carrying out affine transformation on the code source graph and converting the square into a parallelogram so as to obtain information group information.
10. The system of claim 8, wherein the code generation portion comprises a localization generation module and a code generation module,
the positioning generation module is used for generating positioning group information and embedding the positioning group information into a point cloud code image;
the code generating module is used for embedding the information group information into the positioning information group area to generate a standard unit point cloud code, wherein the unit point cloud code is an isosceles acute triangle or a right-angled triangle; and combining a plurality of standard unit point cloud codes to generate a point cloud code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210121989.6A CN114463426B (en) | 2022-02-09 | 2022-02-09 | Parallelogram point cloud code design and identification method and system based on triangle segmentation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210121989.6A CN114463426B (en) | 2022-02-09 | 2022-02-09 | Parallelogram point cloud code design and identification method and system based on triangle segmentation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114463426A true CN114463426A (en) | 2022-05-10 |
CN114463426B CN114463426B (en) | 2024-07-09 |
Family
ID=81414084
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210121989.6A Active CN114463426B (en) | 2022-02-09 | 2022-02-09 | Parallelogram point cloud code design and identification method and system based on triangle segmentation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114463426B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012174545A1 (en) * | 2011-06-17 | 2012-12-20 | I-Property Holding Corp. | 3d laser coding in glass |
CN112240205A (en) * | 2019-07-18 | 2021-01-19 | 联邦科学和工业研究组织 | Machine guidance integration |
WO2021248339A1 (en) * | 2020-06-09 | 2021-12-16 | 深圳市大疆创新科技有限公司 | Point cloud encoding/decoding method and apparatus |
-
2022
- 2022-02-09 CN CN202210121989.6A patent/CN114463426B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012174545A1 (en) * | 2011-06-17 | 2012-12-20 | I-Property Holding Corp. | 3d laser coding in glass |
CN112240205A (en) * | 2019-07-18 | 2021-01-19 | 联邦科学和工业研究组织 | Machine guidance integration |
WO2021248339A1 (en) * | 2020-06-09 | 2021-12-16 | 深圳市大疆创新科技有限公司 | Point cloud encoding/decoding method and apparatus |
Non-Patent Citations (2)
Title |
---|
XIAOQIANG ZHU: "Human Pose Estimation With Deeply Learned Multi-Scale Compositional Models", 《IEEE ACCESS 》, 27 May 2019 (2019-05-27) * |
朱晓强: "基于计算机视觉的室内定位系统设计与实现", 《电子测量技术》, 25 January 2022 (2022-01-25) * |
Also Published As
Publication number | Publication date |
---|---|
CN114463426B (en) | 2024-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102799850B (en) | A kind of barcode recognition method and device | |
Amano et al. | A feature calibration method for watermarking of document images | |
CN102930192B (en) | Security information generates and acquisition methods and relevant apparatus | |
CN113435556B (en) | Code generation and decoding method and anti-counterfeiting method of dot matrix code | |
WO2021217081A1 (en) | Contrast edge barcodes | |
WO2013166995A1 (en) | Method for decoding matrix-type two-dimensional code | |
US9104936B2 (en) | Machine reading of printed data | |
Chen et al. | Identification recovery scheme using quick response (QR) code and watermarking technique | |
CN110659709A (en) | Anti-counterfeiting two-dimensional code and generation, detection and identification method thereof | |
CN114997352A (en) | Anti-counterfeiting tracing code generation and verification method based on dot matrix | |
CN113610545A (en) | Product anti-counterfeiting method, system, equipment and storage medium | |
CN110188582B (en) | Method for identifying locating point in invisible graph code on commodity label | |
JPH0792820B2 (en) | Character recognition method | |
CN116227524B (en) | Anti-fake code generation and verification method and label-based anti-fake system | |
CN114463426A (en) | Method and system for designing and identifying parallelogram point cloud code based on triangular segmentation | |
CN114169483B (en) | Dot point set code design and identification system | |
CN112183689B (en) | Graphic code generation method | |
CN109409475A (en) | Anti-fake two-dimension code, label and application system based on serious forgiveness mechanism | |
CN116563080A (en) | Digital watermark positioning and identifying method and system based on block positioning | |
CN113269045A (en) | Chinese artistic word detection and recognition method under natural scene | |
CN109635613B (en) | Two-dimensional code generation method, system and device for sphere surface | |
CN117273044B (en) | Lattice diagram construction method and lattice diagram identification method | |
CN118037884B (en) | Binary positioning code generation method, system and equipment containing trademark information | |
AU2009201463A1 (en) | Method of generating protected documents | |
CN109190735B (en) | Two-dimensional code generation method, system and device for cylindrical surface |
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 | ||
CB03 | Change of inventor or designer information |
Inventor after: Zhu Xiaoqiang Inventor after: Zhou Yiyu Inventor after: Hong Luning Inventor after: Zeng Dan Inventor before: Zhu Xiaoqiang Inventor before: Hong Luning Inventor before: Zhou Yiyu Inventor before: Zeng Dan |
|
CB03 | Change of inventor or designer information | ||
GR01 | Patent grant |