Two-dimensional code, two-dimensional code generation device, two-dimensional code generation method, two-dimensional code decryption device, two-dimensional code decryption method, two-dimensional code generation and decryption system, and two-dimensional code generation and decryption method

The two-dimensional code design with specific and random gradation values in dark and light cells addresses the security vs. convenience trade-off, enabling secure decoding only by compatible readers, thus maintaining usability.

JP2025111042APending Publication Date: 2025-07-30UNIVERSITY OF ELECTRO-COMMUNICATIONS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024005186
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-01-17
Publication Date
2025-07-30

AI Technical Summary

Technical Problem

Existing two-dimensional codes lack security measures that do not compromise their convenience and ease of use, as they can be easily decoded by any device with the correct encryption key.

Method used

A two-dimensional code design incorporating a specific pattern area and data recording area with dark and light cells of varying primary color gradation values, where dark cells have a specific gradation value and light cells have random gradation values within a defined range, ensuring secure decoding only by compatible readers.

Benefits of technology

Ensures secure decoding of two-dimensional codes without reducing their usability, as only authorized readers can decode the recorded data, maintaining convenience while enhancing security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025111042000001_ABST
    Figure 2025111042000001_ABST
Patent Text Reader

Abstract

To improve the security of two-dimensional codes.SOLUTION: The present invention is applicable to two-dimensional codes with a specific pattern area and a data recording area. In the specific pattern area, a specific pattern of a predetermined shape is arranged. In the data recording area, dark and light cells are prepared as display units and combining the dark and light cells in arrangement indicates recording data. In one of the dark and light cells of the data recording area, a specific one primary color of three primary colors is set to a first gradation value, and the remaining two primary colors are set to random gradation values. In the other cells of the data recording area, the specific one primary color is set to a random gradation value within a range away from the first gradation value, and the remaining two primary color signals are set to random gradation values.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a two-dimensional code, a two-dimensional code generation device, a two-dimensional code generation method, a two-dimensional code decoding device, a two-dimensional code decoding method, a two-dimensional code generation / decoding system, and a two-dimensional code generation / decoding method, and particularly relates to a technology of a two-dimensional code with security measures.

Background Art

[0002] In recent years, two-dimensional codes such as QR Codes (registered trademark) have become widespread in various applications. For example, by displaying a two-dimensional code on the display unit of a terminal such as a smartphone and reading the two-dimensional code with a reader, authentication of the terminal holder is performed. Such two-dimensional codes are used, for example, as tickets for various events or transportation tickets. Alternatively, it has also become widespread for authentication at the time of payment at stores and the like. The usage form of displaying a two-dimensional code on a terminal such as a smartphone is just an example, and it may also be printed on paper or the like for use. Normally, for a two-dimensional code read by a reader, the recorded information such as text and symbols is restored by decoding the read image in the reader.

[0003] By the way, a two-dimensional code can be easily encoded into code information on a terminal such as a smartphone, and the displayed code information can also be easily read on a terminal such as a smartphone. While it has high convenience, there are concerns in terms of security. [[ID=!19]] Patent Document 1 describes an example in which a technique of setting public / non-public for code information displayed as a two-dimensional code is applied using an encryption key.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] As described in Patent Document 1, by encrypting code information displayed as a two-dimensional code using an encryption key, only a specific device with the encryption key can correctly read the information, and security when using the two-dimensional code is ensured. When using an encryption key as described in Patent Document 1, only a device with the correct encryption key can decrypt it, and the technology described in Patent Document 1 is a usage method assuming that only a very small number of persons (devices) can read non-public information. Therefore, the use of such an encryption key is for ensuring security at the expense of the original convenience of the two-dimensional code, that is, the generation and decoding of the two-dimensional code can be easily performed on any terminal, and the development of a security ensuring technology that does not sacrifice convenience has been desired.

[0006] In view of these, an object of the present invention is to provide a two-dimensional code, a two-dimensional code generation device, a two-dimensional code generation method, a two-dimensional code decoding device, a two-dimensional code decoding method, a two-dimensional code generation / decoding system, and a two-dimensional code generation / decoding method that can ensure appropriate security without sacrificing convenience.

Means for Solving the Problems

[0007] The two-dimensional code of the present invention is a two-dimensional code provided with a specific pattern area in which a specific pattern of a predetermined shape is arranged, and a data recording area in which recording data is indicated by a combination of an arrangement of dark-colored cells and light-colored cells prepared as cells serving as units to be displayed. The dark-colored cells in the data recording area have a specific one of the three primary colors as a first gradation value, and the remaining two primary colors as random gradation values. The light-colored cells in the data recording area have a specific one of the primary colors as a random gradation value in a range away from the first gradation value, and the remaining two primary color signals as random gradation values.

[0008] In addition, the two-dimensional code generation device of the present invention is a two-dimensional code generation device provided with a specific pattern area where a specific pattern of a predetermined shape is arranged, and a data recording area where recording data is shown by a combination of arrangements of dark-colored cells and light-colored cells prepared as cells serving as units to be displayed, and includes a first replacement processing unit that sets a specific one of the three primary colors as a first gradation value for dark-colored cells in the data recording area and sets the remaining two primary colors as random gradation values, a second replacement processing unit that sets a random gradation value for a light-colored cell in the data recording area within a range away from the first gradation value for a specific one of the primary colors and sets the remaining two primary color signals as random gradation values, and a two-dimensional code output unit that arranges the cells in which the gradation values of the three primary colors are set by the first replacement processing unit and the cells in which the gradation values of the three primary colors are set by the second replacement processing unit in the data recording area to obtain a two-dimensional code for display or printing.

[0009] In addition, the two-dimensional code generation method of the present invention is a two-dimensional code generation method provided with a specific pattern area where a specific pattern of a predetermined shape is arranged, and a data recording area where recording data is shown by a combination of arrangements of dark-colored cells and light-colored cells prepared as cells serving as units to be displayed, and includes a first replacement process that sets a specific one of the three primary colors as a first gradation value for dark-colored cells in the data recording area and sets the remaining two primary colors as random gradation values, a second replacement process that sets a random gradation value for a light-colored cell in the data recording area within a range away from the first gradation value for a specific one of the primary colors and sets the remaining two primary color signals as random gradation values, and a two-dimensional code output process that arranges the cells in which the gradation values of the three primary colors are set by the first replacement process and the cells in which the gradation values of the three primary colors are set by the second replacement process in the data recording area to obtain a two-dimensional code for display or printing.

[0010] Further, the two-dimensional code decoding apparatus of the present invention includes a specific pattern area where a specific pattern of a predetermined shape is arranged, and as cells serving as units to be displayed, a first cell and a second cell composed of one of a dark color cell and a light color cell and the other, and a data recording area where recording data is indicated by a combination of the arrangements of the first cell and the second cell. The two-dimensional code decoding apparatus decodes a two-dimensional code provided with the above, and from an image obtained by photographing the two-dimensional code, cells in which the intensity of a specific one of the three primary color components is less than a threshold value or within a predetermined range are determined as the first cells, and cells that do not meet the conditions of the first cells are determined as the second cells, and a regeneration processing unit that regenerates the two-dimensional code, and a decoding processing unit that decodes the recording data included in the two-dimensional code regenerated by the regeneration processing unit.

[0011] Further, the two-dimensional code decoding method of the present invention includes a specific pattern area where a specific pattern of a predetermined shape is arranged, and as cells serving as units to be displayed, a first cell and a second cell composed of one of a dark color cell and a light color cell and the other, and a data recording area where recording data is indicated by a combination of the arrangements of the first cell and the second cell. The two-dimensional code decoding method decodes a two-dimensional code provided with the above, and from an image obtained by photographing the two-dimensional code, cells in which the intensity of a specific one of the three primary color components is greater than or equal to a threshold value, less than the threshold value, or within a predetermined range are determined as the first cells, and cells that do not meet the conditions of the first cells are determined as the second cells, and a regeneration process that regenerates the two-dimensional code, and a decoding processing unit that decodes the recording data included in the two-dimensional code regenerated by the regeneration process.

[0012] In addition, the two-dimensional code generation and decoding system of the present invention includes a specific pattern area where a specific pattern of a predetermined shape is arranged, and as cells serving as units to be displayed, a first cell and a second cell composed of one of a dark color cell and a light color cell and the other, and a data recording area where recording data is indicated by a combination of the arrangements of the first cell and the second cell. A two-dimensional code generation and decoding system that generates a two-dimensional code provided with the above by a two-dimensional code generation device and decodes the generated two-dimensional code by a two-dimensional code decoding device. The two-dimensional code generation device includes a first replacement processing unit that sets a specific one of the three primary colors as a first gradation value for the first cell in the data recording area and sets the remaining two primary colors as random gradation values, and a second replacement processing unit that sets a specific one of the three primary colors as a random gradation value in a range away from the first gradation value for the second cell in the data recording area and sets the remaining two primary color signals as random gradation values. A two-dimensional code output unit that arranges the first cell with the gradation values of the three primary colors set by the first replacement processing unit and the second cell with the gradation values of the three primary colors set by the second replacement processing unit in the data recording area to obtain a two-dimensional code for display or printing. The two-dimensional code decoding device includes a regeneration processing unit that discriminates a cell in which the intensity of a specific one of the three primary color components in an image obtained by photographing the two-dimensional code is greater than or equal to a threshold value, less than the threshold value, or within a predetermined range as the first cell, and discriminates a cell that does not meet the conditions of the first cell as the second cell, and regenerates the two-dimensional code, and a decoding processing unit that decodes the recording data included in the two-dimensional code regenerated by the regeneration processing unit.

[0013] In addition, the two-dimensional code generation and decoding method of the present invention prepares a specific pattern area where a specific pattern of a predetermined shape is arranged, and first cells and second cells composed of one of a dark color cell and a light color cell and the other as cells serving as units to be displayed, and provides a data recording area where recording data is indicated by a combination of the arrangements of the first cells and the second cells, and generates a two-dimensional code, and is a two-dimensional code generation and decoding method for decoding the generated two-dimensional code. As the two-dimensional code generation process, a first replacement process in which a first cell in the data recording area has a specific one of the three primary colors as a first gradation value and the remaining two primary colors as random gradation values, and a second replacement process in which a second cell in the data recording area has a random gradation value in a range away from the first gradation value of a specific one of the primary colors and the remaining two primary color signals as random gradation values, and a first cell in which the gradation values of the three primary colors are set by the first replacement process and a second cell in which the gradation values of the three primary colors are set by the second replacement process are arranged in the data recording area to obtain a two-dimensional code for display or printing, including a two-dimensional code output process. As the two-dimensional code decoding process, from an image obtained by photographing the two-dimensional code, cells in which the intensity of a specific one of the three primary color components is greater than or equal to a threshold value, less than the threshold value, or within a predetermined range are determined as first cells, and cells that do not meet the conditions of the first cells are determined as second cells, including a regeneration process for regenerating the two-dimensional code, and a decoding process for decoding the recording data included in the two-dimensional code regenerated by the regeneration process.

Advantages of the Invention

[0014] According to the present invention, even if a two-dimensional code that has been displayed or printed is directly read by a conventional two-dimensional code reader, the recording data cannot be decoded, and only a reader that performs corresponding processing can correctly decode the recording data. Therefore, it has the effect of enabling appropriate security measures for two-dimensional codes.

Brief Description of the Drawings

[0015]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Embodiments for Carrying Out the Invention

[0016] Hereinafter, an exemplary embodiment (hereinafter referred to as "this example") of a two-dimensional code, a two-dimensional code generation device, a two-dimensional code generation method, a two-dimensional code decoding device, a two-dimensional code decoding method, a two-dimensional code generation and decoding system, and a two-dimensional code generation and decoding method of the present invention will be described with reference to the accompanying drawings.

[0017] FIG. 1 shows the schematic configuration of the two-dimensional code generation and decoding system of this example. In the two-dimensional code generation and decoding system of this example, a two-dimensional code 12 is displayed on the display unit 11 of a smartphone 10 which is a two-dimensional code generation device. Here, using the smartphone 10 as the two-dimensional code generation device is just an example, and other devices may be used. Also, the devices that perform the generation and display (or printing described later) of the two-dimensional code do not have to be the same. The displayed two-dimensional code 12 is read by the camera 40, and the data recorded in the two-dimensional code 12 is decoded by the computer terminal 30 connected to the camera 40. Then, the decoded data, codes, etc. are displayed on the display unit 31. That is, the computer terminal 30 functions as a two-dimensional code decoding device. Note that the separation of the camera 40 and the computer terminal 30 is just an example, and a two-dimensional code decoding device such as the computer terminal 30 may incorporate a camera. The computer terminal 30 communicates with the server 50 via, for example, the network NW, and accesses the server 50 based on the data obtained by decoding the two-dimensional code.

[0018] Displaying the two-dimensional code 12 on the display unit 11 of the smartphone 10 is just an example. For example, a two-dimensional code 21 printed on a physical medium such as paper 20 by a printer connected to a two-dimensional code generating device (not shown) may be read by the camera 40.

[0019] The two-dimensional code 12 displayed on the smartphone 10 and the two-dimensional code 21 printed on the paper 20 are obtained by converting a two-dimensional code called a QR code (registered trademark) based on a predetermined rule. Therefore, even if these two-dimensional codes 12, 21 are read by a normal two-dimensional code decoding device, they cannot be decoded.

[0020] The camera 40 used in the system of this example is, for example, a hyperspectral camera that performs spectral analysis. However, using a hyperspectral camera is just an example, and cameras with other configurations may also be used.

[0021] Figure 2 shows a configuration example of the computer terminal 30 and the camera 40. The computer terminal 30 includes a CPU (Central Processing Unit), a central processing unit 32, a memory 33, a storage 34, an input unit 35, and a communication unit 36. The computer terminal 30 also includes the display unit 31 shown in FIG. 1. The computer terminal 30 including the display unit 31 is just an example.

[0022] The CPU 32 is an arithmetic processing unit that reads the program code of software that realizes the functions performed by the computer terminal 30 from the storage 34 and causes the memory 33 to execute it. When the CPU 32 reads the program code from the storage 34 and executes arithmetic processing in the memory 33, various processing function units are configured in the memory 33. For example, in the memory 33, a processing unit for regenerating a two-dimensional code described later and a processing unit for discriminating a two-dimensional code are configured.

[0023] The storage 34 stores program data and also stores data necessary for regenerating and discriminating two-dimensional codes. The input unit 35 performs input processing of image data from the camera 40. In addition, the input unit 35 performs input processing based on operations with a keyboard or the like connected to the computer terminal 30. The communication unit 36 communicates with the server 50 or the like. The display unit 31 displays the processing results and the like on the computer terminal 30.

[0024] The camera 40 shown in FIG. 2 is an example when configured as a hyperspectral camera. The camera 40 includes an imaging unit 41, a spectral analysis unit 42, and an analysis image output unit 43. The imaging unit 41 converts the image light imaged on the imager via a lens (not shown) into an imaging signal and outputs the imaging signal. The spectral analysis unit 42 performs spectral analysis (wavelength analysis) on the imaging signal and outputs the intensity of each wavelength included in the imaging signal. The analysis image output unit 43 outputs an analysis image based on the analysis result obtained by the spectral analysis unit 42. The analysis image output by the analysis image output unit 43 is supplied to the input unit 35 of the computer terminal 30.

[0025] Note that the camera 40 may include a light emitting unit 44 and illuminate a subject (here, a two-dimensional code) with light of a specific wavelength. When performing light emission processing with this light emitting unit 44, spectral analysis within the camera 40 is unnecessary. That is, when the light emitting unit 44 is provided, a camera that outputs a normal imaging signal can be used as the camera 40.

[0026] When an image signal is supplied from the camera 40 to the input unit 35 of the computer terminal 30, the CPU 32 performs discrimination processing of the two-dimensional code from the captured image, regeneration processing of the discriminated two-dimensional code, and discrimination processing of the regenerated two-dimensional code.

[0027] FIG. 3 is a flowchart showing the two-dimensional code generation process and decoding process (Example 1) performed by the system of this example. This example in FIG. 3 shows the flow when the display unit 11 of the smartphone 10 shown in FIG. 1 displays the two-dimensional code 12. First, the smartphone 10 generates an original two-dimensional code (step S11). The two-dimensional code generated here is a so-called QR code and is a black-and-white image.

[0028] Next, the smartphone 10 performs replacement processing on the two-dimensional code generated in step S11 (step S12). Although the details of this replacement processing will be described later, the replaced two-dimensional code is a color image. The two-dimensional code (replacement image) on which the replacement processing has been performed in step S12 is displayed on the display unit 11 (step S13). Up to here is the processing as a two-dimensional code generation device. Then, the camera 40 composed of a hyperspectral camera (HSC) captures the replacement image of the two-dimensional code displayed on the smartphone 10 (step S14). The analyzed image of the spectrum captured by this HSC is sent to the computer terminal 30.

[0029] Next, the computer terminal 30 performs regeneration processing of the two-dimensional code from the analyzed image of the spectrum (step S15). Thereby, the two-dimensional code before obtaining the replacement image is regenerated. Then, the computer terminal 30 performs discrimination processing on the two-dimensional code regenerated in step S15 (step S16). Note that during this discrimination processing, the computer terminal 30 performs error correction processing defined by the two-dimensional code standard to discriminate the correct two-dimensional code.

[0030] FIG. 4 is a flowchart showing the two-dimensional code generation processing and decoding processing (Example 2) performed in the system of this example. The example of FIG. 4 shows the flow when reading the two-dimensional code 21 printed on a physical medium such as the paper 20 shown in FIG. 1. First, a two-dimensional code generation device (not shown) generates a two-dimensional code (QR code) of a black-and-white image to be used as a basis (step S21). Next, the two-dimensional code generation device performs replacement processing to replace the two-dimensional code generated in step S21 with a color image (step S22). The two-dimensional code (replacement image) for which the replacement processing has been performed in step S22 is printed on paper (physical medium) 20 (step S23).

[0031] Then, the camera 40 equipped with the light emitting unit 44 captures an image of the replacement image of the two-dimensional code printed on the physical medium (step S24), and the computer terminal 30 acquires the captured image. Next, the computer terminal 30 performs discrimination processing on the two-dimensional code from the captured image (step S25). Also during this discrimination processing, the computer terminal 30 performs error correction processing defined by the two-dimensional code standard to discriminate the correct two-dimensional code.

[0032] FIG. 5 shows an example of the two-dimensional code used in the system of this example and the replacement processing of the two-dimensional code. The two-dimensional code shown in FIG. 5 is a so-called QR code, and a specific pattern area and a data recording area are provided. In the example of FIG. 5, the specific pattern area is a square pattern arranged at the upper right, upper left, and lower left corners. The area other than these three square patterns is the data recording area.

[0033] In the data recording area C1, cells (tiny square areas) that serve as display units are prepared, and recording data is indicated by a combination of cells C1-B in the black portion and cells C1-W in the white portion. This is the original configuration of the two-dimensional code (QR code) up to this point. Note that showing the two-dimensional code in black and white is just an example, and the black cells of the two-dimensional code may be dark colors other than black, and the white cells may be light colors other than white. The black cells are referred to as dark-colored cells, and the white cells are referred to as light-colored cells.

[0034] And in this example, when displaying or printing the two-dimensional code, color substitution processing is performed for each of the colors of cells C1-B in the black portion (dark-colored system) and cells C1-W in the white portion (light-colored system). That is, for cells C1-B in the black portion (dark-colored system), red (R) and blue (B) among the three primary colors of red, green, and blue (RGB) are set as random gradation values for each cell, and green (G) is set as a specific gradation value (first substitution processing). For example, when the gradation values of each color of red, green, and blue (RGB) are represented in 256 gradations from 0 to 255, green (G) is set as the gradation value 200. Red (R) and blue (B) are randomly set within the range of gradation values from 0 to 255 for each cell.

[0035] For cells C1-W in the white portion (light-colored system), each primary color of red, green, and blue (RGB) is set as a random gradation value for each cell. However, for green (G), it is set as a random gradation value within a range sufficiently separated from the specific gradation value set for cells C1-B in the black portion (dark-colored system) (first substitution processing). Here, the range sufficiently separated from the specific gradation value is, for example, a random gradation value within a range sufficiently separated from the specific gradation value on the lower side. Or, a random gradation value within a range sufficiently separated from the specific gradation value on the higher side. Or, a random gradation value within both the range sufficiently separated from the specific gradation value on the lower side and the range sufficiently separated from the specific gradation value on the higher side. For example, if the gradation value of each of red, green, and blue (RGB) is 256 gradations, and when the green (G) of cell C1-B in the black part (dark color system) is set to a gradation value of 200, the green (G) of cell C1-W in the white part (light color system) is randomly set for each cell within the range of gradation values of, for example, 0 to 150. The red (R) and blue (B) of cell C1-W in the white part (light color system) are randomly set for each cell within the range of gradation values from 0 to 255.

[0036] To perform this first replacement process and second replacement process, the two-dimensional code generation device (smartphone 10 in FIG. 1) includes a first replacement processing unit that performs the first replacement process and a second replacement processing unit that performs the second replacement process. Then, the replacement image (two-dimensional code) replaced by the first replacement processing unit and the second replacement processing unit is displayed, for example, on the display unit 11 of the smartphone 10. In the case of the smartphone 10, the display unit 11 functions as a two-dimensional code output unit. Also, when printing on paper or the like, the printer functions as a two-dimensional code output unit.

[0037] Note that it is generally preferable not to perform the first replacement process and the second replacement process on the specific pattern area arranged at the corner of the two-dimensional code. However, it is also possible to perform the first replacement process and the second replacement process including the special pattern area. Also, the image obtained by spectral analysis of the image captured by the camera 40 is an image obtained by spectral analysis of the intensity of green. Alternatively, when the camera 40 includes a light emitting unit 44, the light emitting unit 44 is configured to emit green light. Note that the point of spectral analysis of the intensity of green or the point that the light emitting unit 44 emits green light is an example, and a configuration that analyzes or emits light of other wavelengths may also be used.

[0038] FIG. 6 shows an example of a two-dimensional code before replacement, a two-dimensional code after replacement, and a two-dimensional code recreated from a photographed image of the replacement image. The two-dimensional code C11 shown at the left end of FIG. 6 is a two-dimensional code before replacement and is a black and white image. By performing the replacement process on this two-dimensional code C11 as described in FIG. 5, a replacement image C12 shown in the center of FIG. 6 can be obtained. The replacement image C12 is a two-dimensional code 12 displayed on the display unit 11 of the smartphone 10 shown in FIG. 1 or a two-dimensional code 21 printed on a physical medium such as paper 20. This replacement image C12 is shown as a black-and-white image in FIG. 6, but actually this replacement image C12 is a color image, and each color is set for each cell under the conditions described in FIG. 5.

[0039] The replacement image C12 is photographed by the camera 40, and the computer terminal 30 performs a process of recreating the two-dimensional code. At this time, the camera 40 performs spectral analysis on the intensity of green, and the computer terminal 30 determines whether the intensity of green in each cell is a specific gradation value (the gradation value 200 described above) or a gradation value lower than that (a gradation value of 150 or less). The gradation value for making this determination is an example. Then, the computer terminal 30 discriminates between cells C1-B in the black portion (dark color system) and cells C1-W in the white portion (light color system).

[0040] That is, the computer terminal 30 includes a regeneration processing unit that recreates the two-dimensional code, sets a threshold value (for example, a threshold value corresponding to a gradation value of 175) for distinguishing between the gradation value 200 and the gradation value of 150 or less, and determines whether it is above or below the threshold value. However, distinguishing between the gradation value 200 and the gradation value of 150 or less, that is, distinguishing between a specific gradation value and a gradation value in a range sufficiently lower than that is an example. For example, a specific gradation value and a gradation value in a range sufficiently higher than that may be distinguished. Alternatively, a specific gradation value and gradation values in ranges sufficiently above and below it may be distinguished. Thereby, the computer terminal 30 obtains the recreated two-dimensional code C13. The recreated two-dimensional code C13 is subjected to the same decoding process as when decoding a two-dimensional code that has not been subjected to the replacement process by the decoding processing unit in the computer terminal 30, and the recorded data is decoded.

[0041] Note that obtaining the two-dimensional code C13 that is recreated through spectral analysis by the camera 40 is an example of the case where the display unit 11 of the smartphone 10 displays the two-dimensional code 12. When photographing the two-dimensional code 21 printed on a physical medium such as paper 20 with the camera 40, the light emitting unit 44 emits green light to illuminate the two-dimensional code 21.

[0042] As a result, the luminance value of each cell obtained in the photographed image corresponds to the green gradation value of each cell of the two-dimensional code 21. Therefore, the computer terminal 30 can determine from the luminance value of each cell of the photographed image whether the green intensity is a specific gradation value (the above-mentioned gradation value 200) or a gradation value lower than that (gradation value 150 or less). Thus, it becomes possible to distinguish the cell C1-B of the black part (dark color system) from the cell C1-W of the white part (light color system). Distinguishing between the green gradation value 200 and the gradation value 150 or less (distinguishing with a specific green gradation value and a gradation value in a range sufficiently separated from it) is an example, and it may be applied to other colors, and may also be distinguished with a specific gradation value and a gradation value above or below it, or in a range sufficiently separated above and below it. As a result, also in the case of the two-dimensional code 21 printed on a physical medium such as paper 20, the computer terminal 30 can obtain the recreated two-dimensional code C13.

[0043] Note that the two-dimensional code C13 obtained from the replacement image C12 has some differences compared to the original two-dimensional code C11. However, when reading a two-dimensional code such as a QR code, error correction processing is performed, so the computer terminal 30 can extract correct recorded data from the two-dimensional code C13 as shown in FIG. 6.

[0044] As described above, by using the two-dimensional code (replacement image) created in this example, even if the displayed two-dimensional code is peeked at or the two-dimensional code printed on a physical medium is lost, the recorded data cannot be read immediately. Therefore, security can be appropriately ensured.

[0045] In addition, the replacement image replaces a general two-dimensional code and is recreated as a general two-dimensional code by the decoding device. Therefore, its usability as a two-dimensional code is the same as that of the conventional two-dimensional code, and there is no reduction in convenience due to improved security.

[0046] For example, it becomes possible to deliver various information such as advertisements only to users who possess a terminal capable of decoding the two-dimensional code (replacement image) in this example. In the example of FIG. 1, the two-dimensional code decoding device is a computer terminal 30 connected to a camera 40, but the two-dimensional code decoding device may be a mobile terminal such as a smartphone. In the case of a smartphone, although the built-in camera cannot perform high-precision spectral analysis like a hyperspectral camera, for example, it is applicable by extracting the green component from the captured image through filter processing and discriminating the intensity.

[0047] By the way, when the display unit 11 of the smartphone 10 color-displays the two-dimensional code (replacement image), there are variations in the display intensity of each color depending on the model of the smartphone 10. FIG. 7 shows an example of the spectral distribution of the display images on the respective models M1, M2, and M3 when three types of models M1, M2, and M3 with different manufacturers are prepared and the same two-dimensional code (replacement image) is displayed on each display unit.

[0048] As shown in FIG. 7, at wavelengths near 600 [nm] corresponding to red, the intensity of model M1 is the strongest, and the intensities of model M2 and model M3 gradually weaken in that order. Therefore, for example, when distinguishing black cells and white cells by the gradation value of red cells, when the computer terminal 30, which is a two-dimensional code decoding device, captures and reads the two-dimensional code (replacement image) displayed on these models M1, M2, and M3, it is important to correctly discriminate a spectrum having a specific relative intensity at a specific wavelength near 600 [nm] corresponding to the model.

[0049] Specifically, for example, when distinguishing black cells from white cells based on the gradation values of red cells and then photographing and reading the two-dimensional code (replacement image) displayed on model M1, the computer terminal 30 may prepare a filter Fa with the characteristic of being able to distinguish the peak near 600 [nm] corresponding to the red color of this model M1, and set a threshold for cell discrimination using this filter Fa with such characteristics. In the cases of other models M2 and M3, prepare filters with different characteristics and change the threshold values. Changing the threshold by the filter can be achieved, for example, by displaying a selection screen for the model that displays the two-dimensional code (replacement image) on the display unit 31 of the computer terminal 30 and allowing the operator to select from the selection screen.

[0050] Also, in the process of obtaining the replacement image from the two-dimensional code shown in FIG. 5, green (G) was set as a specific gradation value (value 200), and other colors were set randomly. However, setting green (G) as a specific gradation value (value 200) is just an example, and other colors other than green (G) may be set as a specific gradation value (for example, value 200). For example, as black cells, red (R) may be set as a specific gradation value (for example, value 200), and green and blue may be set randomly. Alternatively, as black cells, blue (B) may be set as a specific gradation value (for example, value 200), and red and green may be set randomly. In setting a specific gradation value and a gradation in a range sufficiently far from it, taking values 200 and 150 or less as an example, where the specific gradation value and a range sufficiently far below it are used, is also an example. It is also possible to have a specific gradation value and a range sufficiently far above it, such as value 50 and values 100 or more, or a specific gradation value and ranges sufficiently far above and below it, such as value 100 and values 50 or less and 150 or more. When set as value 100 and values 50 or less and 150 or more, the two-dimensional code decoding device will perform a process of identifying cells within a specific range near value 100 as black cells (the first cells) and cells that do not meet that condition as white cells (the second cells).

[0051] Also, taking the specific color of black (dark color system) cells as a specific gradation value is also an example, and the specific process for white (light color system) cells may also be set as a specific gradation value. Furthermore, the tone value 200 set among the 256 tones is just an example, and other tone values may also be used.

[0052] Also, in the above-described embodiment example, in the two-dimensional code generation device, as the black (dark color system) cell, green (G) is set as a specific tone value (value 200), and in the two-dimensional code decoding device, the two-dimensional code is discriminated from the two-dimensional code (replacement image) under that condition. In contrast, in the two-dimensional code generation device, the color for a specific tone or the tone value when setting a specific tone value can be variably set, and the condition is transmitted to the two-dimensional code decoding device. The two-dimensional code decoding device may discriminate the two-dimensional code according to the transmitted condition. Only the color for a specific tone may be changed and only the information of that color may be transmitted. Conversely, the tone value when setting a specific tone value may be variably set and only the information of that tone value may be transmitted. Thereby, the decoding of the two-dimensional code becomes possible only on the terminal to which the correct condition is transmitted, and the security is further improved.

Explanation of Reference Numerals

[0053] 10... smartphone, 11... display unit, 12... replacement image, 12... two-dimensional code (replacement image), 20... paper (physical medium), 21... two-dimensional code, 30... computer terminal, 31... display unit, 32... CPU, 33... memory, 34... storage, 35... input unit, 36... communication unit, 40... camera, 41... imaging unit, 42... spectral analysis unit, 43... analysis image output unit, 44... light emitting unit, 50... server, C1... data recording area

Claims

1. A specific pattern area where a specific pattern of a predetermined shape is arranged, and a data recording area where dark-colored cells and light-colored cells are prepared as cells serving as units to be displayed, and recording data is shown by a combination of the arrangements of the dark-colored cells and the light-colored cells. It is a two-dimensional code provided with either the dark-colored cells or the light-colored cells in the data recording area have a specific one of the three primary colors as a first gradation value, and the remaining two primary colors as random gradation values, and the other of the dark-colored cells and the light-colored cells in the data recording area has the specific one of the primary colors as a random gradation value in a range away from the first gradation value, and the remaining two primary color signals as random gradation values two-dimensional code.

2. A specific pattern area where a specific pattern of a predetermined shape is arranged, and a two-dimensional code generation device that generates a two-dimensional code provided with a data recording area where dark-colored cells and light-colored cells are prepared as cells serving as units to be displayed, and recording data is shown by a combination of the arrangements of the dark-colored cells and the light-colored cells, a first replacement processing unit that sets either the dark-colored cells or the light-colored cells in the data recording area to have a specific one of the three primary colors as a first gradation value and the remaining two primary colors as random gradation values, a second replacement processing unit that sets the other of the dark-colored cells and the light-colored cells in the data recording area to have the specific one of the primary colors as a random gradation value in a range away from the first gradation value and the remaining two primary color signals as random gradation values, a two-dimensional code output unit that arranges the cells in which the gradation values of the three primary colors are set by the first replacement processing unit and the cells in which the gradation values of the three primary colors are set by the second replacement processing unit in the data recording area to obtain a two-dimensional code for display or printing, two-dimensional code generation device.

3. A specific pattern area where a specific pattern of a predetermined shape is arranged, and a two-dimensional code generation method for generating a two-dimensional code provided with a data recording area where dark-colored cells and light-colored cells are prepared as cells serving as units to be displayed, and recording data is shown by a combination of the arrangements of the dark-colored cells and the light-colored cells, a first replacement process of setting either the dark-colored cells or the light-colored cells in the data recording area to have a specific one of the three primary colors as a first gradation value and the remaining two primary colors as random gradation values, Performing a second replacement process of setting either the dark color cells or the light color cells in the data recording area to random gradation values within a range away from the first gradation value for the specific one primary color, and setting the remaining two primary color signals to random gradation values, A two-dimensional code output process of arranging cells with gradation values of three primary colors set in the first replacement process and cells with gradation values of three primary colors set in the second replacement process in the data recording area to obtain a two-dimensional code for display or printing, Two-dimensional code generation method.

4. A specific pattern area where a specific pattern of a predetermined shape is arranged, A two-dimensional code decoding device that prepares a first cell and a second cell composed of one of a dark color cell and a light color cell and the other as cells serving as units for display, and has a data recording area in which recording data is indicated by a combination of the arrangements of the first cell and the second cell, A regeneration processing unit that discriminates cells in an image obtained by photographing the two-dimensional code, where the intensity of a specific one primary color component among the three primary colors is less than a threshold value or within a predetermined range, as the first cells, and discriminates cells that do not meet the conditions of the first cells as the second cells, and regenerates the two-dimensional code, A decoding processing unit that decodes the recording data included in the two-dimensional code regenerated by the regeneration processing unit, Two-dimensional code decoding device.

5. The regeneration processing unit discriminates the intensity of the specific one primary color component from the result of spectral analysis of the image obtained by photographing the two-dimensional code. The two-dimensional code decoding device according to claim 4.

6. The two-dimensional code is one displayed on the display unit of the terminal, The threshold value is variably set according to the model of the terminal. The two-dimensional code decoding device according to claim 5.

7. The image obtained by photographing the two-dimensional code is an image photographed under illumination with light of the specific one primary color. The two-dimensional code decoding device according to claim 4.

8. A specific pattern area where a specific pattern of a predetermined shape is arranged, A two-dimensional code decoding method for decoding a two-dimensional code provided with a data recording area in which recording data is indicated by a combination of the arrangements of a first cell and a second cell composed of one of a dark color cell and a light color cell and the other as cells serving as units for display, From the image obtained by photographing the two-dimensional code, cells in which the intensity of a specific one of the three primary colors is less than a threshold value or within a predetermined range are determined as first cells, and cells that do not meet the conditions of the first cells are determined as second cells, and a regeneration process for regenerating the two-dimensional code is performed. A decoding processing unit that decodes the recording data included in the two-dimensional code regenerated by the regeneration process. Two-dimensional code decoding method.

9. A specific pattern area where a specific pattern of a predetermined shape is arranged. As cells that are units to be displayed, a first cell and a second cell composed of one of a dark color cell and a light color cell and the other are prepared, and a data recording area in which recording data is indicated by a combination of the arrangements of the first cell and the second cell is provided. A two-dimensional code generation and decoding system that generates a two-dimensional code with a two-dimensional code generation device and decodes the generated two-dimensional code with a two-dimensional code decoding device. The two-dimensional code generation device A first replacement processing unit that sets the first cell in the data recording area to have a specific one of the three primary colors as a first gradation value and the remaining two primary colors as random gradation values. A second replacement processing unit that sets the second cell in the data recording area to have a random gradation value for the specific one of the primary colors in a range away from the first gradation value and random gradation values for the remaining two primary color signals. A two-dimensional code output unit that arranges the first cell in which the gradation values of the three primary colors are set by the first replacement processing unit and the second cell in which the gradation values of the three primary colors are set by the second replacement processing unit in the data recording area to obtain a two-dimensional code for display or printing. The two-dimensional code decoding device From the image obtained by photographing the two-dimensional code, cells in which the intensity of a specific one of the three primary colors is greater than or equal to a threshold value, less than the threshold value, or within a predetermined range are determined as first cells, and cells that do not meet the conditions of the first cells are determined as second cells, and a regeneration process for regenerating the two-dimensional code is performed. A decoding processing unit that decodes the recording data included in the two-dimensional code regenerated by the regeneration processing unit. Two-dimensional code generation and decoding system.

10. Transmit at least one of the information of a specific one of the primary colors processed by the first replacement processing unit of the two-dimensional code generation device and the information of the first gradation value to the two-dimensional code decoding device. Based on the transmitted information, the two-dimensional code decoding device sets at least one of a specific primary color and the threshold value when performing the regeneration process. The two-dimensional code generation and decoding system according to claim 9.

11. A specific pattern area where a specific pattern of a predetermined shape is arranged, and As cells serving as units to be displayed, a first cell and a second cell composed of one of a dark color cell and a light color cell and the other are prepared, and a data recording area in which recording data is indicated by a combination of the arrangements of the first cell and the second cell is provided. A two-dimensional code generation and decoding method that performs a two-dimensional code generation process for generating a two-dimensional code and a two-dimensional code decoding process for decoding the generated two-dimensional code, As the two-dimensional code generation process, A first replacement process in which the first cell in the data recording area has a specific one of the three primary colors as a first gradation value and the remaining two primary colors as random gradation values, A second replacement process in which the second cell in the data recording area has the specific one of the primary colors as a random gradation value in a range away from the first gradation value and the remaining two primary color signals as random gradation values, Including a two-dimensional code output process of arranging the first cell whose gradation values of the three primary colors are set in the first replacement process and the second cell whose gradation values of the three primary colors are set in the second replacement process in the data recording area to obtain a two-dimensional code for display or printing, As the two-dimensional code decoding process, From the image of the captured two-dimensional code, a cell in which the intensity of a specific one of the three primary color components is less than a threshold value or within a predetermined range is determined as a first cell, and a cell that does not meet the conditions of the first cell is determined as a second cell, and a regeneration process for regenerating the two-dimensional code, Including a decoding process for decoding the recording data included in the two-dimensional code regenerated in the regeneration process. Two-dimensional code generation and decoding method.

Citation Information

Patent Citations

  • Information terminal and information terminal system

    JP2015121662A