Method for reading two-dimensional code, reader, computer program, manufacturing method, and two-dimensional code
By forming smaller circular dots in two-dimensional codes using a femtosecond laser and applying image processing to transform them into rectangular shapes, the method enhances readability and appearance while addressing visibility and error issues in two-dimensional codes on heat-sensitive materials.
Patent Information
- Application Number
- JP2023116321
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-01-24
AI Technical Summary
Existing methods of forming two-dimensional codes using circular dots that are nearly the same size as rectangular cells lead to visibility issues and increased error rates due to the dots being noticeable, affecting the appearance and readability of the code.
A method and device for reading two-dimensional codes that involve forming smaller circular dots than rectangular cells, using a femtosecond laser to create holes representing the dots, and applying image processing techniques like morphological operations to enlarge and transform these dots into rectangular shapes, enhancing readability while maintaining a good appearance.
This approach improves reading accuracy and reduces the visibility of the dots, allowing for efficient decoding of two-dimensional codes, even when the dots are initially smaller than the cells, while minimizing thermal damage to heat-sensitive materials like synthetic resin and leather.
Smart Images

Figure 2025013044000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a two-dimensional code reading method, a reading device, a computer program, a manufacturing method, and a two-dimensional code. [Background technology]
[0002] Non-Patent Document 1 discloses a method for forming a QR code (registered trademark) by forming holes in diamond, ruby, and sapphire using a femtosecond laser. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] Andre Jaques Batista1, PilarGregoryVianna, Henrique Bucker Ribeiro, Christiano Jose Santiago de Matos2, Anderson Stevens LeonidasGomes, “QR code micro-certified gemstones: femtosecond writing and Raman characterization in Diamond, Ruby and Sapphire”, SCIENTFIC REPORTS, 2019 Summary of the Invention
[0004] Two-dimensional codes such as QR codes and data matrices have multiple cells, each of which represents binary data. The shape of each cell is rectangular. On the other hand, the holes formed in Non-Patent Document 1 are circular. In Non-Patent Document 1, the rectangular cells of the two-dimensional code are represented by circular holes. The circular holes can be recognized as circular dots in a planar view.
[0005] When rectangular cells are represented by circular dots, it is preferable that the circular dots have approximately the same size as the rectangular cells in order to improve the reading accuracy of the two-dimensional code. However, if the circular dots have approximately the same size as the rectangular cells, the two-dimensional code or circular dots will stand out and may mar the appearance of the substrate to which the two-dimensional code is applied.
[0006] In order to prevent the 2D code or circular dots from spoiling the appearance, it is conceivable to make the circular dots sufficiently smaller than the rectangular cells. However, if the circular dots are made small, they will be far from the size of the rectangular cells, making reading errors of the 2D code more likely to occur.
[0007] Therefore, there is a need for technology that can reduce reading errors in two-dimensional codes even when the circular dots are small.
[0008] One aspect of the present disclosure is a method for reading a two-dimensional code, which has a single circular dot smaller than a rectangular cell at the center of an area corresponding to each of a plurality of rectangular cells arranged therein to represent the two-dimensional code, the method comprising: performing a shaping process on an image obtained by photographing the two-dimensional code, and decoding the two-dimensional code based on the image obtained by the shaping process, the shaping process including image processing for deforming the circular dot in the image so that the area occupied by the circular dot in the image in the area corresponding to the rectangular cell increases and the circular dot approaches a rectangle.
[0009] Other aspects of the present disclosure include a two-dimensional code reader, a computer program, a manufacturing method, and a two-dimensional code. Further details will be described in the following embodiments. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is a diagram showing the configuration of a reading device. [Diagram 2]FIG. 2 is an explanatory diagram of a two-dimensional code. [Diagram 3] FIG. 3 is an explanatory diagram of the size of a two-dimensional code. [Figure 4] FIG. 4 is a flowchart of the reading process. [Diagram 5] FIG. 5 is a graph showing the reading rate of a two-dimensional code without magnification. [Figure 6] Figure 6 shows the two-dimensional code used to check the reading rate without magnification. [Figure 7] FIG. 7 is a conceptual diagram of shaping. [Figure 8] FIG. 8 is an explanatory diagram of the structuring elements of morphological operations. [Figure 9] FIG. 9 is a diagram showing an approximation of a circular dot. [Figure 10] FIG. 10 is a diagram showing the result of application of the morphological operation. [Figure 11] FIG. 11 is a diagram showing the result of application of the morphological operation. [Figure 12] FIG. 12 is a diagram showing the result of application of the morphological operation. [Figure 13] FIG. 13 is a cross-sectional view showing the hole. [Figure 14] FIG. 14 is a diagram showing the relationship between hole depth and reading time. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] <1. Overview of 2D code reading method, reading device, computer program, manufacturing method, and 2D code>
[0012] (1) A method according to an embodiment may be a method for reading a two-dimensional code having a single circular dot smaller than a rectangular cell at the center of an area corresponding to each of a plurality of rectangular cells arranged therein in order to represent the two-dimensional code. The reading method may include performing a shaping process on an image obtained by photographing the two-dimensional code, and decoding the two-dimensional code based on the image obtained by the shaping process. The shaping process may include image processing for deforming the circular dot in the image so that the area occupied by the circular dot in the image in the area corresponding to the rectangular cell increases and the circular dot approaches a rectangle.
[0013] (2) The image processing may be performed by a morphological operation that shrinks areas in the image that are not the circular dots.
[0014] (3) The diameter of the circular dot in the image before the shaping process is performed may be equal to or less than 50 pixels in length in the image.
[0015] (4) When the diameter of the circular dot is d and the pitch between the circular dots in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, p / d can be 1.45 or greater.
[0016] (5) p / d may be 1.6 or greater.
[0017] (6) The diameter of the circular dot in the image before the shaping process is performed is equal to or less than a length of 50 pixels in the image, and when the diameter of the circular dot is d and the pitch between the circular dots in each of adjacent rectangular cells in the two-dimensional code is p, p / d may be 1.45 or greater.
[0018] (7) In the image processing, the morphological operation may be performed multiple times.
[0019] (8) The image processing may further include determining the number of times the morphological operations are performed based on a diameter of the circular dot and a pitch between circular dots in adjacent rectangular cells in the two-dimensional code.
[0020] (9) The device according to the embodiment may be a 2D code reader having a single circular dot smaller than a rectangular cell at the center of an area corresponding to each of a plurality of rectangular cells in order to represent the 2D code in which the rectangular cells are arranged. The reader may be configured to perform a shaping process on an image obtained by photographing the 2D code, and to decode the 2D code based on the image obtained by the shaping process. The shaping process may include image processing that deforms the circular dot in the image so that the area occupied by the circular dot in the image in the area corresponding to the rectangular cell increases and the circular dot approaches a rectangle.
[0021] (10) A computer program according to an embodiment may be a computer program for causing a computer to execute a shaping process on an image obtained by capturing an image of a two-dimensional code having a plurality of rectangular cells arranged therein, the image having a single circular dot smaller than the rectangular cell at the center of an area corresponding to each of the rectangular cells, and a decoding process of the two-dimensional code based on the image obtained by the shaping process, in order to represent the two-dimensional code in which the plurality of rectangular cells are arranged. The shaping process may include image processing for deforming the circular dot in the image so that the area occupied by the circular dot in the image in the area corresponding to the rectangular cell increases and the circular dot approaches a rectangle.
[0022] (11) A method according to an embodiment may be a method for manufacturing a two-dimensional code read by the two-dimensional code reading method according to any one of (1) to (10). The manufacturing method may include a step of forming holes constituting the circular dots in a substrate on which a two-dimensional code is formed, by using a femtosecond laser, and the holes formed by the femtosecond laser have a diameter of 10 μm to 100 μm, and when the diameter is d and the pitch of holes formed in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more, and each of the vertical and horizontal sides of the code may be 0.1 mm or more.
[0023] (12) A method according to an embodiment may be a method for manufacturing a two-dimensional code read by the two-dimensional code reading method according to any one of (1) to (10). The manufacturing method may include a step of forming holes constituting the circular dots in a base material including at least one selected from the group consisting of synthetic resin, leather, and biological materials, by using a femtosecond laser.
[0024] (13) A method according to an embodiment may be a method for manufacturing a two-dimensional code read by the two-dimensional code reading method according to any one of (1) to (10). The manufacturing method may include a step of forming holes constituting the circular dots in a base material including at least one selected from the group consisting of synthetic resin, leather, and biological material by using a femtosecond laser, the holes formed by the femtosecond laser have a diameter of 10 μm to 100 μm, and when the diameter is d and the pitch of holes formed in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more, and each of the vertical and horizontal sides of the code may be 0.1 mm or more.
[0025] (13) A two-dimensional code according to the embodiment may be a two-dimensional code read by the two-dimensional code reading method according to any one of (1) to (10). The two-dimensional code is formed on a base material including at least one selected from the group consisting of synthetic resin, rubber, leather, and biological material, and has a single hole formed in the center of an area corresponding to each of some of the rectangular cells in order to express a two-dimensional code in which a plurality of rectangular cells are arranged, the diameter of the hole is 10 μm to 100 μm, and when the diameter is d and the pitch of the holes formed in each of the areas corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more, and each of the vertical and horizontal sides of the code may be 0.1 mm or more.
[0026] <2. 2D code reading method, reading device, computer program, manufacturing method, and 2D code examples>
[0027] 1 shows a reading device 100 capable of executing a method for reading a two-dimensional code 10 according to an embodiment. The reading device 100 may include a computer. The computer constituting the reading device 100 includes a processor 110 and a storage device 120 connected to the processor 110. The reading device 100 includes a camera 130 for capturing an image of the two-dimensional code 10. The camera 130 may be provided integrally with the reading device 100, or may be attached externally to the reading device.
[0028] The storage device 120 includes, for example, a primary storage device and a secondary storage device. The primary storage device is, for example, a RAM. The secondary storage device is, for example, a hard disk drive (HDD) or a solid state drive (SSD). The storage device 120 may include a computer program 121 executed by the processor 110. The processor 110 reads and executes the computer program 121 stored in the storage device 120. The computer program 121 has program code indicating instructions for causing a computer to operate as the reading device 100 according to the embodiment. The computer program 121 causes the processor 110 to execute the reading process 111.
[0029] 2 shows an example of a two-dimensional code 10 according to an embodiment. The type of the two-dimensional code is not particularly limited, but the two-dimensional code is, for example, a QR code (registered trademark) or a Data Matrix (registered trademark).
[0030] The two-dimensional code 10 shown in Fig. 2 is configured by arranging a plurality of rectangular cells 11, 12 in a matrix. In the following, the rectangular cells may be simply referred to as "cells." In this case, the "rectangle" is, for example, a square.
[0031] The two-dimensional code shown in Fig. 2 has, as an example, 18 cells vertically and 18 cells horizontally. As an example, one cell has a size of 50 μm vertically and 50 μm horizontally. Therefore, the two-dimensional code shown in Fig. 2 has a size of 900 μm vertically and 900 μm horizontally, including all of the rectangular cells. Note that in Fig. 2, frame lines indicating the areas of the cells 11 and 12 are drawn vertically and horizontally in a grid pattern, but these frame lines are imaginary and indicate the areas corresponding to the cells 11 and 12, and do not need to appear in the actual two-dimensional code.
[0032] Each of the cells 11, 12 indicates binary data. The binary values are, for example, "0" and "1". In a typical two-dimensional code, the binary values are expressed by the brightness of the cells 11, 12. For example, a cell (first cell) that is entirely dark (e.g., black) indicates one of the binary values, and a cell (second cell) that is entirely light (e.g., white) indicates the other of the binary values. In contrast, in the two-dimensional code shown in FIG. 2, the first cell 11 that indicates one of the binary values has a circular dot 11A arranged in a rectangular area corresponding to the first cell 11, and the second cell 12 that indicates the other of the binary values does not have a circular dot 11A.
[0033] The first cell 11 having the circular dot 11A corresponds to a "cell that is entirely dark (e.g., black)" in a typical two-dimensional code, and the second cell 12 not having the circular dot 11A corresponds to a "cell that is entirely light (e.g., white)" in a typical two-dimensional code.
[0034] In the first cell 11, the circular dot 11A is placed at the center of a rectangular area. If the center of the rectangular area is inside the circular dot 11A, the circular dot 11A can be considered to be placed at the center of the rectangular area. Also, the circle does not have to be a perfect circle, and may be a rounded shape with missing corners of a rectangle within the rectangular area corresponding to the first cell 11. Also, which of the cells constituting the two-dimensional code will be the first cell 11 and which will be the second cell 12 will differ depending on the data represented by the two-dimensional code.
[0035] The dot 11A in the first cell 11 is smaller than a rectangular region. That is, the diameter d of the dot 11A is smaller than the length of one side of the first cell 11. Therefore, in the first cell 11, the dot 11A may have a color similar to that of the second cell 12 around the dot 11A. For example, the circular dot 11A may be a dark color (e.g., black), and a light color (e.g., white) may appear around the circular dot 11A in the first cell 11. The second cell 12 may have a light color (e.g., white) as a whole.
[0036] FIG. 3 shows the size of each part of the two-dimensional code 10. In FIG. 3, for ease of explanation, each cell is assumed to be a first cell 11, and circular dots 11A are arranged vertically and horizontally in a two-dimensional matrix. In FIG. 3, the diameter of the dots 11A is represented by d [μm], and the pitch between adjacent dots 11A in the vertical or horizontal direction is represented by p [μm]. The pitch p is the distance from the center of one dot 11A to the center of the other adjacent dot 11A. The length of the pitch p is equal to the length of one side of the cells 11 and 12.
[0037] Here, d and p are, as an example, design values. When the two-dimensional code 10 is produced by printing, p and d in the produced two-dimensional code have almost no error from the design values. However, when the dots 11A are formed by holes or the like as described below, the actual values of the hole diameter d and pitch p may vary due to manufacturing errors when the holes are formed. Therefore, when evaluating d and p, which may include errors from the design values, the average values of d and p for the entire produced two-dimensional code 10 are treated as d and p. The same applies to other values such as area described below.
[0038] In the two-dimensional code 10 according to the embodiment, the pitch p [μm] is larger than the diameter d [μm] as shown in formula (1) in Fig. 3. That is, the diameter of the dot 11A is shorter than one side of the rectangular cell 11. Therefore, the dot 11A is smaller than the rectangular cell 11 and fits within the rectangular cell 11.
[0039] If the length of one side of the two-dimensional code 10 is expressed as L [μm], then the size of the two-dimensional code 10 is L × L [μm], as shown in equation (2) of FIG. 2]. Here, L is expressed as p×(N-1)+d as shown in formula (3) in FIG. 3. N is the number of cells on one side of the two-dimensional code. The theoretical size of the two-dimensional code 10 when viewed as a whole of multiple rectangular cells is p×N. However, the actual length of one side of the two-dimensional code 10 is the length from a circular dot 11A at one end of the side to a circular dot 11A at the other end as shown in FIG. 3, and is as shown in formula (3) in FIG. 3, and is slightly smaller than p×N. In this specification, the length L of one side of the two-dimensional code 10 is the actual value expressed by formula (3) rather than p×N.
[0040] The diameter d is preferably in the range of 10 μm to 100 μm, more preferably in the range of 10 μm to 60 μm, and even more preferably in the range of 30 μm to 50 μm. When the diameter d is this small, the dots 11A (holes) are less noticeable, which is preferable in terms of appearance. Furthermore, when the dots are formed by laser processing as described below, if the holes are small, the laser pulse width can be made smaller and the energy intensity can be increased, which is preferable because it reduces thermal damage and reduces processing costs.
[0041] From the viewpoint of making the dots 11A (holes) less noticeable, it is preferable to set the pitch p to be sufficiently larger than the diameter d so that p / d is 1.25 or more. In other words, it is preferable to set the diameter d to be sufficiently smaller than the pitch p so that p / d is 1.25 or more. By setting the diameter d to be small, the dots 11A are less noticeable, which is preferable even for a two-dimensional code with a large pitch p (i.e., a two-dimensional code with a large rectangular cell). Preferably, p / d is 1.45 or more, and more preferably 1.6 or more. By setting it to 1.6 or more, the appearance is very good. Note that, in order to prevent d from becoming too small, p / d is preferably 20 or less, more preferably 10 or less, and even more preferably 5 or less.
[0042] An example of a suitable size of the two-dimensional code 10 is one in which the diameter d of the dot 11A (hole) is within the range of 30 μm to 50 μm, p / d is 1.45 or more, L is 100 μm (0.1 mm) or more, and N is 15 or more. In such an example, L is more preferably 500 μm (0.5 mm) or more, and even more preferably 1000 μm (1 mm) or more. When L is about 1000 μm (1 mm) or more, the presence of the two-dimensional code 10 can be recognized by the naked eye, by using a simple magnifying glass, or by using an image enlargement function (for example, a magnification function of about 5 to 10 times) of a camera application (software), and it becomes easy to bring the reading device 100 close to the location where the two-dimensional code 10 is present in order to read the two-dimensional code 10. And when p / d is 1.45 or more, the dots 11A (holes) become small, and even if the two-dimensional code 10 is large enough, the individual dots 11A become difficult to see with the naked eye. As a result, even if the two-dimensional code 10 as a whole is large enough to be recognized, the two-dimensional code 10 becomes less noticeable, resulting in a good appearance.
[0043] In addition, L is preferably 30000 μm (30 mm) or less, more preferably 20000 μm (20 mm) or less, and even more preferably 10000 μm (10 mm) or less, if necessary, to avoid an increase in size of the two-dimensional code 10. N is preferably 50 or less, more preferably 30 or less, and even more preferably 25 or less.
[0044] The design guidelines for the two-dimensional code 10 according to the embodiment will be described below. When designing the two-dimensional code 10, as an example, first the number of cells N on one side and the diameter d of the dots 11A (holes) are determined. N can be determined based on the data length to be represented by the two-dimensional code 10. For example, when the dots 11A are formed by holes, d is determined taking into consideration the processing cost, etc. In addition, the length L of one side of the entire two-dimensional code 10 is determined taking into consideration the space in the base material to which the code is applied, etc. Once N, d, and L are determined, the pitch p is determined based on the formula (3) in FIG. 3.
[0045] For example, when N=18 and d=30 μm, the pitch p is determined as follows: When L is determined to be 7680 μm (7.68 mm), p=(7680-30) / (18-1)=450 μm (0.45 mm). In this case, p / d=15.
[0046] Similarly, if L is determined to be 2580 μm (2.58 mm), then p = (2580-30) / (18-1) = 150 μm (0.15 mm). In this case, p / d = 5.
[0047] Similarly, if L is determined to be 880 μm (0.88 mm), then p = (880-30) / (18-1) = 50 μm (0.05 mm). In this case, p / d = 1.67.
[0048] In addition, when N=18 and d=60μm, the pitch p is determined as follows. When L is determined to be 7680μm (7.68mm), p=(7680-60) / (18-1)≒448μm (0.448mm). In this case, p / d≒7.47.
[0049] Similarly, if L is determined to be 2580 μm (2.58 mm), then p = (2580-60) / (18-1) ≒ 148 μm (0.148 mm). In this case, p / d ≒ 2.47.
[0050] Similarly, if L is set to 880 μm (0.88 mm), p = (880-60) / (18-1) ≒ 48 μm (0.048 mm). In this case, p / d is less than 1, so it is inappropriate to set L to 880 μm.
[0051] Furthermore, when N=18 and d=90μm, the pitch p is determined as follows. When L is determined to be 7680μm (7.68mm), p=(7680-90) / (18-1)≒446μm (0.446mm). In this case, p / d≒4.95.
[0052] Similarly, if L is determined to be 2580 μm (2.58 mm), then p = (2580-90) / (18-1) ≒ 146 μm (0.146 mm). In this case, p / d ≒ 1.62.
[0053] Similarly, if L is set to 880 μm (0.88 mm), p = (880-90) / (18-1) ≒ 46 μm (0.046 mm). In this case, p / d is less than 1, so it is inappropriate to set L to 880 μm.
[0054] FIG. 4 shows an example of the procedure of the reading process 111 executed in the reading device 100. As described above, the two-dimensional code 10 to be read has dots 11A smaller than the cells 11 in an area corresponding to the cells 11. The reading process 111 according to the embodiment can improve the reading rate of the two-dimensional code 10 by relatively enlarging the dots 11A on the image obtained by imaging the two-dimensional code 10 (enlarging so that p / d becomes smaller). If the dots 11A are small and p / d is large, as described above, the dots 11A are less noticeable, which is advantageous in terms of appearance, but the reading rate of the two-dimensional code decreases. However, the reading process 111 can improve the reading rate by enlarging and decoding the dots 11A.
[0055] FIG. 5 shows the results of investigating the reading rate when the decode process of the two-dimensional code is performed based on the image obtained by imaging the two-dimensional code itself without enlarging the dots 11A in the image obtained by imaging the two-dimensional code, by changing p / d. The two-dimensional code here is a data matrix (18 cells x 18 cells, 30 mm per side) expressed with holes as shown in FIG. 6. Here, decoding the two-dimensional code means restoring the original data from an image of the two-dimensional code in which the original data is encoded. For example, when data in which a predetermined character string, which is the original data, is encoded is decoded, the character string is obtained. The reading rate indicates the rate at which the decoding is successful. If the decoding fails, a reading error occurs and the original data cannot be obtained.
[0056] As shown in FIG. 5, when p / d is 1, 1.1, 1.2, and 1.3, the diameter d is only approximately the same size as the pitch p or slightly smaller, and a 100% reading rate is obtained. This is thought to be because the circular dot 11A is only approximately the same size as the rectangular cell 11 or slightly smaller, and the value of each cell is correctly recognized. On the other hand, when p / d is 1.4, the diameter d becomes slightly smaller than the pitch p, and the reading rate drops to 70%. Then, when p / d is 1.5, the reading rate drops significantly to 30%. When p / d is 1.6 and 1.7, the reading rate is 0%. Thus, according to the results of FIG. 5, it can be understood that the reading rate drops significantly when p / d is about 1.45 or more. This is thought to be because the ratio of the dot 11A to the entire first cell 11 becomes small, and the decoder that performs the decoding cannot recognize the dot 11A as the original first cell (for example, a cell whose entire cell is dark).
[0057] Thus, from the viewpoint of the reading rate, it is better for p / d to be small. On the other hand, from the viewpoint of making the dots 11A (holes) less noticeable and improving the appearance, it is better for p / d to be large, preferably 1.25 or more, more preferably 1.45 or more, and even more preferably 1.6 or more. Thus, it may be difficult to achieve both good appearance and successful reading. In particular, when p / d=1.4 or more, which is a good appearance, the reading rate is less than 100%, and when p / d=1.6 or more or 1.7 or more, which is a notable good appearance, the reading rate is 0%, and the code 10 does not function. In some cases, the reading rate may decrease when p / d is about 1.2. Note that the results in FIG. 5 are for a data matrix, but the same tendency occurs with QR codes and other two-dimensional codes.
[0058] In contrast, the reading process 111 of the embodiment can improve the reading rate even for a two-dimensional code having a p / d ratio that reduces the reading rate by enlarging the dots 11A on the image so that the area that the dots 11A occupy in the first cell 11 increases. Also, the reading time is shortened.
[0059] From the results of Fig. 5, it is preferable that the dot 11A is enlarged so that p / d is 1.3 or less, and more preferably 1.2 or less. Since excessive enlargement actually reduces the reading rate, it is preferable that p / d after enlargement is 0.8 or more, more preferably 0.9 or more, and even more preferably 1 or less.
[0060] According to the results of Fig. 5, two-dimensional code 10 with a sufficiently large p / d cannot be decoded by a normal decoder for the normal two-dimensional code represented by two-dimensional code 10. Therefore, two-dimensional code 10 of the embodiment is suitable as a special-purpose two-dimensional code that cannot be read by a reading device equipped with a normal decoder and can only be read by a dedicated reading device 100. As an example, two-dimensional code 10 for a special purpose has a p / d of 1.45 or more.
[0061] FIG. 7 is a conceptual diagram of the shaping of the dot 11A performed in the reading process 111. The shaping here includes enlarging the dot 11A and making the dot 11A closer to a rectangle. As shown in FIG. 7, the shaped dot 11B is, for example, a rectangular shape with rounded corners, and is closer to the shape of the rectangular cell 11, and the area it occupies in the cell 11 is larger than before the shaping. This improves the reading rate by the decoder. The shaping (or simple enlargement) of the dot 11A is preferably shaping or enlargement such that the shaped dot 11B (or dot 11C) occupies an area of 60% or more in the cell 11, more preferably 70% or more, and more preferably 80% or more. The area of the dot 11A before the shaping or enlargement in the cell 11 is preferably 50% or less, more preferably 40% or less, and even more preferably 30% or less.
[0062] The shaped dot 11B may be slightly larger than the cell 11. That is, the shaped dot 11B may be enlarged to the extent that it partially overlaps with the adjacent cell. However, if the dot 11B is enlarged to the extent that it largely overlaps with the adjacent cell, the read rate may decrease. For example, if the adjacent cell is the second cell 12, and the dot 11B is enlarged to the extent that it largely overlaps with the adjacent second cell 12, the decoder may erroneously recognize the adjacent second cell 12 as the first cell 11. Therefore, it is preferable that the dot 11A is enlarged to the extent that such erroneous recognition does not occur.
[0063] In addition, as shown in FIG. 7, the shaping according to the embodiment does not simply enlarge the dot 11A, but enlarges the dot while deforming it into a rectangle so as to approach the rectangular cell 11. As a result, even if the area of the dot 11B shown in the cell 11 is increased, the dot 11B can be prevented from protruding from the cell 11. Conversely, as in the case of the dot 11C in FIG. 7, if the dot 11A is simply enlarged while remaining circular to sufficiently increase the area it occupies in the cell 11, it will partially protrude from the cell 11. In contrast, the dot 11B shaped as shown in FIG. 7 is enlarged to approximate a rectangle, so that the dot 11B is prevented from protruding from the cell 11 even if the area it occupies in the cell 11 is sufficiently increased.
[0064] To enlarge the dot 11A while approaching a rectangle, the enlargement rate may be increased in the diagonal direction (direction toward the corner of the rectangle) compared to the up, down, left, and right directions, as shown in FIG. 7. Such shaping can be achieved, for example, by performing a process of identifying the position of the dot 11A in the image, and enlarging each dot 11A so that the enlargement rate of the identified dot is greater in the diagonal direction than in the up, down, left, and right directions. Note that the enlargement and transformation into a rectangle may be performed by separate processes. For example, a conversion process may be performed to transform the circular dot 11A into a square whose side length is the same as the diameter of the circular dot 11A, and then an enlargement process may be performed to enlarge the square obtained by the conversion process at an appropriate magnification. Alternatively, the conversion process may be performed after the enlargement process.
[0065] The present inventors have newly discovered that, as an example of a method for easily performing the above-mentioned shaping, a morphology operation that applies a structuring element to an image to be processed can be used. When using a morphology operation (morphological image processing), it is not necessary to identify the dot 11A in the image, and the dot 11A can be shaped by applying a structuring element to the image to be processed.
[0066] Returning to FIG. 4, the reading process 111 of the embodiment is an example of a reading method using morphological operations (step S45). In the reading process 111 of FIG. 4, first, the camera 130 (image sensor) captures an image of the two-dimensional code 10 to obtain an image (step S41). The reading device 100 converts the obtained image into a grayscale image to obtain a grayscale image (step S42), and binarizes the grayscale image to obtain a binary image (step S43). The reading device 100 also performs a smoothing process such as Gaussian blurring on the binary image (step S44). Note that Gaussian blurring is a smoothing method that uses a Gaussian distribution to weight neighboring pixel values according to the distance from a pixel of interest.
[0067] After performing pre-processing such as steps S42 to S44 on the image as necessary, the reading device 100 uses morphological operations to reshape or enlarge the dots 11A in the image (step S45). The morphological operations on the image (step S45) can be repeated multiple times as necessary. The circular dots 11A can be made closer to a rectangle by the morphological operations. By repeating the morphological operations multiple times, the dots 11A can be reshaped or enlarged more appropriately. In addition, by performing image blurring such as Gaussian blurring before the morphological operations, the effect of transformation into a rectangle by the morphological operations can be improved. This point will be described later.
[0068] The number of times the morphological operation is repeated may be a predetermined number set in advance, but the reading device 100 may obtain the diameters d and p of the dots 11A from an image captured of the two-dimensional code 10, and determine the number of times the morphological operation is repeated based on the diameter d and pitch p. The reading device 100 may obtain the values of d and p through user input or other means. As an example, the reading device 100 may determine the number of times the morphological operation is repeated based on the value of p / d (the ratio of p to d). The reading device 100 may increase the number of times the morphological operation is repeated as the value of p / d increases.
[0069] After dot shaping (step S45), the reading device 100 executes noise removal processing such as median filter processing (step S46). Impulse noise (isolated points) can be removed by the median filter.
[0070] The reading device 100 executes decoding based on the image in which the dots 11A are shaped (step S47). The original data indicated by the two-dimensional code 10 is decoded by the decoding. The decoding in step S47 may be performed according to a standard two-dimensional code decoding algorithm corresponding to the two-dimensional code 10 of the embodiment. For example, if the two-dimensional code 10 of the embodiment is a QR code represented by the dots 11A, a QR code decoding algorithm is used. Also, if the two-dimensional code 10 of the embodiment is a data matrix represented by the dots 11A, a data matrix decoding algorithm is used. Note that the decoding may be performed by a device outside the reading device 100 (for example, a server connected to the reading device 100 via a network), and the reading device 100 may obtain the decoded result from the device outside the reading device 100.
[0071] According to the reading process 111 of the embodiment, the dots 11A are enlarged by image processing, so the dots 11A of the two-dimensional code 10 itself may be smaller than the cells 11. This makes it possible to achieve both a good appearance of the two-dimensional code 10 and an improved read rate. Furthermore, as described below, when the dots are represented by holes formed by laser processing, if the holes representing the dots 11A are small, the processing time can be shortened and costs can be reduced. Furthermore, thermal damage caused by laser processing can be suppressed. The ability to make the holes small is particularly effective when forming holes with a fine diameter (for example, 10 μm to 100 μm) using a femtosecond laser.
[0072] The following describes the morphological operations used in the reading process 111 of the embodiment. As described above, the morphological operations are operations for image processing that apply a structuring element to an image to be processed. The image to be processed may be a binary image, a grayscale image, or a color image, but the following describes a binary image as an example.
[0073] Figures 8(A) and (B) show examples of structuring elements (kernels) used in morphological operations. Figure 8(A) shows a structuring element having a central pixel and its four neighboring pixels (above, below, left, right). Figure 8(B) shows a structuring element having a central pixel and its eight neighboring pixels. The structuring element places its center at a pixel of interest in the image to be processed, and performs operations on the image to be processed in the direction of the black pixels of the structuring element. The pixel of interest can be any pixel in the image to be processed. The operations are, for example, a set union operation or a set intersection operation. A set union operation is used for dilation, and a set intersection operation is used for erosion.
[0074] In the case of erosion, if all pixels in the image to be processed (binary image) in the direction of the structuring element (4 or 8 directions) are white pixels, the pixel of interest is made a white pixel (1), otherwise the pixel of interest is made a black pixel (0). By performing this calculation on the entire image to be processed or on the required range, the white pixel (1) areas of the image to be processed are eroded. As a result, the black pixel areas are expanded.
[0075] Therefore, when a morphological operation for erosion is applied to an image having dots 11A represented by black pixels, the dots 11A in the image can be enlarged or expanded. Moreover, the inventors have found that when a morphological operation is applied in a case where the number of pixels constituting the dots 11A is sufficiently small, the dots 11A, which were originally circular, can be made into a quadrangle with rounded corners that is close to a rectangle on the image. In the reading process 111 of the embodiment, this is utilized to apply a morphological operation to the image, thereby shaping the dots 11A in the image so as to enlarge the dots 11A while making them closer to a rectangle (step S45).
[0076] On an image, a circle is approximately represented by a set of pixels. Therefore, in an image, a part of the periphery of a circle may be represented by a straight line. A part of the periphery of a circle is likely to be a straight line, especially when the number of pixels constituting the dot 11A is small. The morphological operation of the embodiment can shape the dot 11A so as to make the circle closer to a rectangle by utilizing the fact that a part of the periphery of the circle on the image is a straight line. From this viewpoint, it is preferable that the diameter of the dot 11A in the image before the morphological operation is applied is small. For example, the diameter of the dot 11A in the image is preferably equal to or less than a length equivalent to 50 pixels, more preferably equal to or less than a length equivalent to 30 pixels, and even more preferably equal to or less than a length equivalent to 15 pixels. Note that the diameter of the dot 11A in the image is preferably equal to or more than a length equivalent to 5 pixels, and more preferably equal to or more than a length equivalent to 10 pixels.
[0077] As described above, the two-dimensional code 10 of the embodiment is very fine with the diameter d of the dots 11A being very small, so when the two-dimensional code 10 is photographed using a normal method, the dots 11A on the image naturally become as small as described above. If the dots 11A on the image are larger than the above, the entire image may be reduced to reduce the number of pixels that make up the dots 11A, and then the morphological operation may be applied. In this case, the entire image may be enlarged after the application of the morphological operation, and then decoded.
[0078] If a part of the periphery of a circle on an image is a straight line, the reason why a rectangle with rounded corners is obtained by morphological operations is as follows. First, the circle shown by the dotted line in FIG. 9 is expressed in an image as a set of pixels, and therefore, for example, becomes an approximate circular shape shown by the black area in FIG. 9. The periphery of the shape shown by the black area in FIG. 9 has "flat parts" on the top, bottom, left and right, and the upper left, upper right, lower left and lower right corners have a stepped shape. The stepped shapes of these corners are called "rounded corners". Then, as described above, contraction by morphological operations makes a target pixel a white pixel if all pixels of the image to be processed in the structuring element are white pixels. In other words, if there is even one black pixel in the structuring element, the target pixel becomes black. When such morphological operations are applied to the approximate circle in FIG. 9, the rounded corners are maintained as they are, while the approximate circle expands so that the flat parts are stretched. As a result, the rounded corners become relatively smaller, and the approximate circle becomes closer to a rectangle with rounded corners.
[0079] FIG. 10 shows the result of repeatedly applying the morphological operation (erosion). FIG. 10(A) shows the dot 11A (approximate circle) before the morphological operation is applied. The dot 11A shown in FIG. 10(A) has a diameter d equivalent to 20 pixels. FIG. 10(B) shows the dot 11B after the morphological operation is applied once, FIG. 10(C) shows the dot 11B after the morphological operation is applied twice, and FIG. 10(D) shows the dot 11B after the morphological operation is applied three times. As shown in FIG. 10, when the morphological operation is applied, the dot 11A expands and approaches a rectangle. Moreover, the more the morphological operation is repeated, the more the dot 11A can be expanded, and the closer it can be to a rectangle.
[0080] FIG. 11 also shows the result of repeatedly applying morphological operations (erosion). Like FIG. 10(A), FIG. 11(A) shows a dot 11A before applying morphological operations. The dot 11A shown in FIG. 11(A) is also an approximation of a circle with a diameter d equivalent to 20 pixels, but unlike the dot 11A in FIG. 10(A), a convex part occurs in the center of the flat part. The dot 11A shown in FIG. 11(A) is closer to a circle than the dot 11A in FIG. 10(A). In the case of FIG. 11, when the morphological operations are applied, the convex part expands, but the overall shape approaches a rectangle.
[0081] When the two-dimensional code 10 is imaged by a camera, some blurring occurs, so that the dot 11A as shown in FIG. 11(A) is rarely obtained in the image, and in reality, it becomes like the dot 11A in FIG. 10(A). Even if the dot 11A as shown in FIG. 11(A) is obtained, the dot 11A in FIG. 10(A) can be obtained by applying the Gaussian blurring (step S44) in FIG. 4. Even if the dot 11A in FIG. 10(A) is obtained, the flat part can be enlarged by applying the Gaussian blurring with a smoothing effect. By enlarging the flat part, it can be made closer to a rectangle. If sufficient blurring is ensured when imaging, step S44 in FIG. 4 may be omitted.
[0082] In addition, by using a morphological operation (contraction), it is also possible to connect adjacent dots 11A (black areas) by removing the white areas between them. It is also possible to remove impulse noise (isolated white) in an image.
[0083] FIG. 12(A) shows an example of a two-dimensional code 10 according to the embodiment, in which dark cells of a QR code are represented by black dots. FIG. 12(B) shows an image 10A after applying a morphological operation (shrinkage) to the two-dimensional code 10 of FIG. 12(A). In FIG. 12(A), the dot pitch p is 1.429 mm, and the dot diameter d (average value) is 1.143 mm. Therefore, p / d is about 1.25. The diameters of the black dots constituting the finder pattern of the QR code 10 of FIG. 12(A) are varied to simulate errors. Therefore, the sizes of the black dots constituting the finder pattern are different. Even if the code 10 of FIG. 12(A) is decoded by a normal QR code decoder, the reading rate is very low. On the other hand, the code of FIG. 12(B) has a high reading rate (almost 100%) even when a normal QR code decoder is used. Therefore, it can be seen that the reading process 111 of FIG. 4 using the morphological operation is effective.
[0084] In the code 10 in FIG. 12(A), when the morphological operation is applied to the dots whose diameter is increased so that p / d is 1, the read rate is slightly lower than when p / d is 1.25. This is considered to be because the black dots become too large due to the morphological operation. Also, if the average value of the diameter d is sufficiently small, there is little problem even if the diameter d varies and a slightly large dot is generated. Therefore, when the morphological operation is applied, the p / d of the original code 10 is preferably 1.25 or more, more preferably 1.45 or more, and even more preferably 1.6 or more. Also, if p / d is too large (d is too small), the number of repetitions of the morphological operation must be increased, and the operation time increases. Also, if the number of repetitions is reduced to suppress the increase in the operation time, the read rate decreases. Therefore, it is preferable that p / d is not too large, and p / d is preferably 3 or less, more preferably 2.5 or less, and even more preferably 2 or less.
[0085] Now, the dots 11A of the two-dimensional code 10 of the embodiment can be formed by holes 11E formed in the substrate 20, as shown in FIG. 13. The holes 11E are darker than other parts of the substrate surface 20A (parts where the holes 11E are not formed), so in an image of the two-dimensional code 10, the dots 11A appear as dark areas (for example, black areas). That is, the holes 11E represent the dots 11A of the two-dimensional code 10. More specifically, the areas of the holes 11E represent the dots 11A in the first cells 11 of the two-dimensional code 10 of the embodiment, and the areas of the substrate surface 20A as is where the holes 11E are not formed represent the range around the dots 11A of the second cells 12 or the first cells 11. The areas of the substrate surface 20A as is where the holes are not formed are bright areas. The substrate surface 20A does not need to be monochromatic, patternless, or flat, and may have a color, a pattern, or may have fine or gentle unevenness compared to the holes.
[0086] The material of the substrate 20 on which the two-dimensional code 10 of the embodiment is formed is not particularly limited. However, the inventors came up with the idea that synthetic resins such as plastics or elastomers, or leather, etc., are suitable for the substrate 20. Here, Non-Patent Document 1 discloses the formation of microholes representing a two-dimensional code in a substrate with high heat resistance such as diamond by using a femtosecond laser, but does not disclose the formation of holes representing a two-dimensional code in a substrate with low heat resistance such as synthetic resins such as plastics or elastomers, or leather. Moreover, in Non-Patent Document 1, the diameter of the holes is slightly smaller than that of the rectangular cells, but is approximately the same size.
[0087] Since synthetic resin is a material that is widely and generally used, if the two-dimensional code 10 of the embodiment can be created by drilling holes 11E in such a base material 20, convenience will be increased. Furthermore, since leather products such as bags are also widely and generally used, if the two-dimensional code 10 can be created using such leather as a base material, convenience will be increased. However, synthetic resin and leather have low heat resistance. If the heat resistance is low, the base material 20 is easily damaged by heat when the holes 11E are formed by laser processing, which is disadvantageous. Furthermore, if the two-dimensional code 10 can be created by drilling holes 11E in the base material 20 having a biological material (animal or plant-derived material) such as wood, paper, natural rubber, teeth, and bones other than synthetic resin and leather, convenience will also be increased, but these materials also have low heat resistance and are easily damaged by heat. The synthetic resin is, for example, a plastic or an elastomer. The plastic may be a thermoplastic resin or a thermosetting resin. The elastomer is, for example, a synthetic rubber or a thermoplastic elastomer. The leather may be natural leather, synthetic leather, or artificial leather.
[0088] Even when forming hole 11E in substrate 20 such as plastic that is vulnerable to heat, a femtosecond laser is effective because it causes relatively little thermal damage to substrate 20 compared to other lasers. Since the femtosecond laser has a very small pulse width and the heat irradiation ends before the heat is transmitted to substrate 20, thermal damage is reduced and it is possible to prevent hole 11E from unintentionally increasing in diameter or losing its shape.
[0089] Here, in order for hole 11E to appear clearly on the image as a dark region indicating dot 11A, hole 11E needs to look sufficiently dark. To make hole 11E darker, it is better to make hole 11E deeper. However, when attempting to form deep hole 11E using a laser other than a femtosecond laser, hole 11E tends to have a mortar shape that widens toward the upper opening, and it is difficult to form hole 11E having a straight inner surface 11F in the depth direction as shown in FIG. 13 (a hole having a shape in which the diameter is approximately constant in the hole depth direction).
[0090] In contrast, when a femtosecond laser is used, a hole 11E having a straight side in the depth direction can be formed, and light does not reach the inside of the hole 11E, making the hole 11E sufficiently dark, which is preferable. If the hole 11E is sufficiently dark, it is easy to distinguish the hole 11E from the substrate surface 20A other than the hole in an image, even if the substrate surface 20A is a dark color such as black or brown. When light is irradiated onto the substrate surface 20A other than the hole, a certain degree of light reflection can be expected even if the substrate surface 20A is dark. In contrast, the light reflection from the hole 11E is small. Therefore, in an image obtained by capturing the two-dimensional code 10, a difference in brightness between the hole 11E and the area 20A other than the hole may occur.
[0091] From this viewpoint, the depth dpth of the hole 11E is preferably 1.5 times or more, more preferably 2 times or more, and even more preferably 3 times or more, of the diameter d of the hole 11E. Moreover, the hole 11E preferably has an inner side surface 11F (straight inner side surface) that is substantially perpendicular to the substrate surface 20A.
[0092] However, even if a femtosecond laser is used, the substrate 20 may be thermally damaged if it is made of synthetic resin, leather, or other heat-sensitive material. In particular, as in Non-Patent Document 1, if the diameter of the hole is set to be approximately the same as the rectangular cell, this is advantageous for reading the two-dimensional code, but if the rectangular cell is large, the diameter of the hole also becomes large. If the hole formed by the laser is large, the substrate 20 is easily damaged by heat. As a result, the hole may not be able to form an appropriate two-dimensional code.
[0093] Therefore, the present inventors came up with the idea that by making the holes 11E formed by the laser sufficiently small (for example, the diameter d is about 10 μm to 100 μm), it is possible to suppress thermal damage to the substrate 20, even if the substrate 20 is a heat-sensitive material such as synthetic resin or leather. Such minute holes are suitably formed by a femtosecond laser. However, in order to make the holes 11E representing the dots 11A small and still enable normal reading of the two-dimensional code, it is necessary to make the diameter of the holes approximately the same as the size of the rectangular cells. In other words, it is necessary to make the diameter d of the holes approximately the same as the pitch p of the holes (about p / d=1). However, if the holes are small and about p / d=1, the size of the entire two-dimensional code becomes very small.
[0094] For example, when the diameter d of the hole is 10 μm and p / d=1, the length L of one side of the two-dimensional code with 9×9 cells is 90 μm (0.09 mm) according to formula (3) in FIG. 3, which is very fine. In Non-Patent Document 1, a QR code is formed on a gemstone such as a diamond that is usually observed under high magnification, so such a fine QR code may be acceptable, but a fine code alone lacks versatility. For this reason, it is desirable for the two-dimensional code itself to have a certain size while making the hole minute. For example, the length L of one side of the two-dimensional code is preferably 0.1 mm or more, more preferably 0.5 mm or more, and even more preferably 1 mm or more.
[0095] The inventors focused on p / d in order to achieve both miniaturization of the holes and enlargement of the two-dimensional code itself. That is, by making p / d larger than 1 as described above, it is possible to enlarge the two-dimensional code 10 while miniaturizing the holes 11E.
[0096] For example, even if d is 10 μm, if p / d=1.45, p=14.5 μm, and when N=9, L is 126 μm. Furthermore, when N=25, L is 358 μm. Furthermore, when d is 30 μm, p / d=1.5, p=45, and N=18, L is 795 μm. Furthermore, when d is 30 μm, p / d=1.5, p=45, and N=25, L is 115 μm, which is 1 mm or more. In this way, even if d is small, by appropriately increasing p / d, the size of the two-dimensional code 10 can be increased without significantly increasing the number of cells N per side. Note that even when p / d is large, reading is possible by enlarging the hole 11E on the image.
[0097] When L has a certain size, the presence of the two-dimensional code 10 can be easily recognized by the naked eye, by using a simple magnifying glass, or by using an image enlargement function (for example, a magnification function of about 5 to 10 times) of a camera application (software), and it becomes easy to bring the reading device 100 close to the location where the two-dimensional code 10 is present in order to read the two-dimensional code 10. When p / d is sufficiently larger than 1, the holes become small, and even if the two-dimensional code 10 is sufficiently large, each hole becomes difficult to see with the naked eye. As a result, even if the two-dimensional code 10 is large enough to be recognized as a whole, the two-dimensional code 10 becomes less noticeable, and the appearance is good. From this point of view, it is preferable that p / d is 1.45 or more, particularly 1.6 or more.
[0098] As described above, the two-dimensional code 10 of the embodiment is designed to have a relatively large p / d. In manufacturing the two-dimensional code 10, the femtosecond laser is controlled so that holes with diameter d are formed at the positions of the first cells 11 of the two-dimensional code 10. The femtosecond laser is controlled so that holes corresponding to adjacent first cells 11 have a pitch p. For example, the cell pattern of the two-dimensional code (the arrangement of the first cells 11 and the second cells 12), the diameter d, and the pitch p are provided to the controller of the femtosecond laser. The controller forms holes in the substrate based on the applied cell pattern, the diameter d, and the pitch p.
[0099] Such a two-dimensional code 10 is suitable as a two-dimensional code to be applied to leather products such as bags or wallets. In an experiment conducted by the present inventors, two-dimensional codes 10 with hole diameter d=30 μm, p / d=1.8, hole depth dpth=100 μm, and L=3 mm were formed on brown leather products and black leather products using a femtosecond laser, and the reading device 100 according to the embodiment was able to successfully read the two-dimensional codes 10. A similar two-dimensional code formed on a plastic plate was also successfully read.
[0100] FIG. 14 shows the results of investigating the relationship between hole depth dpth and two-dimensional code reading time for a two-dimensional code 10 of an embodiment. Four types of two-dimensional codes 10, A-1, A-2, A-3, and A-4, were used here. The reading time here is the time from when the two-dimensional code 10 is photographed to when the decoded result is obtained. In FIG. 14, the vertical axis indicates the reading time [seconds]. The sizes of A-1, A-2, A-3, and A-4 are as shown in FIG. 14, and only the depth dpth is different, with the other sizes being the same.
[0101] As shown in Figure 14, in the cases of A-1, A-2, A-3, and A-4, the reading time was generally within the range of 0.05 to 0.15 seconds, and reading was possible in a short time. However, in A-1, an outlier X occurred near 0.25 seconds, in A-2, an outlier X occurred near 0.29 seconds, and in A-3, an outlier X occurred near 0.11 seconds. No outliers occurred in A-4.
[0102] As shown in FIG. 14, A-1 and A-2 have relatively large outliers. A-1 and A-2 have relatively small depths dpth, and there is a certain probability that holes are difficult to recognize as dots due to the influence of light, etc., which is why it is considered that outliers are generated. In addition, A-3 has outlier X, but it is less than 0.15 seconds and is almost no problem. Therefore, from the viewpoint of preventing large outliers from occurring, A-3 and A-4 are preferable, and A-4 is even more preferable. In terms of the aspect ratio dpth / d of the depth dpth of the hole to the diameter d, dpth / d is preferably 1.5 or more, more preferably 2 or more, and even more preferably 3 or more.
[0103] The present disclosure includes the following aspects (1) to (6): In the following aspects, holes formed by a femtosecond laser can be made less noticeable.
[0104] (1) A method for manufacturing a two-dimensional code having a plurality of rectangular cells arranged therein, the method comprising the steps of: forming a two-dimensional code having a single hole smaller than the rectangular cell at the center of an area corresponding to each of the plurality of rectangular cells; forming the holes in a substrate on which a two-dimensional code is to be formed, using a femtosecond laser; The hole formed by the femtosecond laser has a diameter of 10 μm to 100 μm; When the diameter is d and the pitch of the holes formed in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more, and each of the vertical and horizontal sides of the code is 0.1 mm or more. How to manufacture 2D codes.
[0105] (2) A method for manufacturing a two-dimensional code in which a plurality of rectangular cells are arranged is formed by forming a two-dimensional code having holes smaller than the rectangular cells at the center of areas corresponding to each of the rectangular cells, the method comprising the steps of: The method includes forming the holes in a substrate including at least one selected from the group consisting of synthetic resin, leather, and biological materials by using a femtosecond laser. How to manufacture 2D codes.
[0106] (3) The hole has a hole depth that is 1.5 times or more the hole diameter.
[0107] (4) The hole has an inner surface that is approximately perpendicular to the surface of the substrate.
[0108] (5) The holes have inner surfaces that are approximately perpendicular to the surface of the substrate, and have a hole depth that is 1.5 times or more the diameter of the hole.
[0109] (6) A two-dimensional code formed on a substrate including at least one selected from the group consisting of synthetic resin, leather, and biological materials, In order to represent a two-dimensional code in which a plurality of rectangular cells are arranged, a single hole is provided at the center of an area corresponding to each of some of the plurality of rectangular cells, The diameter of the hole is 10 μm to 100 μm, the diameter is d, and the pitch of holes formed in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more, A two-dimensional code with each side measuring 0.1 mm or more.
[0110] The present invention is not limited to the above-described embodiment, and various modifications are possible. [Explanation of symbols]
[0111] 10: 2D code 10A:Image 11: Rectangular cell 11A: Circular dot 11B: Dot 11C: Dot 11E: Hole 11F:Inner side 12: Second cell 20: Base material 20A: Base material surface 100: Reading device 110: Processor 111: Reading process 120: Storage device 121: Computer Programs 130: Camera N: Number of cells X: deviation value d: Hole diameter dpth : Hole depth p :pitch
Claims
1. A method for reading a two-dimensional code having a plurality of rectangular cells arranged therein, the method comprising the steps of: Execute a shaping process on the image obtained by photographing the two-dimensional code; Decoding the two-dimensional code based on the image obtained by the shaping process. Prepare for this. the shaping process includes image processing for deforming the circular dot in the image so that an area occupied by the circular dot in the region corresponding to the rectangular cell increases and the circular dot approaches a rectangle; How to read a two-dimensional code.
2. The image processing is performed by a morphological operation that shrinks areas in the image that are not the circular dots. A method for reading a two-dimensional code according to claim 1.
3. The diameter of the circular dot in the image before the shaping process is performed is equal to or less than 50 pixels in the image. A method for reading a two-dimensional code according to claim 1 or 2.
4. When the diameter of the circular dot is d and the pitch between the circular dots in each region corresponding to adjacent rectangular cells in the two-dimensional code is p, p / d is 1.45 or more. A method for reading a two-dimensional code according to claim 1 or 2.
5. p / d is 1.6 or more The method for reading a two-dimensional code according to claim 4.
6. a diameter of the circular dot in the image before the shaping process is performed is equal to or less than a length equivalent to 50 pixels in the image; When the diameter of the circular dot is d and the pitch between the circular dots in each of the adjacent rectangular cells in the two-dimensional code is p, p / d is 1.45 or more. The method for reading a two-dimensional code according to claim 2.
7. In the image processing, the morphological operation is performed multiple times. The method for reading a two-dimensional code according to claim 2.
8. The method further comprises determining the number of times the morphological operations are performed in the image processing based on a diameter of the circular dot and a pitch between the circular dots in each of adjacent rectangular cells in the two-dimensional code. The method for reading a two-dimensional code according to claim 2.
9. A two-dimensional code reader having a plurality of rectangular cells arranged therein, the two-dimensional code reader having a single circular dot smaller than the rectangular cells at the center of an area corresponding to each of the plurality of rectangular cells, the two-dimensional code reader comprising: Execute a shaping process on the image obtained by photographing the two-dimensional code; Decoding the two-dimensional code based on the image obtained by the shaping process. It is configured as follows: the shaping process includes image processing for deforming the circular dot in the image so that an area occupied by the circular dot in the region corresponding to the rectangular cell increases and the circular dot approaches a rectangle; A two-dimensional code reader.
10. a shaping process for an image obtained by capturing an image of a two-dimensional code having a plurality of rectangular cells arranged therein, the two-dimensional code having a single circular dot smaller than the rectangular cells at the center of an area corresponding to each of the plurality of rectangular cells; Decoding the two-dimensional code based on the image obtained by the shaping process; A computer program for causing a computer to execute the following: the shaping process includes image processing for deforming the circular dot in the image so that an area occupied by the circular dot in the region corresponding to the rectangular cell increases and the circular dot approaches a rectangle; Computer program.
11. A method for manufacturing a two-dimensional code read by the two-dimensional code reading method according to claim 1, comprising the steps of: forming holes constituting the circular dots in a substrate on which a two-dimensional code is formed, using a femtosecond laser; the holes formed by the femtosecond laser have a diameter of 10 μm to 100 μm; When the diameter is d and the pitch of holes formed in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more, and each of the vertical and horizontal sides of the code is 0.1 mm or more. A method for manufacturing a two-dimensional code.
12. A method for manufacturing a two-dimensional code read by the two-dimensional code reading method according to claim 1, comprising the steps of: The method includes a step of forming holes constituting the circular dots in a substrate including at least one selected from the group consisting of synthetic resin, leather, and biological materials, by using a femtosecond laser. A method for manufacturing a two-dimensional code.
13. A method for manufacturing a two-dimensional code read by the two-dimensional code reading method according to claim 1, comprising the steps of: A substrate including at least one selected from the group consisting of synthetic resin, leather, and biological materials, forming holes constituting the circular dots by a femtosecond laser; the holes formed by the femtosecond laser have a diameter of 10 μm to 100 μm; When the diameter is d and the pitch of holes formed in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more, and each of the vertical and horizontal sides of the code is 0.1 mm or more. A method for manufacturing a two-dimensional code.
14. A two-dimensional code to be read by the two-dimensional code reading method according to claim 1, The substrate is formed on a substrate including at least one selected from the group consisting of synthetic resin, rubber, leather, and biological materials; a single hole formed in the center of an area corresponding to each of some of the rectangular cells in order to represent a two-dimensional code in which a plurality of rectangular cells are arranged; The diameter of the hole is between 10 μm and 100 μm; the diameter is d and the pitch of holes formed in each of the regions corresponding to adjacent rectangular cells in the two-dimensional code is p, the pitch is set so that p / d is 1.45 or more; Each length and width of the cord is 0.1 mm or more. 2D code.