WO2020156552A1 - Two-dimensional code generation and recognition methods and devices - Google Patents

Two-dimensional code generation and recognition methods and devices Download PDF

Info

Publication number
WO2020156552A1
WO2020156552A1 PCT/CN2020/074167 CN2020074167W WO2020156552A1 WO 2020156552 A1 WO2020156552 A1 WO 2020156552A1 CN 2020074167 W CN2020074167 W CN 2020074167W WO 2020156552 A1 WO2020156552 A1 WO 2020156552A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimensional code
image
fused
code
preset
Prior art date
Application number
PCT/CN2020/074167
Other languages
French (fr)
Chinese (zh)
Inventor
陈兴
金亮
潘磊
Original Assignee
北京嘀嘀无限科技发展有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京嘀嘀无限科技发展有限公司 filed Critical 北京嘀嘀无限科技发展有限公司
Publication of WO2020156552A1 publication Critical patent/WO2020156552A1/en

Links

Images

Classifications

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

Definitions

  • This application relates to the technical field of digital image recognition, and specifically to a method and device for generating and recognizing a two-dimensional code.
  • QR codes have become a convenient carrier for information dissemination, and the integration of QR codes is getting higher and higher. Users can scan the QR codes to obtain relevant product information or link to relevant web pages to browse more information.
  • a visual icon is often inserted in the center of the two-dimensional code to increase the visual effect and achieve personalization.
  • the purpose of the embodiments of the present application is to provide a QR code generation method, recognition method, generation device, recognition device, electronic equipment, and readable storage medium, so as to solve the problem of inserting a visual icon on the QR code. It will lead to the problem of less information carried by the QR code, and reduced fault tolerance of the QR code.
  • the first aspect of the application provides a method for generating a two-dimensional code, which may include: adding a two-dimensional code to be fused to a preset image to obtain a two-dimensional code image. According to the preset fusion rules, the two-dimensional code image and/or the two-dimensional code to be generated, the target two-dimensional code is generated.
  • adding a QR code to be fused to the preset image to obtain a QR code image includes: adjusting the pixel color of the QR code to be fused, obtaining the adjusted QR code to be fused; The two-dimensional code to be fused is superimposed with the preset image to obtain the two-dimensional code image.
  • superimposing the adjusted two-dimensional code to be fused with the preset image to obtain the two-dimensional code image includes: using the adjusted two-dimensional code to be fused as a coating of the preset image to obtain the two-dimensional code image , Wherein the color of each pixel in the coating is matched with the color of the pixel at the corresponding position of the original coating of the preset image according to the preset coating rule.
  • adding the two-dimensional code to be fused to the preset image, before acquiring the two-dimensional code image further includes: obtaining the two-dimensional code to be generated according to the original two-dimensional code and extracting the two-dimensional code to be fused, wherein The two-dimensional code includes a region to be fused with a preset shape.
  • generating the target two-dimensional code according to preset fusion rules, the two-dimensional code image and/or the two-dimensional code to be generated includes: converting the two-dimensional code image into a shape matching the area to be fused to obtain the target two-dimensional code Code image.
  • the target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
  • the second aspect of the present application provides a method for recognizing a two-dimensional code, including: acquiring an image to be recognized, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is based on preset fusion rules, two-dimensional code images and/or waiting Generate a two-dimensional code generation, where the two-dimensional code image is obtained by fusion of the preset image and the two-dimensional code to be fused.
  • the two-dimensional code recognition algorithm is used to identify the two-dimensional code to be fused and the two-dimensional code to be generated respectively, and the identification information of the image to be recognized is recognized.
  • the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified.
  • the two-dimensional code recognition algorithm respectively identify the two-dimensional code to be fused and the two-dimensional code to be generated, before obtaining the two-dimensional code information of the target two-dimensional code, it also includes: recognizing and obtaining the target two-dimensional code and the candidate in the image to be recognized Identify the logo.
  • using a two-dimensional code recognition algorithm to separately identify the two-dimensional code to be fused and the two-dimensional code to be generated, and to identify and obtain the identification information of the image to be recognized including: using a two-dimensional code recognition algorithm to respectively identify the two-dimensional code to be fused And the two-dimensional code to be generated, identify and obtain the two-dimensional code information of the image to be recognized.
  • the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
  • the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
  • the third aspect of the present application provides a QR code generation device, including:
  • the acquiring module is configured to add a two-dimensional code to be fused on the preset image to obtain a two-dimensional code image.
  • the generating module is configured to generate the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated.
  • the acquisition module is specifically configured to use the adjusted QR code to be fused as a coating of the preset image to obtain the QR code image, wherein the color of each pixel in the coating is in accordance with the preset coating rule Match the color of the pixels at the corresponding position of the original coating of the preset image.
  • the acquisition module is specifically configured to use the two-dimensional code to be fused as a coating of the preset image to obtain the two-dimensional code image, wherein the color information of each pixel in the coating and the pixel at the corresponding position of the original coating match.
  • it further includes an extraction module configured to obtain the two-dimensional code to be generated according to the original two-dimensional code and extract the two-dimensional code to be fused, wherein the two-dimensional code to be generated includes a region to be fused with a preset shape.
  • the generating module is specifically configured to convert the two-dimensional code image into a shape matching the region to be fused to obtain the target two-dimensional code image.
  • the target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
  • the fourth aspect of the present application provides a two-dimensional code recognition device, including:
  • the acquisition module is configured to collect and acquire the image to be recognized, the image to be recognized includes a target QR code, and the target QR code is generated according to preset fusion rules, a QR code image, and/or a QR code to be generated, where the QR code image It is obtained by fusion of the preset image and the QR code to be fused.
  • the recognition module is configured to use a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the identification information of the image to be recognized.
  • the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified.
  • the recognition module is also configured to recognize and acquire the target two-dimensional code and the candidate recognition mark in the image to be recognized.
  • the recognition module is specifically configured to adopt a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the two-dimensional code information of the image to be recognized.
  • the two-dimensional code recognition algorithm is used to identify and obtain the two-dimensional code information of the image to be recognized, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
  • the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
  • the fifth aspect of the present application provides an electronic device, including a processor, a storage medium, and a bus.
  • the storage medium stores machine-readable instructions executable by the processor.
  • the processor and the storage medium pass through In bus communication, the processor executes machine-readable instructions to execute the steps of the two-dimensional code generation method provided in the first aspect or the two-dimensional code recognition method provided in the second aspect.
  • the sixth aspect of the present application provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is run by a processor, it executes the two-dimensional code generation method or the second method provided in the first aspect.
  • the two-dimensional code recognition method provided by the two aspects.
  • a QR code image by fusing the QR code to be fused on a preset image, and then generate the target two according to the preset fusion rule, the QR code image and/or the QR code to be generated QR code image, the target QR code image contains the information of the QR code to be fused and the QR code to be generated, which realizes the insertion of a preset image containing the QR code information in the target QR code, which can improve the load of the QR code Information and fault tolerance.
  • Fig. 1 shows a flowchart of a method for generating a QR code provided by an embodiment of the present application
  • FIG. 2 shows a flowchart of a method for generating a QR code according to another embodiment of the present application
  • FIG. 3 shows a flowchart of a method for generating a QR code according to another embodiment of the present application
  • FIG. 4 shows a flowchart of a method for generating a QR code according to another embodiment of the present application
  • FIG. 5 shows a flowchart of a two-dimensional code recognition method provided by an embodiment of the present application
  • FIG. 6 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application.
  • FIG. 7 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application.
  • FIG. 8 shows a schematic structural diagram of a two-dimensional code generating device provided by an embodiment of the present application.
  • FIG. 9 shows a schematic structural diagram of a two-dimensional code generating apparatus provided by another embodiment of the present application.
  • FIG. 10 shows a schematic structural diagram of a two-dimensional code recognition device provided by an embodiment of the present application.
  • FIG. 11 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • two-dimensional codes such as layered two-dimensional codes and/or matrix two-dimensional codes.
  • Typical layered two-dimensional codes include: portable data file 417 (Portable Data File, PDF417), code 49 (Code 49) and/or code 16K (Code 16K), etc.; typical matrix two-dimensional codes include: code one (Code One), Quick Response Code (Quick Response Code, QR Code), Data Matrix (Data Matrix) and/or Han Xin Code (Han Xin Code), etc.
  • QR Code is used as the type of two-dimensional code for description, but the type of two-dimensional code that can be applied to the two-dimensional code identification method provided in this application is not limited to this.
  • Fig. 1 shows a flowchart of a method for generating a two-dimensional code provided by an embodiment of the present application.
  • the execution subject of the method may be a terminal capable of generating a two-dimensional code, such as a mobile phone, a tablet computer, a desktop computer, and/or a wearable device, etc., which is not limited herein.
  • the two-dimensional code generation method includes:
  • the preset image may include icons, avatars, and/or designated pictures, etc., for example, the trademark icon in the QR code on Qingju Bike, the user's avatar in the WeChat QR code, etc., which are not limited here. .
  • the two-dimensional code to be fused may be part of the information of the two-dimensional code or a complete two-dimensional code. For example, take a partial cut out of the complete QR code as the QR code to be fused, or generate a QR code to be fused based on part of the information of the QR code and the QR code generation algorithm, or extract a specific QR code
  • the information as a two-dimensional code to be fused (for example, two-dimensional code version information and/or brand information, etc.), etc., is not limited here.
  • the two-dimensional code in the obtained two-dimensional code image includes a visible two-dimensional code or an invisible two-dimensional code.
  • the visible two-dimensional code refers to the two-dimensional code image that can display the pixels of the two-dimensional code to be fused.
  • the specific display method is not limited here.
  • the transparency may be low or the color matching the preset image is not obvious. It can be observed after zooming in to a certain degree or adjusting to a certain brightness.
  • the invisible two-dimensional code means that the two-dimensional code to be fused is hidden in the two-dimensional code image, that is, the two-dimensional code to be fused is not displayed, and it can be obtained only through the recognition of some algorithms.
  • S102 Generate the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated.
  • the recognition effect of the point distribution is better.
  • the recognition effect of the line distribution is better.
  • the two-dimensional code to be fused in the two-dimensional code image is the partial information in the two-dimensional code to be generated, and the two-dimensional code image to be generated is generated after the two-dimensional code to be fused into the preset image
  • the QR code to be fused is a layer of the preset image, but the color is very light and you need to zoom in to see some QR codes.
  • the original two-dimensional code is composed of black and white dots, and partial information is extracted as the two-dimensional code to be fused.
  • the original white part is transparent to display the content corresponding to the preset image, and the original black part is adjusted to a lighter color, such as adjusting It is light gray, milky white, or the same color as the corresponding pixel of the preset image but lighter, etc. There is no restriction here.
  • the two-dimensional code to be generated includes a blank area, and the two-dimensional code image can be added to the blank area according to a preset fusion rule to obtain the target two-dimensional code.
  • QR code image contains the information of the QR code to be fused and the QR code to be generated, which realizes the insertion of a preset image containing the QR code information in the target QR code, which can improve the load of the QR code Information and fault tolerance.
  • FIG. 2 shows a flowchart of a method for generating a two-dimensional code provided by another embodiment of the present application.
  • adding a QR code to be fused to the preset image to obtain a QR code image includes:
  • S101-1 Adjust the pixel color of the QR code to be fused, and obtain the adjusted QR code to be fused.
  • S101-2 Superimpose the adjusted QR code to be fused with the preset image to obtain a QR code image.
  • superimposing the adjusted QR code to be fused with a preset image to obtain a QR code image may include:
  • the value of the pixel corresponding to the black part of the QR code to be fused is increased by a preset value and the value of the pixel corresponding to the white part is decreased by the preset value, or the pixel corresponding to the white part The value of is increased or decreased by the preset value and the value of the pixel corresponding to the black part remains unchanged, and the adjusted QR code to be fused is obtained. Then, overlay the adjusted QR code to be fused with the preset image.
  • the value of the pixel point corresponding to the black part after adjustment is close to the value of the pixel point at the corresponding position in the original image of the preset image, for example, the difference is less than a preset threshold.
  • the transparency of the pixels corresponding to the white part can also be adjusted to highlight the color of the pixel at the corresponding position in the original image of the preset image, or the value of the pixel corresponding to the white part is adjusted to the value of the pixel at the corresponding position in the original image of the preset image.
  • Fig. 3 shows a flowchart of a method for generating a two-dimensional code provided by another embodiment of the present application.
  • adding a two-dimensional code to be fused on the preset image, and before acquiring the two-dimensional code image it also includes:
  • the two-dimensional code to be generated includes a region to be fused with a preset shape.
  • a part of the blank area is dug out of the original two-dimensional code, where the two-dimensional code information that originally occupied the blank area can be distributed to other reserved areas, so that the two-dimensional code information in the reserved area is more dense.
  • part or all of the two-dimensional code information is extracted from the original two-dimensional code information as the two-dimensional code to be fused.
  • a part of the two-dimensional code information that originally occupies the blank area can be selected to be distributed in the reserved area, and the other part is used as the two-dimensional code to be fused.
  • some important information can be used as a QR code to be fused.
  • the shape of the region to be merged in the two-dimensional code to be generated may be rectangular, circular, polygonal, and/or irregular graphics, etc., which is not limited here.
  • the cropped original two-dimensional code can be used as the two-dimensional code to be fused, or preset features, such as anchor points and anchor point separators, can be extracted based on the original two-dimensional codes , Correct features such as graphics, version information and/or error tolerance information, and use the extracted features as the data contained in the data area of the two-dimensional code to generate the to-be-fused two-dimensional code.
  • What information is included in the extracted QR code to be fused is not limited here, and can be adjusted according to different situations during application.
  • Fig. 4 shows a flowchart of a method for generating a two-dimensional code provided by another embodiment of the present application.
  • generating the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated includes:
  • S102-1 Convert the two-dimensional code image into a shape matching the area to be fused to obtain the target two-dimensional code image.
  • the two-dimensional code image has the same shape as the preset image, and the shape of the area to be fused is reserved according to the shape of the preset image, and only the size of the two-dimensional code image and the size of the area to be fused need to be matched.
  • the two-dimensional code image and the preset image are a 10*10 square image, and the area to be fused is a 5*5 square area, the two-dimensional code image needs to be adjusted to a 5*5 square image.
  • the shape of the two-dimensional code image is different from the shape of the area to be fused, it is necessary to adjust the shape of the two-dimensional code image according to the shape of the area to be fused, and then the size of the two-dimensional code image is The size of the fusion area matches.
  • the shape of the two-dimensional code image is a circle
  • the shape of the area to be fused is a square
  • the shape of the two-dimensional code image is adjusted to a square.
  • the adjustment method includes adding a square background to the two-dimensional code image and/or The code image is cropped into a square, etc., and there is no restriction here. Then, the size of the two-dimensional code map adjusted to a square shape and the size of the area to be fused are adjusted to match the size.
  • S102-2 Fuse the target two-dimensional code image to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
  • the two-dimensional code image adjusted in S102-1 is superimposed and fused into the area to be fused to generate the target two-dimensional code.
  • Fig. 5 shows a flowchart of a two-dimensional code recognition method provided by an embodiment of the present application.
  • the execution subject of this method may be a terminal with two-dimensional code scanning and/or recognition functions, such as a mobile phone, a tablet computer, and/or a wearable device, which is not limited here.
  • the present application also provides a two-dimensional code recognition method, including:
  • S201 Acquire an image to be recognized, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is generated according to a preset fusion rule, a two-dimensional code image, and/or a two-dimensional code to be generated.
  • the two-dimensional code image is obtained by fusion of the preset image and the two-dimensional code to be fused.
  • the target two-dimensional code is the target two-dimensional code generated by the above-mentioned two-dimensional code generation method, and the method for generating the two-dimensional code is not described here.
  • S202 Adopt a two-dimensional code recognition algorithm to respectively identify the two-dimensional code to be fused and the two-dimensional code to be generated, and identify and obtain identification information of the image to be recognized.
  • the range of the two-dimensional code to be fused can be obtained by A frame is set on the border of the QR code to be fused, and the range of the QR code to be fused is determined by the frame. For example, a border of a preset width is set on the border of the QR code to be fused, and the range enclosed by the border of the preset width is Is the range of the QR code to be fused.
  • the two-dimensional code to be fused is a square and set in the center of the two-dimensional code to be generated , And its side length is the preset length, the range of the two-dimensional code to be fused is a square frame with the center of the two-dimensional code to be generated as the center point and the side length of the preset length.
  • the terminal or the application program of the terminal is configured with a QR code recognition algorithm in advance.
  • the QR code recognition algorithm knows in advance the positional relationship between the QR code to be fused and the QR code to be generated. Determine the range of the two-dimensional code to be fused by identifying the frame or shape or other identification information of the two-dimensional code to be fused.
  • the two-dimensional code to be fused is a complete two-dimensional code
  • the two-dimensional code to be fused and the two-dimensional code to be generated need to be identified separately, and at the same time, according to the two-dimensional code to be fused and the two-dimensional code to be generated The recognition result of, obtain the information of the image to be recognized.
  • the two-dimensional code to be fused is an invisible two-dimensional code, it needs to be identified by a preset method.
  • the preset image and the two-dimensional code image are first subjected to grayscale processing, and then the preset Set the difference between the image and the two-dimensional code image to obtain the difference image, where the difference between the preset image and the two-dimensional code image is that the two-dimensional code image is added with the two-dimensional code to be fused, in the obtained difference image ,
  • the value of the unchanged pixel is 0 after subtraction, that is, black. After the changed pixel is subtracted, the value is not 0, not black.
  • the difference image is binarized according to the preset algorithm, and the binarized difference image is obtained.
  • the difference image after the binarization is recognized, and the same data as the two-dimensional code to be fused is obtained.
  • the preset algorithm for binarization can be the bimodal method, the P-parameter method and/or the iterative method and the Otsu (OTSU) method, etc., which are not limited here.
  • the two-dimensional code to be fused and the two-dimensional code to be generated are respectively identified.
  • the target QR code is the identification code of Qingju shared bicycle
  • the to-be-fused QR code and the icon image of Qingju shared bicycle are fused into a two-dimensional code image. If the to-be-fused two-dimensional code contains part of the information of the two-dimensional code, then Obtain the range of the QR code to be fused according to the preset identification information (the preset identification information includes: the frame of the QR code and/or the position information of the QR code to be fused in the QR code to be generated). If the two-dimensional code is a complete two-dimensional code, the range of the two-dimensional code to be fused can be obtained according to the positioning point of the two-dimensional code to be fused.
  • the two-dimensional code image is obtained, and the two-dimensional code image and the icon image of the green orange shared bicycle are gray-scaled, and the difference image between the two is calculated, and the difference image is calculated according to the preset algorithm Binarization is performed to obtain a difference image after binarization, and the difference image after binarization is the same as the two-dimensional code to be fused.
  • the same information as the two-dimensional code to be fused can be obtained by identifying the difference image after binarization.
  • the data in the to-be-fused two-dimensional code can be the verification information of the target two-dimensional code
  • the content of the to-be-generated two-dimensional code can be the number of the current shared bicycle, to be identified
  • the identification information of the image is the number of the shared bicycle that has passed the verification.
  • the specific content of the identification information of the image to be recognized is not limited here.
  • the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified.
  • Fig. 6 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application.
  • the two-dimensional code recognition algorithm is used to separately identify the two-dimensional code to be fused and the two-dimensional code to be generated. Before obtaining the two-dimensional code information of the target two-dimensional code, it also includes:
  • S203 Recognizing and acquiring the target two-dimensional code and the candidate identification mark in the image to be recognized.
  • the acquired image to be identified may include the target QR code and alternative identification marks.
  • the acquired image to be identified may include the two-dimensional code of the shared bicycle and the two-dimensional code printed on the two-dimensional The number of the shared bicycle around the code.
  • the range of the shared bicycle QR code is determined according to the positioning point in the shared bicycle’s QR code, and the image within the shared bicycle’s QR code is used as the target QR code, and the shared bicycle Images outside the range of the two-dimensional code (including the image of the shared bicycle number) are used as candidate identification marks, but not limited to this.
  • Fig. 7 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application.
  • the two-dimensional code recognition algorithm is used to separately identify the two-dimensional code to be fused and the two-dimensional code to be generated, and to identify and obtain the identification information of the image to be recognized, including:
  • S202-1 Using the two-dimensional code recognition algorithm, respectively identify the two-dimensional code to be fused and the two-dimensional code to be generated, and identify and obtain the two-dimensional code information of the image to be recognized.
  • the two-dimensional code to be fused and the two-dimensional code to be generated are respectively identified, and the method of identifying and acquiring the two-dimensional code information of the image to be identified is the same as that in S202, and will not be repeated here.
  • the two-dimensional code to be fused and the two-dimensional code to be generated cannot be identified, for example, the two-dimensional code to be fused and the two-dimensional code to be generated are scratched, partly lost and/or contaminated, etc. Then, the corresponding algorithm can be selected according to the above-mentioned candidate identification mark to identify and obtain the candidate identification mark.
  • the image outside the range of the two-dimensional code of the shared bicycle (including the image of the number of the shared bicycle) is used as the candidate identification identifier.
  • select the corresponding algorithm according to the candidate identification (number) that needs to be recognized such as the optical character recognition (Optical Character Recognition, OCR) algorithm, and identify the candidate identification information in the image outside the QR code of the shared bicycle through OCR , which is the number of the shared bicycle.
  • OCR Optical Character Recognition
  • the information of the candidate identification mark can also be recognized, and then the two information can be compared and verified to improve the accuracy of the recognition result Sex.
  • the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
  • the candidate identification when configured as an identification number, it can be a purely numeric string or a string of numbers and letters.
  • the candidate identification when the candidate identification is configured to identify a network address and/or link, it can be a number or letter. And/or a mixed character string.
  • the candidate identification can also be composed of one or a segment of non-letter languages such as Chinese characters, Japanese, Korean, and/or Arabic.
  • an algorithm that matches the corresponding language can be selected for identification. Get the information of the candidate identification.
  • FIG. 8 shows a schematic structural diagram of a two-dimensional code generating apparatus provided by an embodiment of the present application.
  • the present application provides a QR code generation device, including:
  • the obtaining module 301 is configured to add a two-dimensional code to be fused on a preset image to obtain a two-dimensional code image.
  • the generating module 302 is configured to generate the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated.
  • the acquiring module 301 is specifically configured to use the adjusted QR code to be fused as a coating of the preset image to obtain the QR code image, wherein the color of each pixel in the coating is in accordance with the preset coating The rule matches the color of the pixel at the corresponding position of the original coating of the preset image.
  • the acquiring module 301 is specifically configured to use the two-dimensional code to be fused as a coating of the preset image to acquire the two-dimensional code image, wherein the color of each pixel in the coating corresponds to the pixel of the original coating Information matches.
  • FIG. 9 shows a schematic structural diagram of a two-dimensional code generating apparatus provided by another embodiment of the present application.
  • an extraction module 303 is further included, configured to obtain the two-dimensional code to be generated according to the original two-dimensional code and extract the two-dimensional code to be fused, wherein the two-dimensional code to be generated includes a preset shape Fusion area.
  • the generating module 301 is specifically configured to convert the two-dimensional code image into a shape matching the region to be fused to obtain the target two-dimensional code image.
  • the target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
  • FIG. 10 shows a schematic structural diagram of a two-dimensional code recognition device provided by an embodiment of the present application.
  • this application also provides a two-dimensional code recognition device, including:
  • the acquiring module 401 is configured to collect and acquire an image to be recognized, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is generated according to a preset fusion rule, a two-dimensional code image, and/or a two-dimensional code to be generated, wherein the two-dimensional code The image is obtained by fusion of the preset image and the two-dimensional code to be fused.
  • the recognition module 402 is configured to use a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the identification information of the image to be recognized.
  • the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified.
  • the recognition module 402 is further configured to recognize and acquire the target two-dimensional code and the candidate recognition identifier in the image to be recognized.
  • the recognition module 402 is specifically configured to use a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the two-dimensional code information of the image to be recognized.
  • the two-dimensional code recognition algorithm is used to identify and obtain the two-dimensional code information of the image to be recognized, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
  • the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
  • the aforementioned modules may be connected or communicate with each other via a wired connection or a wireless connection.
  • Wired connections may include metal cables, optical cables, and/or hybrid cables, etc., or any combination thereof.
  • the wireless connection can include connections via local area network (LAN), wide area network (Wide Area Network, WAN), Bluetooth, ZigBee protocol (ZigBee) and/or near field communication (NFC), or Any combination of it.
  • LAN local area network
  • WAN Wide Area Network
  • Bluetooth ZigBee protocol
  • NFC near field communication
  • the specific working process of the device described above can refer to the corresponding process in the method embodiment, which will not be repeated in this application.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of modules is only a logical function division, and there may be other divisions in actual implementation.
  • multiple modules or components may be combined or integrated.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some communication interfaces, devices or modules, and may be in electrical, mechanical or other forms.
  • modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • FIG. 11 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • This application provides an electronic device, as shown in FIG. 11, comprising: a processor 501, a computer-readable storage medium 502, and a bus 503.
  • the computer-readable storage medium 502 stores machine-readable instructions executable by the processor 501, When the electronic device is running, the processor 501 and the computer-readable storage medium 502 communicate through the bus 503, and the processor 501 executes machine-readable instructions to execute the steps of the above-mentioned two-dimensional code generation method.
  • the processor 501 includes a central processing unit (Central Processing Unit, CPU), an Application Specific Integrated Circuit (ASIC), a dedicated instruction set processor (Application Specific Instruction-set Processor, ASIP), and a graphics processing unit.
  • CPU Central Processing Unit
  • ASIC Application Specific Integrated Circuit
  • ASIP Application Specific Instruction-set Processor
  • GPU Graphics Processing Unit
  • PPU Physical Processing Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • PLD Programmable Logic Device
  • controller microcontroller unit, Reduced Instruction Set Computing (RISC) and/or microprocessor, etc., or any combination thereof.
  • the electronic device may be a mobile phone, a tablet computer, a wearable device, and/or a computer, but is not limited to this.
  • All of the above electronic devices can be configured to implement the QR code generation method of this application. Although only one electronic device is shown in this application, the functions described in this application can be implemented in a distributed manner on multiple electronic devices, for example, the first electronic device obtains a QR code image and sends the QR code image To the second device, the target two-dimensional code is generated on the second electronic device.
  • processor 501 For ease of description, only one processor 501 is described in the electronic device. However, it should be noted that the electronic device in this application may also include multiple processors 501, so the steps performed by one processor 501 described in this application may also be executed by multiple processors 501 jointly or individually.
  • This application also provides another electronic device, as shown in FIG. 11, including: a processor 501, a computer-readable storage medium 502, and a bus 503.
  • the computer-readable storage medium 502 stores a machine readable executable by the processor 501
  • the processor 501 communicates with the computer-readable storage medium 502 through the bus 503, and the processor 501 executes the machine-readable instruction to execute the steps of the above-mentioned two-dimensional code recognition method.
  • the processor 501 includes CPU, ASIC, ASIP, GPU, PPU, DSP, FPGA, PLD, controller, microcontroller unit, RISC and/or microprocessor, etc., or any combination thereof.
  • the electronic device can be a mobile phone, a tablet computer, a wearable device, a computer with a QR code scanning and/or recognition function, but not limited to this.
  • All of the above electronic devices can be configured to implement the two-dimensional code recognition method of this application.
  • this application only shows one electronic device, the functions described in this application can be implemented on multiple electronic devices in a distributed manner.
  • the first electronic device scans a QR code and sends the QR code to the first electronic device.
  • the second device recognizes the QR code on the second electronic device.
  • processor 501 For ease of description, only one processor 501 is described in the electronic device. However, it should be noted that the electronic device in this application may also include multiple processors 501, so the steps performed by one processor 501 described in this application may also be executed by multiple processors 501 jointly or individually.
  • the present application also provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium.
  • the computer program executes the steps of the above-mentioned two-dimensional code generation method or the two-dimensional code recognition method when the computer program is run by a processor .
  • the computer-readable storage medium includes mass memory, removable memory, volatile read-write memory and/or read-only memory (Read-Only Memory, ROM), etc., or any combination thereof.
  • mass storage may include magnetic disks, optical disks, and/or solid-state drives, etc.
  • removable storage may include flash drives, floppy disks, optical disks, memory cards, zip disks and/or tapes, etc.
  • volatile read-write memory May include Random Access Memory (RAM); RAM may include Dynamic RAM (Dynamic Random Access Memory, DRAM), Double Date-Rate Synchronous RAM (DDR SDRAM); Static RAM ( Static Random-Access Memory, SRAM), Thyristor-Based Random Access Memory (T-RAM) and Zero-Capacitor RAM (Zero-RAM), etc.
  • RAM may include Dynamic RAM (Dynamic Random Access Memory, DRAM), Double Date-Rate Synchronous RAM (DDR SDRAM); Static RAM ( Static Random-Access Memory, SRAM), Thyristor-Based Random Access Memory (
  • ROM may include mask ROM (Mask Read-Only Memory, MROM), programmable ROM (Programmable Read-Only Memory, PROM), erasable programmable ROM (Programmable Read-only Memory, PEROM), electronic Erasable programmable ROM (Electrically Erasable Programmable read only memory, EEPROM), compact disc ROM (CD-ROM) and/or digital universal disk ROM, etc., or any combination thereof.
  • MROM mask ROM
  • PROM Programmable Read-Only Memory
  • PROM Programmable Read-only Memory
  • PEROM Erasable programmable ROM
  • EEPROM Electrical Erasable Programmable read only memory
  • CD-ROM compact disc ROM
  • digital universal disk ROM etc.

Abstract

Two-dimensional code generation and recognition methods and devices, relating to the field of digital image recognition technology. The two-dimensional code generation method comprises: adding onto a pre-set image a two-dimensional code to be fused, so as to acquire a two-dimensional code image (S101); and according to a pre-set fusion rule, the two-dimensional code image and a two-dimensional code to be generated, generating a target two-dimensional code (S102). The invention can fuse on a pre-set image a two-dimensional code to be fused, to generate a two-dimensional code image, and then according to a pre-set fusing rule, the two-dimensional code image and/or a two-dimensional code to be generated, generate a target two-dimensional code image, the target two-dimensional code image containing information concerning the two-dimensional code to be fused and the two-dimensional code to be generated, achieving the effect that after a pre-set image is inserted into a target two-dimensional code, the information carried by the two-dimensional code and the fault tolerance capability of the two-dimensional code remain unchanged.

Description

二维码生成、识别方法及装置Method and device for generating and identifying two-dimensional code
相关申请的交叉引用Cross references to related applications
本申请要求于2019年01月31日提交中国专利局的申请号为CN201910100803.7、名称为“二维码生成、识别方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number CN201910100803.7 and the name "Method and device for generating and identifying QR code" submitted to the China Patent Office on January 31, 2019, the entire contents of which are incorporated by reference In this application.
技术领域Technical field
本申请涉及数字图像识别技术领域,具体而言,涉及一种二维码生成、识别方法及装置。This application relates to the technical field of digital image recognition, and specifically to a method and device for generating and recognizing a two-dimensional code.
背景技术Background technique
随着科技的发展,二维码已成为信息传播的便捷载体,并且二维码的集成度越来越高,用户通过扫描二维码即可获得相关产品信息或链接到相关网页上浏览更多信息。With the development of science and technology, QR codes have become a convenient carrier for information dissemination, and the integration of QR codes is getting higher and higher. Users can scan the QR codes to obtain relevant product information or link to relevant web pages to browse more information.
目前在生成二维码时,经常在二维码中心位置插入可视图标,以增加可视效果以及实现个性化。At present, when generating a two-dimensional code, a visual icon is often inserted in the center of the two-dimensional code to increase the visual effect and achieve personalization.
但是,插入可视图标后,会导致二维码承载的信息变少,二维码的容错能力降低。However, after inserting the visual icon, the information carried by the QR code will be reduced, and the fault tolerance of the QR code will be reduced.
发明内容Summary of the invention
有鉴于此,本申请实施例的目的在于提供一种二维码生成方法、识别方法、生成装置、识别装置、电子设备以及可读存储介质,以解决在二维码上插入可视图标后,会导致二维码承载的信息变少,二维码的容错能力降低的问题。In view of this, the purpose of the embodiments of the present application is to provide a QR code generation method, recognition method, generation device, recognition device, electronic equipment, and readable storage medium, so as to solve the problem of inserting a visual icon on the QR code. It will lead to the problem of less information carried by the QR code, and reduced fault tolerance of the QR code.
本申请第一方面提供了一种二维码生成方法,可以包括:在预设图像上,添加待融合二维码,获取二维码图像。根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码。The first aspect of the application provides a method for generating a two-dimensional code, which may include: adding a two-dimensional code to be fused to a preset image to obtain a two-dimensional code image. According to the preset fusion rules, the two-dimensional code image and/or the two-dimensional code to be generated, the target two-dimensional code is generated.
可选地,在预设图像上,添加待融合二维码,获取二维码图像,包括:调整待融合二维码的像素点颜色,获取调整后的待融合二维码;将调整后的待融合二维码与预设图像叠加,获取二维码图像。Optionally, adding a QR code to be fused to the preset image to obtain a QR code image includes: adjusting the pixel color of the QR code to be fused, obtaining the adjusted QR code to be fused; The two-dimensional code to be fused is superimposed with the preset image to obtain the two-dimensional code image.
可选地,将调整后的待融合二维码与预设图像叠加,获取二维码图像,包括:将调整后的待融合二维码作为预设图像的一个涂层,获取二维码图像,其中,涂层中各像素点的颜色按照预设涂层规则与预设图像原始涂层对应位置像素点的色彩匹配。Optionally, superimposing the adjusted two-dimensional code to be fused with the preset image to obtain the two-dimensional code image includes: using the adjusted two-dimensional code to be fused as a coating of the preset image to obtain the two-dimensional code image , Wherein the color of each pixel in the coating is matched with the color of the pixel at the corresponding position of the original coating of the preset image according to the preset coating rule.
可选地,在预设图像上,添加待融合二维码,获取二维码图像之前,还包括:根据原始二维码获取待生成二维码并提取待融合二维码,其中,待生成二维码包括预设形状的待融合区域。Optionally, adding the two-dimensional code to be fused to the preset image, before acquiring the two-dimensional code image, further includes: obtaining the two-dimensional code to be generated according to the original two-dimensional code and extracting the two-dimensional code to be fused, wherein The two-dimensional code includes a region to be fused with a preset shape.
可选地,根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码,包括:将二维码图像转换为与待融合区域匹配的形状,得到目标二维码图像。将目标二维码图像融合至待生成二维码的待融合区域,生成目标二维码。Optionally, generating the target two-dimensional code according to preset fusion rules, the two-dimensional code image and/or the two-dimensional code to be generated includes: converting the two-dimensional code image into a shape matching the area to be fused to obtain the target two-dimensional code Code image. The target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
本申请第二方面提供了一种二维码识别方法,包括:采集获取待识别图像,待识别图像包括目标二维码,目标二维码根据预设融合规则、二维码图像和/或待生成二维码生成,其中,二维码图像为预设图像和待融合二维码融合获取。采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的标识信息。The second aspect of the present application provides a method for recognizing a two-dimensional code, including: acquiring an image to be recognized, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is based on preset fusion rules, two-dimensional code images and/or waiting Generate a two-dimensional code generation, where the two-dimensional code image is obtained by fusion of the preset image and the two-dimensional code to be fused. The two-dimensional code recognition algorithm is used to identify the two-dimensional code to be fused and the two-dimensional code to be generated respectively, and the identification information of the image to be recognized is recognized.
可选地,待识别图像还包括:备选识别标识,备选识别标识与目标二维码均指示待识别图像的标识信息。采用二维码识别算法,分别识别待融合二维码和待生成二维码,获取目标二维码的二维码信息之前,还包括:识别获取待识别图像中的目标二维码和备选识别标识。Optionally, the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified. Using the two-dimensional code recognition algorithm, respectively identify the two-dimensional code to be fused and the two-dimensional code to be generated, before obtaining the two-dimensional code information of the target two-dimensional code, it also includes: recognizing and obtaining the target two-dimensional code and the candidate in the image to be recognized Identify the logo.
可选地,采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的标识信息,包括:采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的二维码信息。或者,若采用二维码识别算法,识别获取待识别图像的二维码信息失败,则采用备选识别标识对应的算法,识别获取备选识别标识。Optionally, using a two-dimensional code recognition algorithm to separately identify the two-dimensional code to be fused and the two-dimensional code to be generated, and to identify and obtain the identification information of the image to be recognized, including: using a two-dimensional code recognition algorithm to respectively identify the two-dimensional code to be fused And the two-dimensional code to be generated, identify and obtain the two-dimensional code information of the image to be recognized. Alternatively, if the two-dimensional code recognition algorithm is used to identify and obtain the two-dimensional code information of the image to be recognized, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
可选地,备选识别标识为字符串或标识码,其中,字符串包括下述一种或多种字符的组合:数字、字母和符号。Optionally, the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
本申请第三方面提供了一种二维码生成装置,包括:The third aspect of the present application provides a QR code generation device, including:
获取模块,配置成在预设图像上,添加待融合二维码,获取二维码图像。生成模块,配置成根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码。The acquiring module is configured to add a two-dimensional code to be fused on the preset image to obtain a two-dimensional code image. The generating module is configured to generate the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated.
可选地,获取模块,具体配置成将调整后的待融合二维码作为预设图像的一个涂层,获取二维码图像,其中,涂层中各像素点的颜色按照预设涂层规则与预设图像原始涂层对应位置像素点的色彩匹配。Optionally, the acquisition module is specifically configured to use the adjusted QR code to be fused as a coating of the preset image to obtain the QR code image, wherein the color of each pixel in the coating is in accordance with the preset coating rule Match the color of the pixels at the corresponding position of the original coating of the preset image.
可选地,获取模块,具体配置成将待融合二维码作为预设图像的一个涂层,获取二维码图像,其中,涂层中各像素点与原始涂层对应位置像素点的色彩信息匹配。Optionally, the acquisition module is specifically configured to use the two-dimensional code to be fused as a coating of the preset image to obtain the two-dimensional code image, wherein the color information of each pixel in the coating and the pixel at the corresponding position of the original coating match.
可选地,还包括提取模块,配置成根据原始二维码获取待生成二维码并提取待融合二维码,其中,待生成二维码包括预设形状的待融合区域。Optionally, it further includes an extraction module configured to obtain the two-dimensional code to be generated according to the original two-dimensional code and extract the two-dimensional code to be fused, wherein the two-dimensional code to be generated includes a region to be fused with a preset shape.
可选地,生成模块,具体配置成将二维码图像转换为与待融合区域匹配的形状,得到目标二维码图像。将目标二维码图像融合至待生成二维码的待融合区域,生成目标二维码。Optionally, the generating module is specifically configured to convert the two-dimensional code image into a shape matching the region to be fused to obtain the target two-dimensional code image. The target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
本申请第四方面提供了一种二维码识别装置,包括:The fourth aspect of the present application provides a two-dimensional code recognition device, including:
获取模块,配置成采集获取待识别图像,待识别图像包括目标二维码,目标二维码根据预设融合规则、二维码图像和/或待生成二维码生成,其中,二维码图像为预设图像和待融合二维码融合获取。识别模块,配置成采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的标识信息。The acquisition module is configured to collect and acquire the image to be recognized, the image to be recognized includes a target QR code, and the target QR code is generated according to preset fusion rules, a QR code image, and/or a QR code to be generated, where the QR code image It is obtained by fusion of the preset image and the QR code to be fused. The recognition module is configured to use a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the identification information of the image to be recognized.
可选地,待识别图像还包括:备选识别标识,备选识别标识与目标二维码均指示待识别图像的标识信息。识别模块,还配置成识别获取待识别图像中的目标二维码和备选识别标识。Optionally, the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified. The recognition module is also configured to recognize and acquire the target two-dimensional code and the candidate recognition mark in the image to be recognized.
可选地,识别模块,具体配置成采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的二维码信息。或者,若采用二维码识别算法,识别获取待识别图像的二维码信息失败,则采用备选识别标识对应的算法,识别获取备选识别标识。Optionally, the recognition module is specifically configured to adopt a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the two-dimensional code information of the image to be recognized. Alternatively, if the two-dimensional code recognition algorithm is used to identify and obtain the two-dimensional code information of the image to be recognized, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
可选地,备选识别标识为字符串或标识码,其中,字符串包括下述一种或多种字符的组合:数字、字母和符号。Optionally, the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
本申请第五方面提供了一种电子设备,包括:处理器、存储介质和总线,存储介质存储有处理器可执行的机器可读指令,当电子设备运行时,处理器与存储介质之间通过总线通信,处理器执行机器可读指令,以执行上述第一方面提供的二维码生成方法或者第二方面提供的二维码识别方法的步骤。The fifth aspect of the present application provides an electronic device, including a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium pass through In bus communication, the processor executes machine-readable instructions to execute the steps of the two-dimensional code generation method provided in the first aspect or the two-dimensional code recognition method provided in the second aspect.
本申请第六方面提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如上述第一方面提供的二维码生成方法或者第二方面提供的二维码识别方法。The sixth aspect of the present application provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is run by a processor, it executes the two-dimensional code generation method or the second method provided in the first aspect. The two-dimensional code recognition method provided by the two aspects.
基于上述第一方面,能够通过在预设图像上,融合待融合二维码,生成二维码图像,然后根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码图像,目标二维码图像中包含待融合二维码以及待生成二维码的信息,实现了在目标二维码中插入包含二维码信息的预设图像,可以提升二维码承载信息和容错的能力。Based on the above first aspect, it is possible to generate a QR code image by fusing the QR code to be fused on a preset image, and then generate the target two according to the preset fusion rule, the QR code image and/or the QR code to be generated QR code image, the target QR code image contains the information of the QR code to be fused and the QR code to be generated, which realizes the insertion of a preset image containing the QR code information in the target QR code, which can improve the load of the QR code Information and fault tolerance.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore do not It should be regarded as a limitation of the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative work.
图1示出了本申请一实施例提供的二维码生成方法的流程图;Fig. 1 shows a flowchart of a method for generating a QR code provided by an embodiment of the present application;
图2示出了本申请另一实施例提供的二维码生成方法的流程图;FIG. 2 shows a flowchart of a method for generating a QR code according to another embodiment of the present application;
图3示出了本申请另一实施例提供的二维码生成方法的流程图;FIG. 3 shows a flowchart of a method for generating a QR code according to another embodiment of the present application;
图4示出了本申请另一实施例提供的二维码生成方法的流程图;FIG. 4 shows a flowchart of a method for generating a QR code according to another embodiment of the present application;
图5示出了本申请一实施例提供的二维码识别方法的流程图;FIG. 5 shows a flowchart of a two-dimensional code recognition method provided by an embodiment of the present application;
图6示出了本申请另一实施例提供的二维码识别方法的流程图;FIG. 6 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application;
图7示出了本申请另一实施例提供的二维码识别方法的流程图;FIG. 7 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application;
图8示出了本申请一实施例提供的二维码生成装置的结构示意图;FIG. 8 shows a schematic structural diagram of a two-dimensional code generating device provided by an embodiment of the present application;
图9示出了本申请另一实施例提供的二维码生成装置的结构示意图;FIG. 9 shows a schematic structural diagram of a two-dimensional code generating apparatus provided by another embodiment of the present application;
图10示出了本申请一实施例提供的二维码识别装置的结构示意图;FIG. 10 shows a schematic structural diagram of a two-dimensional code recognition device provided by an embodiment of the present application;
图11示出了本申请一实施例提供的电子设备的结构示意图。FIG. 11 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚并且完整地描述,应当理解,本申请中附图仅起到说明和描述的目的,并不用于限定本申请的保护范围。另外,应当理解,示意性的附图并未按实物比例绘制。本申请中使用的流程图示出了根据本申请的一些实施例实现的操作。In order to make the purpose, technical solutions and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. It should be understood that this application is attached The drawings are only for the purpose of illustration and description, and are not used to limit the protection scope of this application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowchart used in this application shows operations implemented according to some embodiments of this application.
应该理解,流程图的操作可以不按顺序实现,没有逻辑的上下文关系的步骤可以反转顺序或者同时实施。此外,本领域技术人员在本申请内容的指引下,可以向流程图添加一个或多个其他操作,也可以从流程图中移除一个或多个操作。It should be understood that the operations of the flowchart may be implemented out of order, and steps without logical context may be reversed in order or implemented at the same time. In addition, under the guidance of the content of this application, those skilled in the art can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
另外,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work shall fall within the protection scope of the present application.
需要说明的是,本申请实施例中将会用到术语“包括”,用于指出其后所声明的特征的存在,但并不排除增加其它的特征。It should be noted that the term "including" will be used in the embodiments of this application to indicate the existence of the features declared later, but it does not exclude the addition of other features.
目前二维码的类型有多种,如层排式二维码和/或矩阵式二维码等。At present, there are many types of two-dimensional codes, such as layered two-dimensional codes and/or matrix two-dimensional codes.
典型的层排式二维码包括:便携数据文件417(Portable Data File,PDF417)、代码49(Code 49)和/或代码16K(Code 16K)等;典型的矩阵式二维码包括:代码一(Code One)、快速响应代码(Quick Response Code,QR Code)、数据矩阵(Data Matrix)和/或汉信码(Han Xin Code)等。Typical layered two-dimensional codes include: portable data file 417 (Portable Data File, PDF417), code 49 (Code 49) and/or code 16K (Code 16K), etc.; typical matrix two-dimensional codes include: code one (Code One), Quick Response Code (Quick Response Code, QR Code), Data Matrix (Data Matrix) and/or Han Xin Code (Han Xin Code), etc.
在本申请中,以QR Code作为二维码的类型进行说明,但本申请提供的二维码识别方法所能应用的二维码类型不以此为限。In this application, QR Code is used as the type of two-dimensional code for description, but the type of two-dimensional code that can be applied to the two-dimensional code identification method provided in this application is not limited to this.
图1示出了本申请一实施例提供的二维码生成方法的流程图。该方法的执行主体可以是能够生成二维码的终端,例如,手机、平板电脑、台式电脑和/或穿戴设备等,在此不作限制。Fig. 1 shows a flowchart of a method for generating a two-dimensional code provided by an embodiment of the present application. The execution subject of the method may be a terminal capable of generating a two-dimensional code, such as a mobile phone, a tablet computer, a desktop computer, and/or a wearable device, etc., which is not limited herein.
如图1所示,该二维码生成方法包括:As shown in Figure 1, the two-dimensional code generation method includes:
S101:在预设图像上,添加待融合二维码,获取二维码图像。S101: Add a two-dimensional code to be fused to a preset image to obtain a two-dimensional code image.
一些实施方式中,预设图像可以包括图标、头像和/或指定的图片等,例如,青桔单车上二维码中的商标图标,微信二维码中用户的头像等,在此不做限制。In some embodiments, the preset image may include icons, avatars, and/or designated pictures, etc., for example, the trademark icon in the QR code on Qingju Bike, the user's avatar in the WeChat QR code, etc., which are not limited here. .
其中,待融合二维码可以是二维码的部分信息或者完整的二维码。例如,将完整二维码中的局部截取出来,作为待融合二维码,或者根据二维码的部分信息以及二维码生成算法生成一个待融合二维码,又或者提取特定的二维码信息作为待融合二维码(例如二维码版本信息和/或品牌信息等)等,在此不做限制。Among them, the two-dimensional code to be fused may be part of the information of the two-dimensional code or a complete two-dimensional code. For example, take a partial cut out of the complete QR code as the QR code to be fused, or generate a QR code to be fused based on part of the information of the QR code and the QR code generation algorithm, or extract a specific QR code The information as a two-dimensional code to be fused (for example, two-dimensional code version information and/or brand information, etc.), etc., is not limited here.
需要说明的是,将待融合二维码融合进预设图像后,获取的二维码图像中的二维码,包括可见二维码或不可见二维码。It should be noted that, after the two-dimensional code to be fused into the preset image, the two-dimensional code in the obtained two-dimensional code image includes a visible two-dimensional code or an invisible two-dimensional code.
其中,可见二维码指在二维码图像中,可显示出待融合二维码的像素点,在此不限定具体显示方式,可能透明度较低或者颜色与预设图像匹配而不明显,需要放大一定程度或者调整至一定亮度后可以观察到。而不可见二维码指的是在二维码图像中,隐藏待融合二维码,也就是不显示出该待融合二维码,需要通过一些算法的识别才可以获取。Among them, the visible two-dimensional code refers to the two-dimensional code image that can display the pixels of the two-dimensional code to be fused. The specific display method is not limited here. The transparency may be low or the color matching the preset image is not obvious. It can be observed after zooming in to a certain degree or adjusting to a certain brightness. The invisible two-dimensional code means that the two-dimensional code to be fused is hidden in the two-dimensional code image, that is, the two-dimensional code to be fused is not displayed, and it can be obtained only through the recognition of some algorithms.
其中,待融合二维码与预设图像融合时,可以采取点分布、行分布或列分布,但不以此为限。Wherein, when the two-dimensional code to be fused is fused with the preset image, point distribution, row distribution or column distribution can be adopted, but it is not limited to this.
S102:根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码。S102: Generate the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated.
其中,当预设图像的尺寸与待生成二维码的尺寸的比例大于预设阈值时,采取点分布的识别效果更佳。当预设图像的尺寸与待生成二维码的尺寸的比例小于预设阈值时,采取行分布的识别效果更佳。Wherein, when the ratio of the size of the preset image to the size of the two-dimensional code to be generated is greater than the preset threshold, the recognition effect of the point distribution is better. When the ratio of the size of the preset image to the size of the two-dimensional code to be generated is less than the preset threshold, the recognition effect of the line distribution is better.
例如,一种可能的实施方式中,二维码图像中的待融合二维码是待生成二维码中的局部信息,将待融合二维码融入预设图像后,生成的二维码图像可以是在预设图像上看到包含待融合二维码的像素点,例如待融合二维码作为预设图像的一个图层,但是颜色很浅,需要放大才能看到有一些二维码的像素点。例如原始二维码又黑白点构成,提取局部信息作为待融合二维码,其中原来白的部分透明化即显示预设图像对应的内容,原来黑色的部分颜色调整为较浅的颜色,例如调整为浅灰、乳白或者与预设图像对应像素点颜色一致但是更浅等,在此不做限制。For example, in a possible implementation, the two-dimensional code to be fused in the two-dimensional code image is the partial information in the two-dimensional code to be generated, and the two-dimensional code image to be generated is generated after the two-dimensional code to be fused into the preset image You can see the pixels containing the QR code to be fused on the preset image. For example, the QR code to be fused is a layer of the preset image, but the color is very light and you need to zoom in to see some QR codes. pixel. For example, the original two-dimensional code is composed of black and white dots, and partial information is extracted as the two-dimensional code to be fused. The original white part is transparent to display the content corresponding to the preset image, and the original black part is adjusted to a lighter color, such as adjusting It is light gray, milky white, or the same color as the corresponding pixel of the preset image but lighter, etc. There is no restriction here.
待生成二维码中包含空白区域,可以根据预设融合规则,将二维码图像添加到空白区域中,进而得到目标二维码。The two-dimensional code to be generated includes a blank area, and the two-dimensional code image can be added to the blank area according to a preset fusion rule to obtain the target two-dimensional code.
在本实施例中,能够通过在预设图像上,融合待融合二维码,生成二维码图像,然后根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码图像,目标二维码图像中包含待融合二维码以及待生成二维码的信息,实现了在目标二维码中插入包含二维码信息的预设图像,可以提升二维码承载信息和容错的能力。In this embodiment, it is possible to generate a two-dimensional code image by fusing the two-dimensional code to be fused on a preset image, and then generate the target two according to the preset fusion rule, the two-dimensional code image, and/or the two-dimensional code to be generated. QR code image, the target QR code image contains the information of the QR code to be fused and the QR code to be generated, which realizes the insertion of a preset image containing the QR code information in the target QR code, which can improve the load of the QR code Information and fault tolerance.
图2示出了本申请另一实施例提供的二维码生成方法的流程图。FIG. 2 shows a flowchart of a method for generating a two-dimensional code provided by another embodiment of the present application.
可选地,如图2所示,在预设图像上,添加待融合二维码,获取二维码图像,包括:Optionally, as shown in FIG. 2, adding a QR code to be fused to the preset image to obtain a QR code image includes:
S101-1:调整待融合二维码的像素点颜色,获取调整后的待融合二维码。S101-1: Adjust the pixel color of the QR code to be fused, and obtain the adjusted QR code to be fused.
需要说明的是,为了让预设图像上的待融合二维码不突显,可以先调整待融合二维码 的像素点颜色,获取调整后的待融合二维码。It should be noted that, in order to prevent the QR code to be fused on the preset image from being prominent, you can first adjust the pixel color of the QR code to be fused to obtain the adjusted QR code to be fused.
可选地,将待融合二维码的像素点颜色调整的较浅。Optionally, adjust the color of the pixels of the two-dimensional code to be merged to be lighter.
S101-2:将调整后的待融合二维码与预设图像叠加,获取二维码图像。S101-2: Superimpose the adjusted QR code to be fused with the preset image to obtain a QR code image.
可选地,将调整后的待融合二维码与预设图像叠加,获取二维码图像,可以包括:Optionally, superimposing the adjusted QR code to be fused with a preset image to obtain a QR code image may include:
将调整后的待融合二维码作为预设图像的一个涂层,获取二维码图像,其中,涂层中各像素点的颜色按照预设涂层规则与预设图像原始涂层对应位置像素点的色彩匹配。Use the adjusted QR code to be fused as a coating of the preset image to obtain the QR code image, where the color of each pixel in the coating is in accordance with the preset coating rules and the pixel at the corresponding position of the original coating of the preset image Match the color of the dots.
在一种可能的实施方式中,将待融合二维码中黑色部分对应的像素点的数值增加预设数值并且白色部分对应的像素点的数值减少预设数值,或者,白色部分对应的像素点的数值增加或减少预设数值并且黑色部分对应的像素点的数值不变,获取调整后的待融合二维码。然后,将调整后的待融合二维码与预设图像叠加。In a possible implementation manner, the value of the pixel corresponding to the black part of the QR code to be fused is increased by a preset value and the value of the pixel corresponding to the white part is decreased by the preset value, or the pixel corresponding to the white part The value of is increased or decreased by the preset value and the value of the pixel corresponding to the black part remains unchanged, and the adjusted QR code to be fused is obtained. Then, overlay the adjusted QR code to be fused with the preset image.
可选地,调整后黑色部分对应的像素点的数值与预设图像原始图像中对应位置像素点的数值接近,例如差值小于预设阈值。白色部分对应的像素点还可以调整透明度,以突显出预设图像原始图像中对应位置像素点的颜色,或者,白色部分对应的像素点的数值调整至于预设图像原始图像中对应位置像素点的数值相同,本申请不作具体限制。Optionally, the value of the pixel point corresponding to the black part after adjustment is close to the value of the pixel point at the corresponding position in the original image of the preset image, for example, the difference is less than a preset threshold. The transparency of the pixels corresponding to the white part can also be adjusted to highlight the color of the pixel at the corresponding position in the original image of the preset image, or the value of the pixel corresponding to the white part is adjusted to the value of the pixel at the corresponding position in the original image of the preset image The values are the same, and this application does not make specific restrictions.
图3示出了本申请另一实施例提供的二维码生成方法的流程图。Fig. 3 shows a flowchart of a method for generating a two-dimensional code provided by another embodiment of the present application.
可选地,如图3所示,在预设图像上,添加待融合二维码,获取二维码图像之前,还包括:Optionally, as shown in FIG. 3, adding a two-dimensional code to be fused on the preset image, and before acquiring the two-dimensional code image, it also includes:
S100:根据原始二维码获取待生成二维码,并提取待融合二维码。S100: Obtain the two-dimensional code to be generated according to the original two-dimensional code, and extract the two-dimensional code to be fused.
其中,待生成二维码包括预设形状的待融合区域。Wherein, the two-dimensional code to be generated includes a region to be fused with a preset shape.
可选地,将原始二维码中挖出一部分空白区域,其中,原先占据该空白区域的二维码信息可以分布到其他保留区域,使保留区域的二维码信息更加密集。另外,在从原始二维码信息中提取部分或全部二维码信息作为待融合二维码。Optionally, a part of the blank area is dug out of the original two-dimensional code, where the two-dimensional code information that originally occupied the blank area can be distributed to other reserved areas, so that the two-dimensional code information in the reserved area is more dense. In addition, part or all of the two-dimensional code information is extracted from the original two-dimensional code information as the two-dimensional code to be fused.
或者,可选地,原先占据该空白区域的二维码信息可以选择一部分分布到保留区域,另一部分作为待融合二维码。其中,可以将一些重要信息作为待融合二维码。Or, optionally, a part of the two-dimensional code information that originally occupies the blank area can be selected to be distributed in the reserved area, and the other part is used as the two-dimensional code to be fused. Among them, some important information can be used as a QR code to be fused.
需要说明的是,待生成二维码中的待融合区域的形状,可以是矩形、圆形、多边形和/或不规则图形等,在此不做限制。It should be noted that the shape of the region to be merged in the two-dimensional code to be generated may be rectangular, circular, polygonal, and/or irregular graphics, etc., which is not limited here.
一些实施方式中,提取待融合二维码,可以将裁剪掉的原始二维码作为待融合二维码,也可以根据原始二维码,提取预设特征,例如,定位点和定位点分隔符、矫正图形、版本信息和/或容错率信息等特征,并将提取的特征作为二维码的数据区域所包含的数据,生成待融合二维码。提取的待融合二维码具体包括哪些信息,在此不做限制,可以根据应用时的不同情况做相应调整。In some embodiments, to extract the two-dimensional code to be fused, the cropped original two-dimensional code can be used as the two-dimensional code to be fused, or preset features, such as anchor points and anchor point separators, can be extracted based on the original two-dimensional codes , Correct features such as graphics, version information and/or error tolerance information, and use the extracted features as the data contained in the data area of the two-dimensional code to generate the to-be-fused two-dimensional code. What information is included in the extracted QR code to be fused is not limited here, and can be adjusted according to different situations during application.
图4示出了本申请另一实施例提供的二维码生成方法的流程图。Fig. 4 shows a flowchart of a method for generating a two-dimensional code provided by another embodiment of the present application.
可选地,如图4所示,根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码,包括:Optionally, as shown in FIG. 4, generating the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated includes:
S102-1:将二维码图像转换为与待融合区域匹配的形状,得到目标二维码图像。S102-1: Convert the two-dimensional code image into a shape matching the area to be fused to obtain the target two-dimensional code image.
一些实施方式中,二维码图像与预设图像的形状一致,待融合区域的形状是根据预设图像的形状预留的,只需将二维码图像的尺寸与待融合区域的尺寸匹配。In some embodiments, the two-dimensional code image has the same shape as the preset image, and the shape of the area to be fused is reserved according to the shape of the preset image, and only the size of the two-dimensional code image and the size of the area to be fused need to be matched.
例如,二维码图像、预设图像为10*10的方形图像,待融合区域为5*5的方形区域,则需要将二维码图像调整为5*5的方形图像。For example, if the two-dimensional code image and the preset image are a 10*10 square image, and the area to be fused is a 5*5 square area, the two-dimensional code image needs to be adjusted to a 5*5 square image.
还有一些实施方式中,二维码图像的形状与待融合区域的形状不相同,则需要根据待融合区域的形状,调整二维码图像的形状,然后再将二维码图像的尺寸与待融合区域的尺寸匹配。In some embodiments, the shape of the two-dimensional code image is different from the shape of the area to be fused, it is necessary to adjust the shape of the two-dimensional code image according to the shape of the area to be fused, and then the size of the two-dimensional code image is The size of the fusion area matches.
例如,二维码图像的形状为圆形,待融合区域的形状为方形,则将二维码图像的形状调整为方形,调整的方法包括在二维码图像添加方形背景和/或将二维码图像裁剪为方形等,在此不做限制。然后将调整为方形的二维码图的尺寸与待融合区域的尺寸调整为匹配的尺寸。For example, if the shape of the two-dimensional code image is a circle, and the shape of the area to be fused is a square, the shape of the two-dimensional code image is adjusted to a square. The adjustment method includes adding a square background to the two-dimensional code image and/or The code image is cropped into a square, etc., and there is no restriction here. Then, the size of the two-dimensional code map adjusted to a square shape and the size of the area to be fused are adjusted to match the size.
需要说明的是,上述的图像调整的方式仅为举例,还可以有其他的调整方式,例如,直接将形状与待融合区域不同的二维码图像的尺寸调整为可以完整容置于待融合区域内,而不进行形状的调整等,在此不做限制。It should be noted that the above-mentioned image adjustment methods are only examples, and other adjustment methods are also possible, for example, directly adjusting the size of a QR code image whose shape is different from the area to be fused to fit in the area to be fused. It does not adjust the shape, and there is no restriction here.
S102-2:将目标二维码图像融合至待生成二维码的待融合区域,生成目标二维码。S102-2: Fuse the target two-dimensional code image to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
可选地,将S102-1中调整好的二维码图像叠加融合到待融合区域中,生成目标二维码。Optionally, the two-dimensional code image adjusted in S102-1 is superimposed and fused into the area to be fused to generate the target two-dimensional code.
图5示出了本申请一实施例提供的二维码识别方法的流程图。该方法的执行主体可以是具备二维码扫描和/或识别功能的终端,例如手机、平板电脑和/或穿戴设备等,在此不作 限制。Fig. 5 shows a flowchart of a two-dimensional code recognition method provided by an embodiment of the present application. The execution subject of this method may be a terminal with two-dimensional code scanning and/or recognition functions, such as a mobile phone, a tablet computer, and/or a wearable device, which is not limited here.
如图5所示,与前述二维码生成方法相对应,本申请还提供了一种二维码识别方法,包括:As shown in Fig. 5, corresponding to the foregoing two-dimensional code generation method, the present application also provides a two-dimensional code recognition method, including:
S201:采集获取待识别图像,待识别图像包括目标二维码,目标二维码根据预设融合规则、二维码图像和/或待生成二维码生成。S201: Acquire an image to be recognized, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is generated according to a preset fusion rule, a two-dimensional code image, and/or a two-dimensional code to be generated.
其中,二维码图像为预设图像和待融合二维码融合获取。Among them, the two-dimensional code image is obtained by fusion of the preset image and the two-dimensional code to be fused.
在本实施例中,目标二维码为通过上述二维码生成方法所生成的目标二维码,其生成方法在此不再赘述。In this embodiment, the target two-dimensional code is the target two-dimensional code generated by the above-mentioned two-dimensional code generation method, and the method for generating the two-dimensional code is not described here.
S202:采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的标识信息。S202: Adopt a two-dimensional code recognition algorithm to respectively identify the two-dimensional code to be fused and the two-dimensional code to be generated, and identify and obtain identification information of the image to be recognized.
一些实施方式中,若待融合二维码为待生成二维码的局部信息,则在识别待融合二维码和待生成二维码时,先获取待融合二维码的范围,可以通过在待融合二维码的边界上设置框,通过框确定待融合二维码的范围,例如,在待融合二维码的边界上设置预设宽度的边框,预设宽度的边框框住的范围即为待融合二维码的范围。In some embodiments, if the two-dimensional code to be fused is partial information of the two-dimensional code to be generated, when identifying the two-dimensional code to be fused and the two-dimensional code to be generated, the range of the two-dimensional code to be fused can be obtained by A frame is set on the border of the QR code to be fused, and the range of the QR code to be fused is determined by the frame. For example, a border of a preset width is set on the border of the QR code to be fused, and the range enclosed by the border of the preset width is Is the range of the QR code to be fused.
或者,获取待融合二维码在待生成二维码中的位置信息,根据位置信息确定待融合二维码的范围,例如,待融合二维码为方形,设于待生成二维码的中心,且其边长为预设长度,则待融合二维码的范围为以待生成二维码中心为中心点,边长为预设长度的方形框。Or, obtain the position information of the two-dimensional code to be fused in the two-dimensional code to be generated, and determine the range of the two-dimensional code to be fused according to the position information. For example, the two-dimensional code to be fused is a square and set in the center of the two-dimensional code to be generated , And its side length is the preset length, the range of the two-dimensional code to be fused is a square frame with the center of the two-dimensional code to be generated as the center point and the side length of the preset length.
需要说明的是,配置成识别的终端或该终端的应用程序,预先配置过二维码识别算法,该二维码识别算法预先知道待融合二维码和待生成二维码的位置关系,可以通过识别待融合二维码的边框或形状或其他标识信息,确定待融合二维码的范围。It should be noted that the terminal or the application program of the terminal is configured with a QR code recognition algorithm in advance. The QR code recognition algorithm knows in advance the positional relationship between the QR code to be fused and the QR code to be generated. Determine the range of the two-dimensional code to be fused by identifying the frame or shape or other identification information of the two-dimensional code to be fused.
在另一些实施方式中,若待融合二维码为完整的二维码,则需分别识别待融合二维码和待生成二维码,同时,根据待融合二维码和待生成二维码的识别结果,获取待识别图像的信息。In other embodiments, if the two-dimensional code to be fused is a complete two-dimensional code, the two-dimensional code to be fused and the two-dimensional code to be generated need to be identified separately, and at the same time, according to the two-dimensional code to be fused and the two-dimensional code to be generated The recognition result of, obtain the information of the image to be recognized.
还有一种可能的实施方式,若待融合二维码为不可见二维码,则需通过预设方法进行识别,例如,将预设图像和二维码图像先进行灰度处理,然后对预设图像和二维码图像求差值,获取差值图像,其中,由于预设图像和二维码图像的区别在于二维码图像添加了待融合二维码,在求得的差值图像中,未改变的像素点相减后数值为0,即黑色,改变过的 像素点相减之后,数值不为0,不为黑色。然后根据预设算法对差值图像进行二值化,获取二值化后的差值图像。识别二值化后的差值图像,即得到与待融合二维码中相同的数据。There is another possible implementation manner. If the two-dimensional code to be fused is an invisible two-dimensional code, it needs to be identified by a preset method. For example, the preset image and the two-dimensional code image are first subjected to grayscale processing, and then the preset Set the difference between the image and the two-dimensional code image to obtain the difference image, where the difference between the preset image and the two-dimensional code image is that the two-dimensional code image is added with the two-dimensional code to be fused, in the obtained difference image , The value of the unchanged pixel is 0 after subtraction, that is, black. After the changed pixel is subtracted, the value is not 0, not black. Then the difference image is binarized according to the preset algorithm, and the binarized difference image is obtained. The difference image after the binarization is recognized, and the same data as the two-dimensional code to be fused is obtained.
其中,二值化的预设算法可以为双峰法、P参数法和/或迭代法和大津(OTSU)法等,在此不做限制。Among them, the preset algorithm for binarization can be the bimodal method, the P-parameter method and/or the iterative method and the Otsu (OTSU) method, etc., which are not limited here.
在此,以识别青桔共享单车上的目标二维码为例,分别识别待融合二维码和待生成二维码。Here, taking the identification of the target two-dimensional code on the Qingju shared bicycle as an example, the two-dimensional code to be fused and the two-dimensional code to be generated are respectively identified.
当目标二维码为青桔共享单车的识别码时,待融合二维码与青桔共享单车的图标图像融合为二维码图像,若待融合二维码包含二维码的部分信息,则根据预设的识别信息获取待融合二维码的范围(预设的识别信息包括:二维码的边框和/或待融合二维码在待生成二维码中的位置信息),若待融合二维码为完整的二维码,则可以根据待融合二维码的定位点获取待融合二维码的范围。When the target QR code is the identification code of Qingju shared bicycle, the to-be-fused QR code and the icon image of Qingju shared bicycle are fused into a two-dimensional code image. If the to-be-fused two-dimensional code contains part of the information of the two-dimensional code, then Obtain the range of the QR code to be fused according to the preset identification information (the preset identification information includes: the frame of the QR code and/or the position information of the QR code to be fused in the QR code to be generated). If the two-dimensional code is a complete two-dimensional code, the range of the two-dimensional code to be fused can be obtained according to the positioning point of the two-dimensional code to be fused.
然后,根据二维码的范围获取二维码图像,并将二维码的图像与青桔共享单车的图标图像进行灰度处理,求二者的差值图像,根据预设算法对差值图像进行二值化,得到二值化后的差值图像,二值化后的差值图像与待融合二维码相同。Then, according to the range of the two-dimensional code, the two-dimensional code image is obtained, and the two-dimensional code image and the icon image of the green orange shared bicycle are gray-scaled, and the difference image between the two is calculated, and the difference image is calculated according to the preset algorithm Binarization is performed to obtain a difference image after binarization, and the difference image after binarization is the same as the two-dimensional code to be fused.
最后,根据二维码的范围,识别二值化后的差值图像即可得到与待融合二维码中相同的信息。Finally, according to the range of the two-dimensional code, the same information as the two-dimensional code to be fused can be obtained by identifying the difference image after binarization.
需要明确的是,识别二维码的方法仅为示例,不以此为限。It should be clarified that the method of recognizing the QR code is only an example, not limited to this.
同样,以识别青桔共享单车上的目标二维码为例,对待识别图像的标识信息进行说明。Similarly, take the identification of the target two-dimensional code on the Qingju shared bicycle as an example, and explain the identification information of the image to be identified.
当目标二维码为青桔共享单车的识别码时,待融合二维码中的数据可以是目标二维码的验证信息,待生成二维码的内容可以是当前共享单车的编号,待识别图像的标识信息为验证通过的共享单车的编号。待识别图像的标识信息的具体内容在此不做限制。When the target two-dimensional code is the identification code of the green orange shared bicycle, the data in the to-be-fused two-dimensional code can be the verification information of the target two-dimensional code, and the content of the to-be-generated two-dimensional code can be the number of the current shared bicycle, to be identified The identification information of the image is the number of the shared bicycle that has passed the verification. The specific content of the identification information of the image to be recognized is not limited here.
可选地,待识别图像还包括:备选识别标识,备选识别标识与目标二维码均指示待识别图像的标识信息。Optionally, the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified.
图6示出了本申请另一实施例提供的二维码识别方法的流程图。Fig. 6 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application.
如图6所示,采用二维码识别算法,分别识别待融合二维码和待生成二维码,获取目标二维码的二维码信息之前,还包括:As shown in Figure 6, the two-dimensional code recognition algorithm is used to separately identify the two-dimensional code to be fused and the two-dimensional code to be generated. Before obtaining the two-dimensional code information of the target two-dimensional code, it also includes:
S203:识别获取待识别图像中的目标二维码和备选识别标识。S203: Recognizing and acquiring the target two-dimensional code and the candidate identification mark in the image to be recognized.
其中,获取的待识别图像中可能包括目标二维码和备选识别标识,例如,扫描共享单车的二维码时,获取的待识别图像中可以包括共享单车的二维码以及印在二维码周围的共享单车的编号,此时根据共享单车的二维码中的定位点,确定共享单车二维码的范围,将共享单车二维码范围内的图像作为目标二维码,将共享单车二维码范围外的图像(包括共享单车的编号的图像)作为备选识别标识,但不以此为限。Among them, the acquired image to be identified may include the target QR code and alternative identification marks. For example, when scanning the two-dimensional code of a shared bicycle, the acquired image to be identified may include the two-dimensional code of the shared bicycle and the two-dimensional code printed on the two-dimensional The number of the shared bicycle around the code. At this time, the range of the shared bicycle QR code is determined according to the positioning point in the shared bicycle’s QR code, and the image within the shared bicycle’s QR code is used as the target QR code, and the shared bicycle Images outside the range of the two-dimensional code (including the image of the shared bicycle number) are used as candidate identification marks, but not limited to this.
图7示出了本申请另一实施例提供的二维码识别方法的流程图。Fig. 7 shows a flowchart of a two-dimensional code recognition method provided by another embodiment of the present application.
可选地,如图7所示,采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的标识信息,包括:Optionally, as shown in FIG. 7, the two-dimensional code recognition algorithm is used to separately identify the two-dimensional code to be fused and the two-dimensional code to be generated, and to identify and obtain the identification information of the image to be recognized, including:
S202-1:采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的二维码信息。S202-1: Using the two-dimensional code recognition algorithm, respectively identify the two-dimensional code to be fused and the two-dimensional code to be generated, and identify and obtain the two-dimensional code information of the image to be recognized.
其中,分别识别待融合二维码和待生成二维码,识别获取待识别图像的二维码信息的方法与S202中的一致,在此不在赘述。Wherein, the two-dimensional code to be fused and the two-dimensional code to be generated are respectively identified, and the method of identifying and acquiring the two-dimensional code information of the image to be identified is the same as that in S202, and will not be repeated here.
S202-2:若采用二维码识别算法,识别获取待识别图像的二维码信息失败,则采用备选识别标识对应的算法,识别获取备选识别标识。S202-2: If the two-dimensional code recognition algorithm is used, and the recognition and acquisition of the two-dimensional code information of the image to be recognized fails, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
在一些实施方式中,可能存在无法识别待融合二维码和待生成二维码的情况,例如,待融合二维码和待生成二维码被刮花、部分丢失和/或污染等。则可以根据上述的备选识别标识,选择对应的算法,识别获取备选识别标识。In some embodiments, there may be cases where the two-dimensional code to be fused and the two-dimensional code to be generated cannot be identified, for example, the two-dimensional code to be fused and the two-dimensional code to be generated are scratched, partly lost and/or contaminated, etc. Then, the corresponding algorithm can be selected according to the above-mentioned candidate identification mark to identify and obtain the candidate identification mark.
例如,在S203所举的例子中,将共享单车二维码范围外的图像(包括共享单车的编号的图像)作为备选识别标识。则根据需要识别的备选识别标识(编号)选择对应的算法,如光学字符识别(Optical Character Recognition,OCR)算法,通过OCR识别出共享单车二维码范围外的图像中的备选标识的信息,即共享单车的编号。在使用对应的算法识别备选识别标识后,将识别出的备选识别标识的信息作为目标二维码的信息使用。For example, in the example in S203, the image outside the range of the two-dimensional code of the shared bicycle (including the image of the number of the shared bicycle) is used as the candidate identification identifier. Then select the corresponding algorithm according to the candidate identification (number) that needs to be recognized, such as the optical character recognition (Optical Character Recognition, OCR) algorithm, and identify the candidate identification information in the image outside the QR code of the shared bicycle through OCR , Which is the number of the shared bicycle. After using the corresponding algorithm to identify the candidate identification mark, the information of the identified candidate identification mark is used as the target two-dimensional code information.
可选地,若采用二维码识别算法,成功识别获取待识别图像的二维码信息,也可以识别备选识别标识的信息,然后将二者的信息进行比对验证,提高识别结果的准确性。Optionally, if the two-dimensional code recognition algorithm is used to successfully identify and obtain the two-dimensional code information of the image to be recognized, the information of the candidate identification mark can also be recognized, and then the two information can be compared and verified to improve the accuracy of the recognition result Sex.
可选地,备选识别标识为字符串或标识码,其中,字符串包括下述一种或多种字符的组合:数字、字母和符号。Optionally, the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
例如,当备选识别标识配置成标识编号时,可以为纯数字字符串,或数字与字母混合 的字符串,当备选识别标识配置成标识网络地址和/或链接时,可以为数字、字母和/或符号混合的字符串。For example, when the candidate identification is configured as an identification number, it can be a purely numeric string or a string of numbers and letters. When the candidate identification is configured to identify a network address and/or link, it can be a number or letter. And/or a mixed character string.
还有一种可能的实施方式中,备选识别标识还可以由一个或一段汉字、日文、韩文和/或阿拉伯文等非字母组成的语言组成,此时可以选择与对应语言匹配的算法进行识别,获取备选识别标识的信息。备选识别标识的组成方式在此不做限制。In another possible implementation, the candidate identification can also be composed of one or a segment of non-letter languages such as Chinese characters, Japanese, Korean, and/or Arabic. In this case, an algorithm that matches the corresponding language can be selected for identification. Get the information of the candidate identification. There is no restriction on the composition of the alternative identification mark.
图8示出了本申请一实施例提供的二维码生成装置的结构示意图。FIG. 8 shows a schematic structural diagram of a two-dimensional code generating apparatus provided by an embodiment of the present application.
如图8所示,本申请提供了一种二维码生成装置,包括:As shown in Figure 8, the present application provides a QR code generation device, including:
获取模块301,配置成在预设图像上,添加待融合二维码,获取二维码图像。生成模块302,配置成根据预设融合规则、二维码图像和/或待生成二维码,生成目标二维码。The obtaining module 301 is configured to add a two-dimensional code to be fused on a preset image to obtain a two-dimensional code image. The generating module 302 is configured to generate the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated.
可选地,获取模块301,具体配置成将调整后的待融合二维码作为预设图像的一个涂层,获取二维码图像,其中,涂层中各像素点的颜色按照预设涂层规则与预设图像原始涂层对应位置像素点的色彩匹配。Optionally, the acquiring module 301 is specifically configured to use the adjusted QR code to be fused as a coating of the preset image to obtain the QR code image, wherein the color of each pixel in the coating is in accordance with the preset coating The rule matches the color of the pixel at the corresponding position of the original coating of the preset image.
可选地,获取模块301,具体配置成将待融合二维码作为预设图像的一个涂层,获取二维码图像,其中,涂层中各像素点与原始涂层对应位置像素点的色彩信息匹配。Optionally, the acquiring module 301 is specifically configured to use the two-dimensional code to be fused as a coating of the preset image to acquire the two-dimensional code image, wherein the color of each pixel in the coating corresponds to the pixel of the original coating Information matches.
图9示出了本申请另一实施例提供的二维码生成装置的结构示意图。FIG. 9 shows a schematic structural diagram of a two-dimensional code generating apparatus provided by another embodiment of the present application.
可选地,如图9所示,还包括提取模块303,配置成根据原始二维码获取待生成二维码并提取待融合二维码,其中,待生成二维码包括预设形状的待融合区域。Optionally, as shown in FIG. 9, an extraction module 303 is further included, configured to obtain the two-dimensional code to be generated according to the original two-dimensional code and extract the two-dimensional code to be fused, wherein the two-dimensional code to be generated includes a preset shape Fusion area.
可选地,生成模块301,具体配置成将二维码图像转换为与待融合区域匹配的形状,得到目标二维码图像。将目标二维码图像融合至待生成二维码的待融合区域,生成目标二维码。Optionally, the generating module 301 is specifically configured to convert the two-dimensional code image into a shape matching the region to be fused to obtain the target two-dimensional code image. The target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate the target two-dimensional code.
图10示出了本申请一实施例提供的二维码识别装置的结构示意图。FIG. 10 shows a schematic structural diagram of a two-dimensional code recognition device provided by an embodiment of the present application.
如图10所示,本申请还提供了一种二维码识别装置,包括:As shown in Figure 10, this application also provides a two-dimensional code recognition device, including:
获取模块401,配置成采集获取待识别图像,待识别图像包括目标二维码,目标二维码根据预设融合规则、二维码图像和/或待生成二维码生成,其中,二维码图像为预设图像和待融合二维码融合获取。识别模块402,配置成采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的标识信息。The acquiring module 401 is configured to collect and acquire an image to be recognized, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is generated according to a preset fusion rule, a two-dimensional code image, and/or a two-dimensional code to be generated, wherein the two-dimensional code The image is obtained by fusion of the preset image and the two-dimensional code to be fused. The recognition module 402 is configured to use a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the identification information of the image to be recognized.
可选地,待识别图像还包括:备选识别标识,备选识别标识与目标二维码均指示待识别图像的标识信息。识别模块402,还配置成识别获取待识别图像中的目标二维码和备选识别标识。Optionally, the image to be identified further includes: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified. The recognition module 402 is further configured to recognize and acquire the target two-dimensional code and the candidate recognition identifier in the image to be recognized.
可选地,识别模块402,具体配置成采用二维码识别算法,分别识别待融合二维码和待生成二维码,识别获取待识别图像的二维码信息。或者,若采用二维码识别算法,识别获取待识别图像的二维码信息失败,则采用备选识别标识对应的算法,识别获取备选识别标识。Optionally, the recognition module 402 is specifically configured to use a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the two-dimensional code information of the image to be recognized. Alternatively, if the two-dimensional code recognition algorithm is used to identify and obtain the two-dimensional code information of the image to be recognized, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
可选地,备选识别标识为字符串或标识码,其中,字符串包括下述一种或多种字符的组合:数字、字母和符号。Optionally, the candidate identification is a character string or an identification code, where the character string includes one or a combination of the following characters: numbers, letters, and symbols.
另外,上述模块可以经由有线连接或无线连接彼此连接或通信。有线连接可以包括金属线缆、光缆和/或混合线缆等,或其任意组合。无线连接可以包括通过局域网(Local Area Network,LAN)、广域网(Wide Area Network,WAN)、蓝牙、紫蜂协议(ZigBee)和/或近场通信(Near Field Communication,NFC)等形式的连接,或其任意组合。两个或更多个模块可以组合为单个模块,并且任何一个模块可以分成两个或更多个单元。In addition, the aforementioned modules may be connected or communicate with each other via a wired connection or a wireless connection. Wired connections may include metal cables, optical cables, and/or hybrid cables, etc., or any combination thereof. The wireless connection can include connections via local area network (LAN), wide area network (Wide Area Network, WAN), Bluetooth, ZigBee protocol (ZigBee) and/or near field communication (NFC), or Any combination of it. Two or more modules can be combined into a single module, and any one module can be divided into two or more units.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考方法实施例中的对应过程,本申请中不再赘述。在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device described above can refer to the corresponding process in the method embodiment, which will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division, and there may be other divisions in actual implementation. For example, multiple modules or components may be combined or integrated. To another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some communication interfaces, devices or modules, and may be in electrical, mechanical or other forms.
上述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
另一方面,图11示出了本申请一实施例提供的电子设备的结构示意图。On the other hand, FIG. 11 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
本申请提供了一种电子设备,如图11所示,包括:处理器501、计算机可读存储介质502和总线503,计算机可读存储介质502存储有处理器501可执行的机器可读指令,当电子设备运行时,处理器501与计算机可读存储介质502之间通过总线503通信,处理器501执行机器可读指令,以执行上述二维码生成方法的步骤。This application provides an electronic device, as shown in FIG. 11, comprising: a processor 501, a computer-readable storage medium 502, and a bus 503. The computer-readable storage medium 502 stores machine-readable instructions executable by the processor 501, When the electronic device is running, the processor 501 and the computer-readable storage medium 502 communicate through the bus 503, and the processor 501 executes machine-readable instructions to execute the steps of the above-mentioned two-dimensional code generation method.
仅作为举例,处理器501包括中央处理单元(Central Processing Unit,CPU)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用指令集处理器(Application Specific Instruction-set Processor,ASIP)、图形处理单元(Graphics Processing Unit,GPU)、物理处理单元(Physics Processing Unit,PPU)、数字信号处理器(Digital Signal Processor,DSP)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、可编程逻辑器件(Programmable Logic Device,PLD)、控制器、微控制器单元、简化指令集计算机(Reduced Instruction Set Computing,RISC)和/或微处理器等,或其任意组合。For example only, the processor 501 includes a central processing unit (Central Processing Unit, CPU), an Application Specific Integrated Circuit (ASIC), a dedicated instruction set processor (Application Specific Instruction-set Processor, ASIP), and a graphics processing unit. (Graphics Processing Unit, GPU), Physical Processing Unit (Physics Processing Unit, PPU), Digital Signal Processor (Digital Signal Processor, DSP), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), Programmable Logic Device ( Programmable Logic Device (PLD), controller, microcontroller unit, Reduced Instruction Set Computing (RISC) and/or microprocessor, etc., or any combination thereof.
电子设备可以是手机、平板电脑、穿戴设备和/或计算机等,但不以此为限。The electronic device may be a mobile phone, a tablet computer, a wearable device, and/or a computer, but is not limited to this.
以上电子设备都可以配置成实现本申请的二维码生成方法。本申请尽管仅示出了一个电子设备,但是可以在多个电子设备上以分布式方式实现本申请描述的功能,例如,通过第一电子设备获取二维码图像,并将二维码图像发送至第二设备,在第二电子设备上生成目标二维码。All of the above electronic devices can be configured to implement the QR code generation method of this application. Although only one electronic device is shown in this application, the functions described in this application can be implemented in a distributed manner on multiple electronic devices, for example, the first electronic device obtains a QR code image and sends the QR code image To the second device, the target two-dimensional code is generated on the second electronic device.
为了便于说明,在电子设备中仅描述了一个处理器501。然而,应当注意,本申请中的电子设备还可以包括多个处理器501,因此本申请中描述的一个处理器501执行的步骤也可以由多个处理器501联合执行或单独执行。For ease of description, only one processor 501 is described in the electronic device. However, it should be noted that the electronic device in this application may also include multiple processors 501, so the steps performed by one processor 501 described in this application may also be executed by multiple processors 501 jointly or individually.
本申请还提供了另一种电子设备,如图11所示,包括:处理器501、计算机可读存储介质502和总线503,计算机可读存储介质502存储有处理器501可执行的机器可读指令,当电子设备运行时,处理器501与计算机可读存储介质502之间通过总线503通信,处理器501执行机器可读指令,以执行上述二维码识别方法的步骤。This application also provides another electronic device, as shown in FIG. 11, including: a processor 501, a computer-readable storage medium 502, and a bus 503. The computer-readable storage medium 502 stores a machine readable executable by the processor 501 When the electronic device is running, the processor 501 communicates with the computer-readable storage medium 502 through the bus 503, and the processor 501 executes the machine-readable instruction to execute the steps of the above-mentioned two-dimensional code recognition method.
仅作为举例,处理器501包括CPU、ASIC、ASIP、GPU、PPU、DSP、FPGA、PLD、控制器、微控制器单元、RISC和/或微处理器等,或其任意组合。For example only, the processor 501 includes CPU, ASIC, ASIP, GPU, PPU, DSP, FPGA, PLD, controller, microcontroller unit, RISC and/or microprocessor, etc., or any combination thereof.
电子设备可以是手机、平板电脑、穿戴设备、具备二维码扫描和/或识别功能的计算机等,但不以此为限。The electronic device can be a mobile phone, a tablet computer, a wearable device, a computer with a QR code scanning and/or recognition function, but not limited to this.
以上电子设备都可以配置成实现本申请的二维码识别方法。本申请尽管仅示出了一个 电子设备,但是可以在多个电子设备上以分布式方式实现本申请描述的功能,例如,通过第一电子设备扫描二维码,并将二维码发送至第二设备,在第二电子设备上识别该二维码。All of the above electronic devices can be configured to implement the two-dimensional code recognition method of this application. Although this application only shows one electronic device, the functions described in this application can be implemented on multiple electronic devices in a distributed manner. For example, the first electronic device scans a QR code and sends the QR code to the first electronic device. The second device recognizes the QR code on the second electronic device.
为了便于说明,在电子设备中仅描述了一个处理器501。然而,应当注意,本申请中的电子设备还可以包括多个处理器501,因此本申请中描述的一个处理器501执行的步骤也可以由多个处理器501联合执行或单独执行。For ease of description, only one processor 501 is described in the electronic device. However, it should be noted that the electronic device in this application may also include multiple processors 501, so the steps performed by one processor 501 described in this application may also be executed by multiple processors 501 jointly or individually.
本申请还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如上述的二维码生成方法,或二维码识别方法的步骤。The present application also provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium. The computer program executes the steps of the above-mentioned two-dimensional code generation method or the two-dimensional code recognition method when the computer program is run by a processor .
计算机可读存储介质包括大容量存储器、可移动存储器、易失性读写存储器和/或只读存储器(Read-Only Memory,ROM)等,或其任意组合。作为举例,大容量存储器可以包括磁盘、光盘和/或固态驱动器等;可移动存储器可包括闪存驱动器、软盘、光盘、存储卡、软驱(zip)磁盘和/或磁带等;易失性读写存储器可以包括随机存取存储器(Random Access Memory,RAM);RAM可以包括动态RAM(Dynamic Random Access Memory,DRAM),双倍数据速率同步动态RAM(Double Date-Rate Synchronous RAM,DDR SDRAM);静态RAM(Static Random-Access Memory,SRAM),晶闸管RAM(Thyristor-Based Random Access Memory,T-RAM)和零电容器RAM(Zero-RAM)等。作为举例,ROM可以包括掩模ROM(Mask Read-Only Memory,MROM)、可编程ROM(Programmable Read-Only Memory,PROM)、可擦除可编程ROM(Programmable Erasable Read-only Memory,PEROM)、电可擦除可编程ROM(Electrically Erasable Programmable read only memory,EEPROM)、光盘ROM(CD-ROM)和/或数字通用磁盘ROM等,或其任意组合。The computer-readable storage medium includes mass memory, removable memory, volatile read-write memory and/or read-only memory (Read-Only Memory, ROM), etc., or any combination thereof. As an example, mass storage may include magnetic disks, optical disks, and/or solid-state drives, etc.; removable storage may include flash drives, floppy disks, optical disks, memory cards, zip disks and/or tapes, etc.; volatile read-write memory May include Random Access Memory (RAM); RAM may include Dynamic RAM (Dynamic Random Access Memory, DRAM), Double Date-Rate Synchronous RAM (DDR SDRAM); Static RAM ( Static Random-Access Memory, SRAM), Thyristor-Based Random Access Memory (T-RAM) and Zero-Capacitor RAM (Zero-RAM), etc. As an example, ROM may include mask ROM (Mask Read-Only Memory, MROM), programmable ROM (Programmable Read-Only Memory, PROM), erasable programmable ROM (Programmable Read-only Memory, PEROM), electronic Erasable programmable ROM (Electrically Erasable Programmable read only memory, EEPROM), compact disc ROM (CD-ROM) and/or digital universal disk ROM, etc., or any combination thereof.
以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and they should all be covered Within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (20)

  1. 一种二维码生成方法,其特征在于,包括:A method for generating a two-dimensional code, characterized in that it comprises:
    在预设图像上,添加待融合二维码,获取二维码图像;On the preset image, add a QR code to be fused to obtain a QR code image;
    根据预设融合规则、所述二维码图像和/或待生成二维码,生成目标二维码。According to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated, the target two-dimensional code is generated.
  2. 如权利要求1所述的方法,其特征在于,所述在预设图像上,添加待融合二维码,获取二维码图像,包括:The method according to claim 1, wherein the adding a two-dimensional code to be fused to a preset image to obtain a two-dimensional code image comprises:
    调整所述待融合二维码的像素点颜色,获取调整后的待融合二维码;Adjusting the pixel color of the two-dimensional code to be fused to obtain the adjusted two-dimensional code to be fused;
    将所述调整后的待融合二维码与所述预设图像叠加,获取所述二维码图像。Superimposing the adjusted two-dimensional code to be fused with the preset image to obtain the two-dimensional code image.
  3. 如权利要求2所述的方法,其特征在于,所述将所述调整后的待融合二维码与所述预设图像叠加,获取所述二维码图像,包括:The method of claim 2, wherein the superimposing the adjusted two-dimensional code to be fused with the preset image to obtain the two-dimensional code image comprises:
    将所述调整后的待融合二维码作为所述预设图像的一个涂层,获取所述二维码图像,其中,所述涂层中各像素点的颜色按照预设涂层规则与所述预设图像原始涂层对应位置像素点的色彩匹配。The adjusted two-dimensional code to be fused is used as a coating of the preset image to obtain the two-dimensional code image, wherein the color of each pixel in the coating is consistent with the preset coating rules. The color matching of pixels at corresponding positions of the original coating of the preset image.
  4. 如权利要求1所述的方法,其特征在于,所述在预设图像上,添加待融合二维码,获取二维码图像之前,还包括:The method according to claim 1, wherein the adding a two-dimensional code to be fused on the preset image, and before acquiring the two-dimensional code image, further comprises:
    根据原始二维码获取所述待生成二维码并提取所述待融合二维码,其中,待生成二维码包括预设形状的待融合区域。Obtain the two-dimensional code to be generated according to the original two-dimensional code and extract the two-dimensional code to be fused, wherein the two-dimensional code to be generated includes a region to be fused with a preset shape.
  5. 如权利要求4所述的方法,其特征在于,所述根据预设融合规则、所述二维码图像和/或待生成二维码,生成目标二维码,包括:The method according to claim 4, wherein said generating a target two-dimensional code according to preset fusion rules, said two-dimensional code image and/or to-be-generated two-dimensional code, comprises:
    将所述二维码图像转换为与所述待融合区域匹配的形状,得到目标二维码图像;Converting the two-dimensional code image into a shape matching the region to be fused to obtain a target two-dimensional code image;
    将所述目标二维码图像融合至所述待生成二维码的所述待融合区域,生成目标二维码。The target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate a target two-dimensional code.
  6. 一种二维码识别方法,其特征在于,包括:A two-dimensional code recognition method, which is characterized in that it comprises:
    采集获取待识别图像,所述待识别图像包括目标二维码,所述目标二维码根据预设融合规则、二维码图像和/或待生成二维码生成,其中,所述二维码图像为预设图像和待融合二维码融合获取;The image to be recognized is acquired, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is generated according to preset fusion rules, a two-dimensional code image, and/or a two-dimensional code to be generated, wherein the two-dimensional code The image is obtained by fusion of the preset image and the QR code to be fused;
    采用二维码识别算法,分别识别所述待融合二维码和所述待生成二维码,识别获取所述待识别图像的标识信息。The two-dimensional code recognition algorithm is used to identify the two-dimensional code to be fused and the two-dimensional code to be generated, and the identification information of the image to be recognized is recognized and acquired.
  7. 如权利要求6所述的方法,其特征在于,所述待识别图像还包括:备选识别标识,所述备选识别标识与所述目标二维码均指示所述待识别图像的标识信息;8. The method of claim 6, wherein the image to be recognized further comprises: an alternative identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified;
    所述采用二维码识别算法,分别识别所述待融合二维码和所述待生成二维码,获取所述目标二维码的二维码信息之前,还包括:Said using a two-dimensional code recognition algorithm to respectively identify the two-dimensional code to be fused and the two-dimensional code to be generated, and before acquiring the two-dimensional code information of the target two-dimensional code, further includes:
    识别获取所述待识别图像中的所述目标二维码和所述备选识别标识。Recognizing and acquiring the target two-dimensional code and the candidate identification identifier in the image to be recognized.
  8. 如权利要求7所述的方法,其特征在于,所述采用二维码识别算法,分别识别所述待融合二维码和所述待生成二维码,识别获取所述待识别图像的标识信息,包括:The method according to claim 7, wherein the two-dimensional code recognition algorithm is used to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and the identification information of the image to be recognized is obtained by recognition ,include:
    所述采用二维码识别算法,分别识别所述待融合二维码和所述待生成二维码,识别获取所述待识别图像的二维码信息;或者,The two-dimensional code recognition algorithm is used to identify the two-dimensional code to be fused and the two-dimensional code to be generated respectively, and to recognize and obtain the two-dimensional code information of the image to be recognized; or,
    若所述采用二维码识别算法,识别获取所述待识别图像的二维码信息失败,则采用所述备选识别标识对应的算法,识别获取所述备选识别标识。If the two-dimensional code recognition algorithm is used to identify and obtain the two-dimensional code information of the image to be recognized fails, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
  9. 如权利要求7所述的方法,其特征在于,所述备选识别标识为字符串或标识码,其中,所述字符串包括下述一种或多种字符的组合:数字、字母和符号。The method according to claim 7, wherein the candidate identification identifier is a character string or an identification code, wherein the character string includes a combination of one or more of the following characters: numbers, letters, and symbols.
  10. 一种二维码生成装置,其特征在于,包括:A two-dimensional code generating device, characterized by comprising:
    获取模块,配置成在预设图像上,添加待融合二维码,获取二维码图像;The acquisition module is configured to add a QR code to be fused on the preset image to obtain a QR code image;
    生成模块,配置成根据预设融合规则、所述二维码图像和/或待生成二维码,生成目标二维码。The generating module is configured to generate the target two-dimensional code according to the preset fusion rule, the two-dimensional code image and/or the two-dimensional code to be generated.
  11. 如权利要求10所述的装置,其特征在于,所述获取模块,具体配置成调整所述待融合二维码的像素点颜色,获取调整后的待融合二维码;The device according to claim 10, wherein the acquiring module is specifically configured to adjust the color of the pixels of the two-dimensional code to be fused to obtain the adjusted two-dimensional code to be fused;
    将所述调整后的待融合二维码与所述预设图像叠加,获取所述二维码图像。Superimposing the adjusted two-dimensional code to be fused with the preset image to obtain the two-dimensional code image.
  12. 如权利要求11所述的装置,其特征在于,所述获取模块,具体配置成将所述调整后的待融合二维码作为所述预设图像的一个涂层,获取所述二维码图像,其中,所述涂层中各像素点的颜色按照预设涂层规则与所述预设图像原始涂层对应位置像素点的色彩匹配。The device of claim 11, wherein the acquiring module is specifically configured to use the adjusted QR code to be fused as a coating of the preset image to acquire the two-dimensional code image , Wherein the color of each pixel in the coating is matched with the color of the pixel at the corresponding position of the original coating of the preset image according to a preset coating rule.
  13. 如权利要求10所述的装置,其特征在于,还包括提取模块,配置成根据原始二维码获取所述待生成二维码、并提取所述待融合二维码,其中,待生成二维码包括预设形状的待融合区域。The device of claim 10, further comprising an extraction module configured to obtain the two-dimensional code to be generated according to the original two-dimensional code and extract the two-dimensional code to be fused, wherein the two-dimensional code to be generated is The code includes a region to be blended in a preset shape.
  14. 如权利要求13所述的装置,其特征在于,所述生成模块,具体配置成将所述二维码图像转换为与所述待融合区域匹配的形状,得到目标二维码图像;The device according to claim 13, wherein the generating module is specifically configured to convert the two-dimensional code image into a shape matching the region to be fused to obtain a target two-dimensional code image;
    将所述目标二维码图像融合至所述待生成二维码的所述待融合区域,生成目标二维码。The target two-dimensional code image is fused to the to-be-fused area of the two-dimensional code to be generated to generate a target two-dimensional code.
  15. 一种二维码识别装置,其特征在于,包括:A two-dimensional code recognition device, characterized in that it comprises:
    获取模块,配置成采集获取待识别图像,所述待识别图像包括目标二维码,所述目标二维码根据预设融合规则、二维码图像和/或待生成二维码生成,其中,所述二维码图像为预设图像和待融合二维码融合获取;The acquisition module is configured to collect and acquire an image to be recognized, the image to be recognized includes a target two-dimensional code, and the target two-dimensional code is generated according to a preset fusion rule, a two-dimensional code image, and/or a two-dimensional code to be generated, wherein, The two-dimensional code image is obtained by fusion of a preset image and a two-dimensional code to be fused;
    识别模块,配置成采用二维码识别算法,分别识别所述待融合二维码和所述待生成二维码,识别获取所述待识别图像的标识信息。The recognition module is configured to use a two-dimensional code recognition algorithm to respectively recognize the two-dimensional code to be fused and the two-dimensional code to be generated, and to recognize and obtain the identification information of the image to be recognized.
  16. 如权利要求15所述的装置,其特征在于,所述待识别图像还包括:备选识别标识,所述备选识别标识与所述目标二维码均指示所述待识别图像的标识信息;The device according to claim 15, wherein the image to be recognized further comprises: a candidate identification mark, and both the candidate identification mark and the target two-dimensional code indicate identification information of the image to be identified;
    所述识别模块,还配置成识别获取所述待识别图像中的所述目标二维码和所述备选识别标识。The recognition module is further configured to recognize and obtain the target two-dimensional code and the candidate recognition identifier in the image to be recognized.
  17. 如权利要求16所述的装置,其特征在于,所述识别模块,具体配置成所述采用二维码识别算法,分别识别所述待融合二维码和所述待生成二维码,识别获取所述待识别图像的二维码信息;或者,The device according to claim 16, wherein the identification module is specifically configured to use the two-dimensional code identification algorithm to identify the two-dimensional code to be fused and the two-dimensional code to be generated, respectively, and obtain The two-dimensional code information of the image to be recognized; or,
    若所述采用二维码识别算法,识别获取所述待识别图像的二维码信息失败,则采用所述备选识别标识对应的算法,识别获取所述备选识别标识。If the two-dimensional code recognition algorithm is used to identify and obtain the two-dimensional code information of the image to be recognized fails, the algorithm corresponding to the candidate identification mark is used to identify and obtain the candidate identification mark.
  18. 如权利要求17所述的装置,其特征在于,所述备选识别标识为字符串或标识码,其中,所述字符串包括下述一种或多种字符的组合:数字、字母和符号。The device according to claim 17, wherein the candidate identification identifier is a character string or an identification code, wherein the character string includes a combination of one or more of the following characters: numbers, letters, and symbols.
  19. 一种电子设备,其特征在于,包括:处理器、存储介质和总线,所述存储介质存储有所述处理器能执行的机器可读指令,当电子设备运行时,所述处理器与所述存储介质之间通过总线通信,所述处理器执行所述机器可读指令,以执行时执行如权利要求1-5任一项所述的二维码生成方法或者如权利要求6-9任一项所述的二维码识别方法。An electronic device, characterized by comprising: a processor, a storage medium and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the bus The storage media communicate through a bus, and the processor executes the machine-readable instructions to execute the QR code generation method according to any one of claims 1-5 or any one of claims 6-9 when executed. The two-dimensional code recognition method described in item.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行以在执行时执行如权利要求1-5任一项所述的二维码生成方法或者如权利要求6-9任一项所述的二维码识别方法的步骤。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and the computer program is executed when a processor is running to execute as described in any one of claims 1-5 when executed. The steps of the two-dimensional code generation method or the two-dimensional code recognition method according to any one of claims 6-9.
PCT/CN2020/074167 2019-01-31 2020-02-02 Two-dimensional code generation and recognition methods and devices WO2020156552A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910100803.7A CN111507446B (en) 2019-01-31 2019-01-31 Two-dimensional code generation and identification method and device
CN201910100803.7 2019-01-31

Publications (1)

Publication Number Publication Date
WO2020156552A1 true WO2020156552A1 (en) 2020-08-06

Family

ID=71841656

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/074167 WO2020156552A1 (en) 2019-01-31 2020-02-02 Two-dimensional code generation and recognition methods and devices

Country Status (2)

Country Link
CN (1) CN111507446B (en)
WO (1) WO2020156552A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951329A (en) * 2020-08-14 2020-11-17 汉海信息技术(上海)有限公司 Two-dimensional code identification method, device, equipment and storage medium
CN112070195A (en) * 2020-09-22 2020-12-11 澳新银行营运服务(成都)有限公司 Two-dimensional code identification and generation method and device, electronic equipment and storage medium
CN112199181A (en) * 2020-10-23 2021-01-08 劢微机器人科技(深圳)有限公司 Information interaction system and method based on two-dimensional code
CN113110778A (en) * 2021-04-20 2021-07-13 树根互联股份有限公司 Graphical interface display method, terminal, readable storage medium and electronic equipment
CN113962240A (en) * 2021-10-12 2022-01-21 北京百度网讯科技有限公司 Picture processing method and device, electronic equipment and storage medium
CN114091639A (en) * 2021-11-26 2022-02-25 北京奇艺世纪科技有限公司 Interactive expression generation method and device, electronic equipment and storage medium
CN114996766A (en) * 2022-08-01 2022-09-02 江西财经大学 Image sharing method and system based on two-dimension code social network and storage medium
CN116048323A (en) * 2022-05-27 2023-05-02 荣耀终端有限公司 Image processing method and electronic equipment
CN117057384A (en) * 2023-08-15 2023-11-14 厦门中盾安信科技有限公司 User code string generation method, medium and device supporting multi-type business handling
CN111951329B (en) * 2020-08-14 2024-04-19 汉海信息技术(上海)有限公司 Two-dimensional code identification method, device, equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11429804B2 (en) 2020-09-18 2022-08-30 Google Llc Platform for registering and processing visual encodings
CN112560530B (en) * 2020-12-07 2024-02-23 北京三快在线科技有限公司 Two-dimensional code processing method, device, medium and electronic device
CN112686355B (en) * 2021-01-12 2024-01-05 树根互联股份有限公司 Image processing method and device, electronic equipment and readable storage medium
CN112926714B (en) * 2021-03-16 2022-09-16 北京航空航天大学 Visual three-dimensional code integrating QR code, bar code and optical character and coding method thereof
CN113505773B (en) * 2021-07-06 2024-03-05 树蛙信息科技(南京)有限公司 Two-dimensional code identification method and device
CN114819025B (en) * 2022-06-28 2022-09-13 深圳市国人光速科技有限公司 Ink jet image generating method and device containing multiple variable information and computer

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103854045A (en) * 2014-02-26 2014-06-11 崔越 Two-dimension code and forming method and system thereof
CN103886628A (en) * 2014-03-10 2014-06-25 百度在线网络技术(北京)有限公司 Two-dimension code image generating method and device
US20160164991A1 (en) * 2014-01-03 2016-06-09 Tencent Technology (Shenzhen) Company Limited Information push method, server, user terminal and system
CN106599965A (en) * 2016-11-25 2017-04-26 北京矩石科技有限公司 Method and device for making image cartoony and fusing image with 2D code
CN109255634A (en) * 2018-09-07 2019-01-22 昆明盛策同辉数字科技有限责任公司 Merge method for anti-counterfeit, device, storage medium and the equipment of AR and two dimensional code

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150008257A1 (en) * 2012-10-09 2015-01-08 Robert Beadles Display card with memory tag- hybrid multidimensional bar text code
CN103886548B (en) * 2013-07-04 2017-09-15 百度在线网络技术(北京)有限公司 It is a kind of to be used for the method and apparatus of Quick Response Code and image co-registration
CN106599960A (en) * 2015-10-14 2017-04-26 上海易溯信息科技有限公司 Multifunctional combined type label, and manufacturing equipment and method thereof
CN106408066A (en) * 2016-09-06 2017-02-15 北京三快在线科技有限公司 Two-dimensional code-based image processing method, device and two-dimensional code
CN106778995B (en) * 2016-11-25 2020-02-28 北京矩石科技有限公司 Artistic two-dimensional code generation method and device fused with image
CN107563966A (en) * 2017-08-01 2018-01-09 北京诺君安信息技术股份有限公司 A kind of Quick Response Code and image interfusion method and Quick Response Code

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160164991A1 (en) * 2014-01-03 2016-06-09 Tencent Technology (Shenzhen) Company Limited Information push method, server, user terminal and system
CN103854045A (en) * 2014-02-26 2014-06-11 崔越 Two-dimension code and forming method and system thereof
CN103886628A (en) * 2014-03-10 2014-06-25 百度在线网络技术(北京)有限公司 Two-dimension code image generating method and device
CN106599965A (en) * 2016-11-25 2017-04-26 北京矩石科技有限公司 Method and device for making image cartoony and fusing image with 2D code
CN109255634A (en) * 2018-09-07 2019-01-22 昆明盛策同辉数字科技有限责任公司 Merge method for anti-counterfeit, device, storage medium and the equipment of AR and two dimensional code

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951329A (en) * 2020-08-14 2020-11-17 汉海信息技术(上海)有限公司 Two-dimensional code identification method, device, equipment and storage medium
CN111951329B (en) * 2020-08-14 2024-04-19 汉海信息技术(上海)有限公司 Two-dimensional code identification method, device, equipment and storage medium
CN112070195A (en) * 2020-09-22 2020-12-11 澳新银行营运服务(成都)有限公司 Two-dimensional code identification and generation method and device, electronic equipment and storage medium
CN112199181A (en) * 2020-10-23 2021-01-08 劢微机器人科技(深圳)有限公司 Information interaction system and method based on two-dimensional code
CN113110778A (en) * 2021-04-20 2021-07-13 树根互联股份有限公司 Graphical interface display method, terminal, readable storage medium and electronic equipment
CN113962240A (en) * 2021-10-12 2022-01-21 北京百度网讯科技有限公司 Picture processing method and device, electronic equipment and storage medium
CN113962240B (en) * 2021-10-12 2023-09-15 北京百度网讯科技有限公司 Picture processing method, device, electronic equipment and storage medium
CN114091639A (en) * 2021-11-26 2022-02-25 北京奇艺世纪科技有限公司 Interactive expression generation method and device, electronic equipment and storage medium
CN116048323A (en) * 2022-05-27 2023-05-02 荣耀终端有限公司 Image processing method and electronic equipment
CN116048323B (en) * 2022-05-27 2023-11-24 荣耀终端有限公司 Image processing method and electronic equipment
CN114996766A (en) * 2022-08-01 2022-09-02 江西财经大学 Image sharing method and system based on two-dimension code social network and storage medium
CN117057384A (en) * 2023-08-15 2023-11-14 厦门中盾安信科技有限公司 User code string generation method, medium and device supporting multi-type business handling

Also Published As

Publication number Publication date
CN111507446B (en) 2022-03-04
CN111507446A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
WO2020156552A1 (en) Two-dimensional code generation and recognition methods and devices
US10121099B2 (en) Information processing method and system
JP4557866B2 (en) Mixed code, mixed code generation method and apparatus, and recording medium
US11797810B2 (en) Machine-readable label generator
JP7381775B2 (en) Unique identifier based on signature
WO2021114837A1 (en) Graphic code recognizing method and device
US8254721B2 (en) Data input system, data input receiving device, data input receiving method and computer readable medium
KR20170131669A (en) Method and apparatus for generating composite image
US20140368542A1 (en) Image processing apparatus, image processing method, program, print medium, and print-media set
JP2011135556A (en) Method of generating display object, digital media providing system, computer program therefor and display object
CN105718979B (en) A method of generating two-dimension code image
CN106844302B (en) Electronic book page display method and device and terminal equipment
JP2010279038A (en) Method and system for electronic image real-time personalization
Bulatovich et al. MIDV-2020: a comprehensive benchmark dataset for identity document analysis
CN105718980B (en) A method of generating two-dimension code image
JP6795195B2 (en) Character type estimation system, character type estimation method, and character type estimation program
CN111862205A (en) Visual positioning method, device, equipment and storage medium
US11373351B2 (en) Image processing method, program, and image processing system
CN111242124A (en) Certificate classification method, device and equipment
US20200218772A1 (en) Method and apparatus for dynamically identifying a user of an account for posting images
KR20170101125A (en) Information processing apparatus, information processing method, and storage medium
CN107122785B (en) Text recognition model establishing method and device
US9818028B2 (en) Information processing apparatus for obtaining a degree of similarity between elements
EP3316173B1 (en) System and method for cheque image data masking
JP2017212575A (en) Image reading device and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20748696

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20748696

Country of ref document: EP

Kind code of ref document: A1