WO2019192061A1 - Method, device, computer readable storage medium for identifying and generating graphic code - Google Patents

Method, device, computer readable storage medium for identifying and generating graphic code Download PDF

Info

Publication number
WO2019192061A1
WO2019192061A1 PCT/CN2018/087873 CN2018087873W WO2019192061A1 WO 2019192061 A1 WO2019192061 A1 WO 2019192061A1 CN 2018087873 W CN2018087873 W CN 2018087873W WO 2019192061 A1 WO2019192061 A1 WO 2019192061A1
Authority
WO
WIPO (PCT)
Prior art keywords
circle
graphic code
positioning
reference line
icon
Prior art date
Application number
PCT/CN2018/087873
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 WO2019192061A1 publication Critical patent/WO2019192061A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • G06K19/06103Constructional details the marking being embedded in a human recognizable image, e.g. a company logo with an embedded two-dimensional code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code

Definitions

  • the present disclosure relates to the field of graphic codes, and in particular, to a method, an apparatus, and a computer readable storage medium for identifying a graphic code.
  • graphic codes such as one-dimensional codes and two-dimensional codes can be seen everywhere.
  • the graphic code often carries certain data information, such as the price information, classification and attributes of the commodity in the one-dimensional code of the commodity; the graphic code of the Internet product carries the corresponding jump link.
  • the graphic code needs to be identified.
  • the graphic code in the related art is usually a one-dimensional code or a two-dimensional code, so that the form of the graphic code is relatively simple. Since the form of the graphic code is relatively simple, the same form of the graphic code is used in most fields. For example, the current two-dimensional code is applied to all fields that need to use the graphic code to carry the data information. Most fields use the same form of graphics code. Although the graphics code is universal, a single form of graphics code is likely to cause visual fatigue to the user, which tends to cause less attention to the data information carried in the graphics code.
  • the embodiments of the present disclosure provide a method, a device, and a computer readable storage medium for recognizing and generating a graphic code, so as to solve the single form of the graphic code in the related art, which may easily cause attention to the data information carried in the graphic code.
  • High technical issues. The technical solution is as follows:
  • a method for identifying a graphic code comprising:
  • the graphic code further includes at least one positioning icon, where identifying a position of the reference line in the graphic code in the target image, including:
  • a position of a reference line in the graphic code is determined based on a location of the at least one positioning icon.
  • the positioning icon includes a first positioning circle and a second positioning circle having a preset relative positional relationship, where the position of the at least one positioning icon includes a center position of the first positioning circle and the second Position the center of the circle.
  • identifying a location of the at least one positioning icon in the graphic code including:
  • a circle closest to the first positioning circle is identified as a second positioning circle in the graphic code.
  • the reference icon is a reference circle
  • the second positioning circle has the same diameter as the reference circle
  • the graphic code comprises a plurality of reference lines arranged in parallel and equally spaced, in the graphic code The distance between the diameter of the reference circle and the adjacent reference line satisfies a preset ratio
  • Determining a position of the reference line in the graphic code based on a location of the at least one positioning icon including:
  • identifying a location of the reference line in the graphic code including:
  • the position of the reference line in the graphic code is identified in the target image.
  • the reference icon is a reference circle
  • the position of the reference icon is a center position of the reference circle
  • the reference icon is determined according to the position of the reference line and the position of the plurality of reference icons.
  • Relative position information of the reference line includes:
  • Determining identification information of a reference line where a center of the first type of reference circle is located, according to a position of the reference line and a center position of the plurality of reference circles, for a first type of reference circle whose center is on a reference line Determining relative position information of the first type of reference circle and the reference line, and determining, for a second type of reference circle whose center is not on the reference line, two reference lines closest to the center distance of the second type of reference circle, The identification information of the auxiliary reference line in the middle of the two reference lines closest to the center distance of the second type of reference circle is used as the relative position information of the second type of reference circle and the reference line.
  • a method for generating a graphics code comprising:
  • the graphic code includes at least one reference line
  • the graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying a preset relative positional relationship with the reference line;
  • the graphic code carries data information, and the graphic code is identified for obtaining the data information.
  • the graphic code further includes at least one positioning icon, wherein the positioning icon is used to locate the reference line in the process of identifying the graphic code.
  • the at least one positioning icon comprises a first positioning circle and a second positioning circle.
  • the reference icon is a reference circle
  • the second positioning circle has the same diameter as the reference circle.
  • the graphic code comprises a plurality of mutually parallel and equally spaced reference lines, wherein a distance between the diameter of the reference circle and an adjacent reference line in the graphic code satisfies a preset ratio.
  • the center of the first positioning circle is on any reference line
  • the center of the second positioning circle and the center of the reference circle are respectively on the auxiliary reference line between any two adjacent reference lines.
  • a device for identifying a graphic code comprising a plurality of reference icons, the device comprising:
  • a first identification module configured to identify a position of a reference line in the graphic code in the target image
  • a second identification module configured to identify a location of the plurality of reference icons in the graphic code
  • a first determining module configured to determine relative position information of each reference icon and the reference line according to a position of the reference line and a position of the plurality of reference icons
  • a second determining module configured to determine, according to the relative position information of each of the reference icons and the reference line, an encoded character string corresponding to the graphic code.
  • the graphic code further includes at least one positioning icon, where the first identification module includes:
  • An identifying unit configured to identify, in the target image, a location of at least one positioning icon in the graphic code
  • a determining unit configured to determine a position of a reference line in the graphic code based on a location of the at least one positioning icon.
  • the positioning icon includes a first positioning circle and a second positioning circle having a preset relative positional relationship, where the position of the at least one positioning icon includes a center position of the first positioning circle and the second Position the center of the circle.
  • the identifying unit includes:
  • a first identifying subunit configured to identify a first positioning circle in the graphic code in the target image based on a preset radius range
  • a second identification subunit configured to identify, in the target image, a circle closest to the first positioning circle as a second positioning circle in the graphic code.
  • the reference icon is a reference circle
  • the second positioning circle has the same diameter as the reference circle
  • the graphic code comprises a plurality of reference lines arranged in parallel and equally spaced, in the graphic code The distance between the diameter of the reference circle and the adjacent reference line satisfies a preset ratio
  • the determining unit is configured to: determine, according to a center position of the first positioning circle, a center position of the second positioning circle, a diameter of the second positioning circle in the target image, and the preset ratio The position of the reference line in the graphic code.
  • the first identification module is configured to: identify, according to a line recognition algorithm, a position of a reference line in the graphic code in the target image.
  • the reference icon is a reference circle
  • the location of the reference icon is a center position of the reference circle
  • the first determining module is configured to:
  • Determining identification information of a reference line where a center of the first type of reference circle is located, according to a position of the reference line and a center position of the plurality of reference circles, for a first type of reference circle whose center is on a reference line Determining relative position information of the first type of reference circle and the reference line, and determining, for a second type of reference circle whose center is not on the reference line, two reference lines closest to the center distance of the second type of reference circle, The identification information of the auxiliary reference line in the middle of the two reference lines closest to the center distance of the second type of reference circle is used as the relative position information of the second type of reference circle and the reference line.
  • a fourth aspect provides a device for generating a graphic code, the device for generating a graphic code
  • the graphic code includes at least one reference line
  • the graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying a preset relative positional relationship with the reference line;
  • the graphic code carries data information, and the graphic code is identified for obtaining the data information.
  • the graphic code further includes at least one positioning icon, wherein the positioning icon is used to locate the reference line in the process of identifying the graphic code.
  • the at least one positioning icon comprises a first positioning circle and a second positioning circle.
  • the reference icon is a reference circle
  • the second positioning circle has the same diameter as the reference circle.
  • the graphic code comprises a plurality of mutually parallel and equally spaced reference lines, wherein a distance between the diameter of the reference circle and an adjacent reference line in the graphic code satisfies a preset ratio.
  • the center of the first positioning circle is on any reference line
  • the center of the second positioning circle and the center of the reference circle are respectively assisted on any reference line or in the middle of any two adjacent reference lines. Reference line.
  • a device for identifying a graphic code comprising:
  • a memory for storing processor executable instructions
  • the processor is configured to perform the step of the method of identifying the graphic code according to the first aspect.
  • a sixth aspect provides a device for generating a graphic code, the device comprising:
  • a memory for storing processor executable instructions
  • the processor is configured to perform the steps of the method for generating a graphic code according to the second aspect.
  • a computer readable storage medium having instructions stored thereon, the instructions being executed by a processor to implement the steps of the method of identifying a graphic code of the first aspect.
  • a computer readable storage medium having instructions stored thereon, the instructions being executed by a processor to implement the steps of the method of generating a graphics code according to the second aspect.
  • a graphic code including a plurality of reference icons By setting a graphic code including a plurality of reference icons, a novel graphic code different in form from a barcode or a two-dimensional code is provided, thereby not only enriching the form of the graphic code, but also carrying the data information through the graphic code can attract the public eye, thereby It can improve the attention of the data information carried by the graphic code.
  • the graphic code By setting the graphic code to include a plurality of reference icons, the graphic code can adjust the number of reference icons according to the number of data information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
  • FIG. 1 is a schematic diagram of a graphic code provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of another graphic code provided by an embodiment of the present disclosure.
  • FIG. 3 is a flowchart of a method for identifying a graphic code according to an embodiment of the present disclosure
  • FIG. 4A is a schematic diagram of still another graphic code provided by an embodiment of the present disclosure.
  • FIG. 4B is a schematic diagram of still another graphic code provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of an application scenario of a graphic code according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a device for identifying a graphic code according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of a terminal for identifying a graphic code according to an embodiment of the present disclosure
  • FIG. 8 is a schematic structural diagram of a terminal for generating a graphic code according to an embodiment of the present disclosure.
  • Embodiments of the present disclosure provide a graphics code including a plurality of reference icons and at least one reference line.
  • the graphic code includes a plurality of reference lines
  • the reference lines are arranged parallel to each other and equally spaced.
  • the reference line is used to locate the position of the reference icon. Therefore, these reference lines can be straight lines actually existing in the graphic code, that is, the reference lines are displayed in the graphic code together with the reference icons, as shown in FIG. 1; these reference lines can also be
  • the logic line is only used to locate the position of the reference icon, that is, the reference line is not displayed in the graphic code. As shown in FIG. 2, the broken line in FIG. 2 indicates the reference line, which is not displayed in the graphic code.
  • the shape of the reference icon may be determined according to the application of the graphic code. In the specific implementation, the shape of the reference icon may be a circle, an equilateral triangle, or the like.
  • the data code carries the data information.
  • the embodiment of the present disclosure provides a method for identifying a graphic code, which can be implemented by a terminal having a graphic code recognition function.
  • the specific implementation method of the identification method of the graphic code is as follows:
  • FIG. 3 is a flowchart of a method for identifying a graphic code according to an embodiment of the present disclosure. As shown in FIG. 3, the method for identifying the graphic code includes the following steps:
  • the target image may be a pre-stored image to be recognized in the terminal gallery, or may be a to-be-identified image currently captured by the camera of the terminal, or may be a to-be-identified image currently being scanned by the terminal.
  • the terminal since the terminal directly scans a whole picture to be recognized, the running memory may be required to be relatively large, resulting in a relatively slow recognition rate.
  • the picture to be identified when the picture to be identified is identified, the picture to be identified may be divided into blocks, such as dividing the picture to be identified into a plurality of rectangles, and identifying each rectangle. Therefore, the target image may also be any one of a plurality of rectangular images into which one picture to be recognized is divided.
  • the rectangular image obtained by the segmentation includes the complete graphic code
  • the picture to be recognized when the picture to be recognized is divided into a plurality of rectangular images, it can be implemented according to the pixel size of the terminal camera and the length ratio of the commonly set graphic code. For example, if the pixel size of the terminal camera is 1000*1000, and the aspect ratio of the graphic code is 10:1, when the rectangular image is divided, the image to be recognized can be divided into a size from bottom to top or top to bottom. Ten rectangular images of 1000*120.
  • the target image may be denoised to achieve the effect of improving the recognition rate.
  • denoising processing including but limited to processing the target image by a corrosion expansion algorithm.
  • the embodiments of the present disclosure are not specifically limited.
  • the shape of the reference icon can be determined according to factors such as the application of the graphic code or the type of data information carried. For example, if the graphic code is applied to the music field, the shape of the reference icon may be a note shape or the like, thereby achieving the purpose of vividly representing the application scene.
  • the number of reference icons can be determined based on the amount of information that needs to be expressed. For example, when the graphic code includes 10 reference icons, the relative position information of each reference icon and the reference line is 9, and the state of each reference icon includes solid and hollow, the amount of information that the graphic code can carry is 1810. . Information about the relative position of the reference icon and the reference line will be explained in the following content, which will not be described here.
  • the graphic code provided by the embodiment of the present disclosure includes 8-16 reference icons.
  • the position of the reference line in the graphic code includes but is not limited to being identified by a straight line equation of the reference line. That is, identifying the position of the reference line in the graphic code is a linear equation for determining the reference line in the graphic code.
  • the step S2 identifies, in the target image, the position of the reference line in the graphic code, including but not limited to the following two ways:
  • the graphic code includes at least one positioning icon in addition to the reference line and the plurality of reference icons, and the positioning icon is used to locate the position of the reference line.
  • the position of the at least one positioning icon in the graphic code may be first identified; then, the position of the reference line in the graphic code is determined based on the position of the at least one positioning icon.
  • the number of positioning icons may be one, two or three, and the like.
  • the shape of the positioning icon can be various, such as the shape of the positioning icon is a regular hexagon, a circle or a square.
  • the shape of the positioning icon may be the same as or different from the shape of the reference icon.
  • the manner of identifying the position of the reference line in the graphic code may include at least the following three cases.
  • the positioning icon may be preset to have a distinct feature with respect to the reference icon, such as the size of the positioning icon being different from the size of the reference icon or the shape of the positioning icon being different from the shape of the reference icon.
  • the embodiment of the present disclosure may preset the positioning icon to include two feature patterns associated with the reference line. For example, the positioning icon is internally provided with two circles and the centers of the two circles are located on one of the plurality of reference lines.
  • the positioning icon is a large circle that is significantly larger than the rest of the reference icons
  • the positioning icon is internally provided with two characteristic small circles, and the center of the preset two characteristic small circles is located in the plurality of reference lines from top to bottom.
  • the position of the positioning icon can be the center position of the small circle of the two features.
  • the position of the large circle in the graphic code may be first recognized; then, the center position of the two characteristic small circles is found in the large circle; The position of the center of the feature small circle determines the position of the third reference line; finally, the position of the other reference lines other than the third reference line in the graphic code is determined according to the characteristics of the equally spaced distribution of the reference line.
  • the number of positioning icons is two.
  • the two positioning icons may be preset to have a significant difference, and the two positioning icons have a preset relative positional relationship.
  • the preset relative positional relationship may be an association relationship between the feature points in the two positioning icons and a certain reference line.
  • both positioning icons are circular, and their diameters are different, their centers are their feature points, and the centers of the two circles are located on a certain reference line.
  • the positioning icon in the case includes a first positioning circle and a second positioning circle having a preset relative positional relationship, and the diameters of the first positioning circle and the second positioning circle are different.
  • the position of the positioning icon may be the center position of the first positioning circle and the center position of the second positioning circle.
  • the preset relative positional relationship includes: a center of the first positioning circle is located on the first preset reference line and a center of the second positioning circle is located on the second preset reference line.
  • the first preset reference line and the second preset reference line may be the same or different.
  • the centers of the first positioning circle and the second positioning circle are located on the same reference line, according to the center position of the first positioning circle and the second positioning circle
  • the position of the center of the circle determines the position of the reference line in which they are located, and the position of the other reference lines is determined based on features that are parallel and equally spaced between the reference lines.
  • the positions of the reference lines where the centers of the first positioning circle and the second positioning circle are located may be preset, such as preset the first preset reference line as a reference.
  • the third reference line in the line, the second preset reference line is preset as the fourth reference line in the reference line.
  • the positions of the first predetermined reference line and the second preset reference line are respectively determined according to the positions of the center of the first positioning circle and the center of the second positioning circle, and are parallel and equally spaced according to the reference lines. The characteristics of the distribution determine the location of other reference lines.
  • the first positioning circle and the second positioning circle need to be identified first.
  • the embodiment of the present disclosure first identifies one of the positioning circles, and then identifies another one according to the preset relative positional relationship. If the first positioning circle is first identified, the second positioning circle is identified.
  • the first positioning circle is first identified as an example.
  • the radius of the first positioning circle may be preset, that is, the radius of the first positioning circle falls within the preset radius regardless of the distance of the terminal scanning code.
  • the first positioning circle in the graphic code may be identified in the target image based on the preset radius range of the first positioning circle. Then, the second positioning circle is identified in the target image.
  • the relative positional relationship between the first positioning circle and the second positioning circle is implemented.
  • the preset relative position relationship further sets the second positioning circle to be the circle closest to the first positioning circle
  • the circle closest to the first positioning circle may be identified, and the circle closest to the first positioning circle may be identified.
  • the second positioning circle in the graphic code Specifically, when identifying a circle closest to the first positioning circle, the circle and the corresponding center in the graphic code may be first identified, and then the center of the circle and the center of the first positioning circle are searched from the identified circle. The smallest circle from the distance, as the second positioning circle.
  • the first positioning circle may be in the target image.
  • a circle whose center is on the same reference line as the center of the first positioning circle is identified, and a circle whose center is on the same reference line as the center of the first positioning circle is used as the second positioning circle.
  • the second positioning circle may be identified by other corresponding manners, which is not enumerated in this embodiment.
  • the relative positional relationship between the first positioning circle and the second positioning circle in the horizontal direction may be defined in the preset relative position relationship
  • the second positioning circle is defined in the preset relative position relationship.
  • One is positioned to the right of the circle.
  • the scanning direction of the terminal when the scanning direction of the terminal is determined, the scanning direction of the identification is avoided, for example, when the second positioning circle is located on the side of the first positioning circle, if the second positioning circle is located on the other side of the first positioning circle.
  • the position icon and the second positioning circle are the same in shape and size, the direction of the scanned code may be wrong. Therefore, it should be ensured that the reference icon is significantly different from the second positioning circle, such as a different shape.
  • the reference icon when the reference icon is the reference circle, it should be ensured that the reference circle is different from the diameter of the second positioning circle.
  • Case 3 The number of positioning icons is three.
  • the case where the three positioning icons are all circular is introduced in the case that the positioning icon includes the first positioning circle and the second positioning circle, in addition to the second positioning case.
  • the third positioning circle is further included, and the center of the third positioning circle is preset to have a relative positional relationship with the center of the first positioning circle in the vertical direction.
  • the center of the third positioning circle is preset on the reference line above the reference line of the center of the first positioning circle, thereby defining the relationship between the center of the third positioning circle and the center of the first positioning circle in the vertical direction.
  • the terminal can determine whether to recognize the graphic code in the forward direction or to recognize the graphic code in the reverse direction.
  • the terminal may be determined that the terminal is currently scanning in the forward direction. Graphic code. Conversely, it can be determined that the terminal is currently scanning the graphics code in reverse.
  • the positioning icon includes a first positioning circle, a second positioning circle, and a third positioning circle
  • the second positioning circle and the third positioning circle have the same radius and are smaller than the first positioning circle.
  • a radius, and the second positioning circle and the third positioning circle are respectively located on two sides of the first positioning circle
  • the center of the first positioning circle and the center of the second positioning circle are located on the same reference line
  • the center of the third positioning circle is located at the first positioning
  • the center of the circle is on the reference line above the reference line.
  • the first positioning circle is identified according to the radius of the first positioning circle; then, a circle having a circle center and a center of the first positioning circle is found in a circle on both sides of the first positioning circle as a circle a second positioning circle, the circle on the other side of the first positioning circle is used as a third positioning circle; next, determining the position of the reference line where the first reference circle is located according to the center of the first positioning circle and the center of the second positioning circle, and according to Positions of reference lines where the center of the first positioning circle and the second positioning circle are located and positions of other reference lines are determined according to mutually parallel and equally spaced features between the reference lines; finally, according to the center of the first positioning circle and the third The positional relationship of the center of the positioning circle in the vertical direction determines the scanning direction of the terminal.
  • the size of the preset positioning icons needs to be preset.
  • the spacing between the reference lines is different when the scanning distance is different, in order to accurately determine the positions of the other reference lines according to the features of the parallel and equally spaced distribution between the reference lines, the size of the preset positioning icons needs to be preset.
  • the size of the positioning icon in the target image can be obtained, and the target image is determined according to the ratio between the size of the positioning icon in the target image and the preset positioning icon size and the reference line spacing.
  • the spacing between adjacent reference lines to determine the line equations of the other reference lines based on the determined line equation of one of the reference lines and the spacing between adjacent reference lines in the target image.
  • the ratio of the diameter of the first positioning circle to the spacing of adjacent reference lines may be preset to a fixed value.
  • the diameter of the first positioning circle in the target image may be obtained first, and according to the diameter of the first positioning circle in the target image and the diameter of the preset first positioning circle.
  • the reference icon is also a circle, that is, the reference icon is a reference circle.
  • the graphic code includes a first positioning circle, a second positioning circle, a plurality of reference circles, and a plurality of reference lines arranged parallel to each other and equally spaced, the diameter of the first positioning circle being larger than the second positioning circle.
  • the diameter, and the second positioning circle has the same diameter as the reference circle, and the distance between the diameter of the reference circle and the adjacent reference line in the graphic code satisfies a preset ratio, such as the graphic code shown in FIG. 4A.
  • the center position of the first positioning circle, the center position of the second positioning circle, and the second positioning circle may be:
  • the diameter in the target image and the preset ratio determine the position of the reference line in the graphic code.
  • the specific value of the preset ratio may be set as needed, and the embodiment of the present disclosure does not specifically limit this.
  • the center position of the first positioning circle and the center position of the second positioning circle are on different reference lines
  • the center position based on the first positioning circle, the center position of the second positioning circle, and the second positioning circle are in the target image.
  • the diameter and the preset ratio, the way to determine the reference line in the graphic code is as follows:
  • the reference line of the center of the first positioning circle is preset as m1
  • the reference line of the center of the second positioning circle is m2
  • the reference line is m1 and the reference line is m2 with n preset reference line spacings.
  • the graphic code includes a first positioning circle (the large circle in FIG. 4B), a second positioning circle (the small circle on the right side of the large circle in FIG. 4B), a plurality of reference circles, and a plurality of reference lines arranged parallel to each other and equally spaced, the second positioning circle is the same diameter as the reference circle, and the ratio of the diameter of the reference circle to the adjacent reference line is 1:1, that is, the diameter of the reference circle in the graphic code
  • the distance from the adjacent reference line is the same, and the centers of the first positioning circle, the second positioning circle, and the reference circle are all located on the reference line or on the auxiliary reference line between the two adjacent reference lines.
  • the center of the adjacent reference circle in the graphic code has the same distance in the horizontal direction.
  • the small circle on the left side of the big circle in the graphic code shown in FIG. 4B can also be a positioning circle, and the remaining circles are reference circles.
  • the second way based on the line recognition algorithm, in the target image, the position of the reference line in the graphic code is identified.
  • the line recognition algorithm may be a Hough line recognition algorithm or the like.
  • the method can search for multiple lines parallel to each other and equally spaced in the target image based on the line recognition algorithm, and find the parallel lines and so on.
  • a plurality of straight lines of the pitch distribution are used as a plurality of reference lines, and the positions of the straight lines are taken as the positions of the reference lines in the graphic code.
  • the position of each reference line is determined.
  • the position of a reference line can be determined by a line recognition algorithm, and then the rest is determined by determining the position of the remaining reference lines according to the position of one reference line described in the above content.
  • the position of the reference line; the position of each reference line can also be determined directly by the line recognition algorithm.
  • step S2 can be implemented by a pattern recognition algorithm when identifying the positions of the plurality of reference icons in the graphic code.
  • the reference icon when the reference icon is a reference circle, the reference circle can be identified by the Hough circle recognition algorithm.
  • the position of the reference icon can be the center position of the reference circle. It should be noted that the manner of identifying the circle mentioned in the above content can be realized by the Hough circle recognition algorithm.
  • the positioning icon in the graphic code is the positioning circle and the reference icon is the reference circle
  • the graphic code does not overlap between the positioning circle and the reference circle, does not intersect, and does not exist in the inclusion relationship. And so on, therefore, after acquiring the target image, the circle recognition algorithm can be used to find multiple circles in the target image, and then the plurality of circles found are preprocessed to remove the plurality of circles and obviously have no positioning circle. And the circle of the reference circle feature, so as to avoid the interference of these circles on the subsequent recognition process, thereby improving the recognition rate.
  • the center of the reference circle in the graphic code is located on any of the reference lines, or on the auxiliary reference line between the adjacent two reference lines, and the adjacent reference circles do not overlap.
  • a pixel that changes in a specified pattern determines whether there is a reference circle on the reference line or the auxiliary reference line, and records identification information of the reference circle and the reference line or auxiliary reference line where it is located; according to each reference circle and its The identification information of the reference line or
  • the specific content of the relative position information may be determined according to the style of the graphic code. For example, when a plurality of reference lines are included in the graphic code, and the reference icon is located on the reference line or the auxiliary reference line, the relative position information may be identification information of the reference line or identification information of the auxiliary reference line. For another example, when only one reference line is included in the graphic code, the relative position information may be the distance between the reference icon and the reference line (the distance is positive above the reference line, and the lower is negative), and the distance may be divided by the unit. The multiple of the length. Here, one unit length may be defined as the diameter of the first positioning circle or the diameter of the second positioning circle.
  • the reference icon in the graphic code is a reference circle
  • the position of the reference icon is the center position of the reference circle
  • the center position of the reference circle is set on the reference line or on the auxiliary reference line disposed in the middle of the adjacent reference line.
  • the position of the reference line and the center position of the plurality of reference circles may be:
  • the first type of reference circle of the center of the reference line determines the identification information of the reference line where the center of the first type of reference circle is located, as the relative position information of the reference circle of the first type and the reference line, and the first position of the reference line is not on the reference line
  • the second type of reference circle determines two reference lines closest to the center distance of the second type of reference circle, and the identification information of the auxiliary reference line in the middle of the two reference lines closest to the center of the second type of reference circle is used as the second Relative position information of the reference circle and the reference line.
  • the identification information of the reference line may be represented by the number of the reference line
  • the identification information of the auxiliary reference line may be represented by the number of the auxiliary reference line.
  • a plurality of reference lines may be numbered from top to bottom in advance, and the number is used as the identification information of the reference line, and the auxiliary reference lines in the middle of the adjacent reference lines are sequentially arranged from top to bottom. Number, which is used as the identification information of the auxiliary reference line.
  • the positioning circle is a large circle in the middle and a small circle on the right side thereof, and the remaining figures are reference circles
  • the first type of reference circle is the first and third circles from left to right
  • the second type of reference circle is the second, fourth, seventh, and eighth of the left to right number.
  • the 9th round when the positioning icon is the large circle in FIG. 4A and the two small circles on the left and right sides thereof, the remaining graphics are reference circles, and the identification information of the reference line or the identification information of the auxiliary reference line is the relative relationship between the reference icon and the reference line.
  • the relative position information of each of the reference icons and the reference lines from left to right are 3, 6, 7, 8, 6, and 2, respectively.
  • the encoded string is a recognition result of the graphic code, and the data information carried in the graphic code can be directly or indirectly obtained through the encoded string.
  • This step S4 includes but is not limited to the following two implementations:
  • the first way the encoded string is directly a combination of the relative position information of each reference icon and the reference line.
  • each reference icon and the reference line have a relative position information, and the relative position information of all the reference icons and the reference line is combined to obtain the coded string corresponding to the graphic code.
  • the relative position information of each reference icon and the reference line is the number of the reference line or the auxiliary reference line where they are located, the number of the reference line or the auxiliary reference line where all the reference icons are located is combined to obtain the coded character corresponding to the graphic code. string.
  • the code string corresponding to the graphic code is 367862.
  • the second way the encoded string is converted from the relative position information of each reference icon and the reference line.
  • step S4 may: determine the encoded character string corresponding to the graphic code based on the relative position information of each reference icon and the reference line, and the correspondence between the previously stored relative position information and the encoded character. Specifically, after obtaining the relative position information of each of the reference icons and the reference line, the relative position information of each of the reference icons and the reference line may be compared with the correspondence between the previously stored relative position information and the coded characters. A coded character corresponding to the relative position information of each reference icon and the reference line is determined. The coded characters corresponding to the relative position information of all the reference icons and the reference lines are combined to obtain an encoded character string corresponding to the graphic code.
  • the data information actually included in the graphic code may not be stored in the terminal, but stored on the server, and the terminal may encode the character in order to obtain the data information actually included in the graphic code.
  • the string is encrypted, and the encrypted encoded string is sent to the server.
  • the server After the server decrypts the encoded string, the server searches for the correspondence between the encoded string and the information, obtains the data information actually included in the graphic code, and returns the data information to the terminal.
  • the terminal gets the information in the graphic code.
  • the process is a way to obtain the data information carried in the graphic code indirectly according to the encoded character string. By encrypting the encoded string and then transmitting it, the security of the data information can be improved, and the encoded string can be prevented from being leaked due to the captured packet.
  • the graphic code provided by the embodiment of the present disclosure includes a plurality of reference lines and a plurality of reference circles that are parallel to each other, and the graphic code can be applied to some specific scenes according to the features of the graphic code.
  • the graphic code includes five reference lines parallel to each other, similar to the staff in music, and includes circles of two radii, and the large circle in FIGS. 4A and 4B is the first positioning.
  • the circle, the circle on the right side of the first positioning circle is the second positioning circle, the remaining circles are the reference circle, and the second positioning circle has the same diameter as the other reference circles.
  • the graphic code includes a staff and the reference circle of the same diameter is similar to the note size in the staff, the graphic code can be applied to the music field to carry the singer information, the album information, or the download address of the music. As shown in FIG. 5, it is a specific application scenario of the graphic code. After scanning the graphic code, the terminal jumps to the corresponding music playing interface. Therefore, when the graphic code provided by the embodiment of the present disclosure is applied to a specific field, the data information carried by the graphic code can be more vividly expressed, thereby increasing the degree of attention of the data information.
  • the first positioning circle in the graphic code can also place the brand identifier of the data information carried by the graphic code, thereby increasing the combination degree of the graphic code and the brand, thereby increasing the publicity effect on the brand.
  • the method provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code to include a plurality of reference icons, thereby enriching not only the form of the graphic code but also carrying the graphic code.
  • Information can attract the attention of the public, which can increase the attention of the data information carried by the graphic code.
  • the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
  • the embodiment of the present disclosure further provides a method for generating a graphic code, the generating method comprising: generating a graphic code; wherein the graphic code includes at least one reference line; the graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying the reference line Preset relative positional relationship; the graphic code carries data information, and the identification graphic code is used to obtain data information.
  • the method for generating a graphic code provided by the embodiment of the present disclosure is used to generate a graphic code that needs to be identified in the target image of the foregoing embodiment.
  • the result of identifying the graphic code is used to obtain the data information carried in the graphic code, that is, the data information carried therein can be obtained by identifying the graphic code.
  • the reference line is used to position the datum icon.
  • the number of reference lines can be one or multiple.
  • the reference lines are arranged parallel to each other and equally spaced.
  • the reference line may be a line actually existing in the graphic code; or may be a logical line that is preset in the graphic code and satisfies a preset relative positional relationship with the reference icon, that is, the reference line is not displayed in the graphic code. It is only necessary to assist the reference line when determining the position of the reference icon.
  • the benchmark icon is used to carry data information.
  • the number of reference icons in the graphic code it can be determined according to the size of the amount of information to be carried. When the amount of data information to be carried is relatively large, the number of reference icons included in the graphic code can be set to be relatively large.
  • the shape of the reference icon can also be set as needed, such as a circle icon, an ellipse, an equilateral triangle, a hexagon, or the like.
  • Each of the reference icons respectively meets a preset relative positional relationship with the reference line, and the relative position information of each of the reference icons and the reference line can be obtained according to the preset relative positional relationship, and the method for identifying the graphic code is as described in the embodiment.
  • the relative position information of each reference icon and the reference line can be used to determine the encoded character string corresponding to the graphic code, thereby obtaining the data information carried in the graphic code.
  • the graphic code includes at least one positioning icon for positioning the reference line in the process of identifying the graphic code, in addition to the at least one reference line and the plurality of reference icons.
  • the position of the reference line is first determined by the positioning icon, then the position of the reference icon is determined according to the position of the reference line, and finally the graphic code is identified according to the relative position information of the reference icon and the reference line. Carrying data information.
  • the content of the positioning icon and the specific implementation of determining the position of the reference line according to the positioning icon have been explained in detail in the above embodiment of the method for identifying the graphic code. For details, refer to the embodiment of the above identification method. The corresponding content will not be described here.
  • At least one of the positioning icons may include a first positioning circle and a second positioning circle.
  • the first positioning circle and the second positioning circle are used to position the one or two reference lines.
  • the radius of the first positioning circle and the second positioning circle may be the same or different, and the first positioning circle and the second positioning circle are included to have different features, so that the first positioning circle and the second positioning circle can be distinguished.
  • the first positioning circle and the second positioning circle in the graphic code are circles having different diameters.
  • the first positioning circle and the second positioning circle have a preset relative positional relationship. a predetermined relative positional relationship between the first positioning circle and the second positioning circle, a manner of identifying the first positioning circle and the second positioning circle, and determining one or two reference lines by the first positioning circle and the second positioning circle.
  • the reference icon is also a circle, that is, the reference icon is a reference circle, and the second positioning circle has the same diameter as the reference circle.
  • the graphic code includes a first positioning circle, a second positioning circle, and a plurality of reference circles, and the second positioning circle and the reference circle have the same diameter.
  • the graphic code includes two diameter circles, and the diameter of the first positioning circle is different from the diameter of the second positioning circle.
  • the diameter of the first positioning circle is larger than the diameter of the second positioning circle.
  • the graphic code includes a first positioning circle, a second positioning circle, a plurality of reference circles, and a plurality of reference lines which are parallel and equally spaced, the second positioning circle and the reference circle have the same diameter, and the diameter and phase of the reference circle
  • the distance between adjacent reference lines satisfies a preset ratio.
  • the specific value of the preset ratio can be set as needed.
  • the preset ratio is 1, that is, the diameter of the reference circle is equal to the distance between adjacent reference lines, so that the graphic code is more beautiful.
  • the graphic code comprises a first positioning circle and a second positioning circle, a plurality of reference circles and a plurality of reference lines arranged parallel to each other and equally spaced, the center of the first positioning circle is on any reference line, and the second positioning circle is The center of the center and the reference circle are respectively on any reference line or on the auxiliary reference line between any two adjacent reference lines, and the second positioning circle and the reference circle have the same diameter, as shown in FIGS. 4A and 4B.
  • the graphic code includes an odd number of reference lines
  • the center of the first positioning circle is located on the reference line in the middle.
  • the graphic code includes five reference lines
  • the center of the first positioning circle is located on the third reference line.
  • the diameters of the second positioning circle and the reference circle are the same, and the distance between the diameter of the reference circle and the adjacent reference line satisfies a preset ratio.
  • the graphic code is more beautiful.
  • the first positioning circle is disposed at an intermediate position of the graphic code, so that not only the first positioning circle is easily recognized, but also the overall graphic code is more beautiful.
  • the method provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code including the plurality of reference icons and the at least one reference line, thereby enriching the form of the graphic code and passing
  • the graphic code to carry information can attract the attention of the public, thereby improving the attention of the data information carried by the graphic code.
  • the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
  • the embodiment of the present disclosure further provides a device for identifying a graphic code, where the graphic code includes a plurality of reference icons, and the device for identifying the graphic code includes:
  • a first identification module 602 configured to identify a position of a reference line in the graphic code in the target image
  • a second identification module 603, configured to identify locations of the plurality of reference icons in the graphic code
  • a first determining module 604 configured to determine relative position information of each reference icon and a reference line according to a position of the reference line and a position of the plurality of reference icons;
  • the second determining module 605 is configured to determine an encoded character string corresponding to the graphic code based on the relative position information of each of the reference icons and the reference line.
  • the graphic code further includes at least one positioning icon, where the first identification module 602 includes:
  • a identifying unit configured to identify, in the target image, a location of the at least one positioning icon in the graphic code
  • a determining unit configured to determine a position of the reference line in the graphic code based on the position of the at least one positioning icon.
  • the positioning icon includes a first positioning circle and a second positioning circle having a preset relative positional relationship
  • the position of the at least one positioning icon includes a center position of the first positioning circle and a center position of the second positioning circle.
  • the identification unit comprises:
  • a first identifying subunit configured to identify a first positioning circle in the graphic code in the target image based on the preset radius range
  • a second identification subunit configured to identify, in the target image, a circle closest to the first positioning circle as a second positioning circle in the graphic code.
  • the reference icon is a reference circle
  • the second positioning circle has the same diameter as the reference circle
  • the graphic code includes a plurality of reference lines that are parallel and equally spaced, and the diameter of the reference circle and the adjacent reference line in the graphic code The distance between the two meets the preset ratio;
  • the determining unit is configured to: determine the graphic code based on the center position of the first positioning circle, the center position of the second positioning circle, the diameter of the second positioning circle in the target image, and the preset ratio value The location of the reference line.
  • the first identification module 602 is configured to: identify, according to a line recognition algorithm, a position of a reference line in the graphic code in the target image.
  • the reference icon is a reference circle
  • the position of the reference icon is a center position of the reference circle
  • the first determining module 604 is configured to:
  • the identification information of the reference line where the center of the first type of reference circle is located is determined as the first type of reference circle and Relative position information of the reference line; for the second type of reference circle whose center is not on the reference line, determine two reference lines closest to the center distance of the second type of reference circle, and the two closest to the center of the second type of reference circle.
  • the identification information of the auxiliary reference line in the middle of the reference line is used as the relative position information of the reference circle of the second type and the reference line.
  • the device provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code to include a plurality of reference icons, thereby enriching not only the form of the graphic code but also carrying the graphic code.
  • the data information can attract the attention of the public, so that the attention of the data information carried by the graphic code can be improved.
  • the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
  • An embodiment of the present disclosure further provides a device for generating a graphic code, where the graphic code generating device is configured to generate a graphic code;
  • the graphic code includes at least one reference line
  • the graphic code includes a plurality of reference icons, and each of the reference icons respectively meets a preset relative positional relationship with the reference line;
  • the graphic code carries data information, and the identification graphic code is used to obtain data information.
  • the graphic code further includes at least one positioning icon for positioning the reference line in the process of identifying the graphic code.
  • the at least one positioning icon comprises a first positioning circle and a second positioning circle.
  • the reference icon is a reference circle
  • the second positioning circle has the same diameter as the reference circle.
  • the graphic code comprises a plurality of reference lines arranged in parallel and equally spaced, wherein the distance between the diameter of the reference circle and the adjacent reference line in the graphic code satisfies a preset ratio.
  • the center of the first positioning circle is on any reference line
  • the center of the second positioning circle and the center of the reference circle are respectively on any reference line or on an auxiliary reference line between any two adjacent reference lines.
  • the device provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code including the plurality of reference icons and the at least one reference line, thereby enriching the form of the graphic code and passing
  • the graphic code to carry the data information can attract the attention of the public, thereby improving the attention of the data information carried by the graphic code.
  • the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
  • FIG. 7 is a block diagram showing the structure of a terminal 700 provided by an exemplary embodiment of the present disclosure.
  • the terminal 700 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), and an MP4 (Moving Picture Experts Group Audio Layer IV). 4) Player, laptop or desktop computer.
  • Terminal 700 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
  • the terminal 700 includes a processor 701 and a memory 702.
  • Processor 701 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 701 may be configured by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve.
  • the processor 701 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby.
  • the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of the content that the display needs to display.
  • the processor 701 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 702 can include one or more computer readable storage media, which can be non-transitory. Memory 702 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in memory 702 is configured to store at least one instruction for execution by processor 701 to implement the graphics code provided by the method embodiments of the present application. Identification method.
  • the terminal 700 optionally further includes: a peripheral device interface 703 and at least one peripheral device.
  • the processor 701, the memory 702, and the peripheral device interface 703 can be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 703 via a bus, signal line or circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 704, a touch display screen 705, a camera 706, an audio circuit 707, a positioning component 708, and a power source 709.
  • the peripheral device interface 703 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 701 and the memory 702.
  • processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one of processor 701, memory 702, and peripheral interface 703 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 704 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal. Radio frequency circuit 704 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 704 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal.
  • the radio frequency circuit 704 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. Radio frequency circuit 704 can communicate with other terminals via at least one wireless communication protocol.
  • the wireless communication protocol includes, but is not limited to, a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and/or a WiFi (Wireless Fidelity) network.
  • the radio frequency circuit 704 may also include NFC (Near Field Communication) related circuitry, which is not limited in this application.
  • the display screen 705 is used to display a UI (User Interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • display 705 is a touch display
  • display 705 also has the ability to capture touch signals over the surface or surface of display 705.
  • the touch signal can be input to the processor 701 as a control signal for processing.
  • the display screen 705 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 705 may be one, and the front panel of the terminal 700 is disposed; in other embodiments, the display screen 705 may be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; In still other embodiments, display screen 705 can be a flexible display screen disposed on a curved surface or a folded surface of terminal 700. Even the display screen 705 can be set to a non-rectangular irregular pattern, that is, a profiled screen.
  • the display screen 705 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
  • Camera component 706 is used to capture images or video.
  • camera assembly 706 includes a front camera and a rear camera.
  • the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal.
  • the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions.
  • camera assembly 706 can also include a flash.
  • the flash can be a monochrome temperature flash or a two-color temperature flash.
  • the two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
  • the audio circuit 707 can include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing to the processor 701 for processing, or input to the radio frequency circuit 704 for voice communication.
  • the microphones may be multiple, and are respectively disposed at different parts of the terminal 700.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is then used to convert electrical signals from processor 701 or radio frequency circuit 704 into sound waves.
  • the speaker can be a conventional film speaker or a piezoelectric ceramic speaker.
  • the audio circuit 707 can also include a headphone jack.
  • the location component 708 is used to locate the current geographic location of the terminal 700 to implement navigation or LBS (Location Based Service).
  • the positioning component 708 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, a Russian Greiner system, or an EU Galileo system.
  • Power source 709 is used to power various components in terminal 700.
  • the power source 709 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery can support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • terminal 700 also includes one or more sensors 710.
  • the one or more sensors 710 include, but are not limited to, an acceleration sensor 711, a gyro sensor 712, a pressure sensor 713, a fingerprint sensor 714, an optical sensor 715, and a proximity sensor 716.
  • the acceleration sensor 711 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the terminal 700.
  • the acceleration sensor 711 can be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 701 can control the touch display screen 705 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 711.
  • the acceleration sensor 711 can also be used for the acquisition of game or user motion data.
  • the gyro sensor 712 can detect the body direction and the rotation angle of the terminal 700, and the gyro sensor 712 can cooperate with the acceleration sensor 711 to collect the 3D motion of the user to the terminal 700. Based on the data collected by the gyro sensor 712, the processor 701 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • the pressure sensor 713 can be disposed at a side border of the terminal 700 and/or a lower layer of the touch display screen 705.
  • the pressure sensor 713 When the pressure sensor 713 is disposed on the side frame of the terminal 700, the user's holding signal to the terminal 700 can be detected, and the processor 701 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 713.
  • the operability control on the UI interface is controlled by the processor 701 according to the user's pressure operation on the touch display screen 705.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 714 is used to collect the fingerprint of the user.
  • the processor 701 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 701 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like.
  • the fingerprint sensor 714 can be provided with the front, back or side of the terminal 700. When the physical button or vendor logo is provided on the terminal 700, the fingerprint sensor 714 can be integrated with the physical button or the manufacturer logo.
  • Optical sensor 715 is used to collect ambient light intensity.
  • the processor 701 can control the display brightness of the touch display 705 based on the ambient light intensity acquired by the optical sensor 715. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 705 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 705 is lowered.
  • the processor 701 can also dynamically adjust the shooting parameters of the camera assembly 706 according to the ambient light intensity collected by the optical sensor 715.
  • Proximity sensor 716 also referred to as a distance sensor, is typically disposed on the front panel of terminal 700.
  • Proximity sensor 716 is used to collect the distance between the user and the front side of terminal 700.
  • the proximity sensor 716 detects that the distance between the user and the front side of the terminal 700 is gradually decreasing
  • the touch screen 705 is controlled by the processor 701 to switch from the bright screen state to the screen state; when the proximity sensor 716 detects When the distance between the user and the front side of the terminal 700 gradually becomes larger, the processor 701 controls the touch display screen 705 to switch from the screen state to the bright screen state.
  • FIG. 7 does not constitute a limitation to the terminal 700, and may include more or less components than those illustrated, or may combine some components or adopt different component arrangements.
  • FIG. 8 is a block diagram showing the structure of a terminal 800 provided by an exemplary embodiment of the present disclosure.
  • the terminal 800 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), and an MP4 (Moving Picture Experts Group Audio Layer IV). Level 4) Player, laptop or desktop computer.
  • Terminal 800 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
  • the terminal 800 includes a processor 801 and a memory 802.
  • Processor 801 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 801 can be implemented by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve.
  • the processor 801 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby.
  • the processor 801 can be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of the content that the display needs to display.
  • the processor 801 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 802 can include one or more computer readable storage media, which can be non-transitory. Memory 802 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash memory devices. In some embodiments, the non-transitory computer readable storage medium in memory 802 is configured to store at least one instruction for execution by processor 801 to implement the graphics code provided by the method embodiments of the present application. The method of generation.
  • terminal 800 also optionally includes a peripheral device interface 803 and at least one peripheral device.
  • the processor 801, the memory 802, and the peripheral device interface 803 can be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 803 via a bus, signal line or circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 804, a touch display screen 805, a camera 806, an audio circuit 807, a positioning component 808, and a power source 809.
  • Peripheral device interface 803 can be used to connect at least one peripheral device associated with I/O (Input/Output) to processor 801 and memory 802.
  • processor 801, memory 802, and peripheral interface 803 are integrated on the same chip or circuit board; in some other embodiments, any of processor 801, memory 802, and peripheral interface 803 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 804 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal. Radio frequency circuit 804 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 804 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 804 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 804 can communicate with other terminals via at least one wireless communication protocol.
  • RF Radio Frequency
  • the wireless communication protocol includes, but is not limited to, a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and/or a WiFi (Wireless Fidelity) network.
  • the radio frequency circuit 804 may also include a circuit related to NFC (Near Field Communication), which is not limited in this application.
  • the display screen 805 is used to display a UI (User Interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • display 805 is a touch display
  • display 805 also has the ability to capture touch signals over the surface or surface of display 805.
  • the touch signal can be input to the processor 801 for processing as a control signal.
  • the display screen 805 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 805 may be one, and the front panel of the terminal 800 is disposed; in other embodiments, the display screen 805 may be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; In still other embodiments, the display screen 805 can be a flexible display screen disposed on a curved surface or a folded surface of the terminal 800. Even the display screen 805 can be set to a non-rectangular irregular pattern, that is, a profiled screen.
  • the display screen 805 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
  • Camera component 806 is used to capture images or video.
  • camera assembly 806 includes a front camera and a rear camera.
  • the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal.
  • the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions.
  • camera assembly 806 can also include a flash.
  • the flash can be a monochrome temperature flash or a two-color temperature flash.
  • a two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
  • the audio circuit 807 can include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing to the processor 801 for processing, or input to the radio frequency circuit 804 for voice communication.
  • the microphones may be multiple, and are respectively disposed at different parts of the terminal 800.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is then used to convert electrical signals from the processor 801 or the RF circuit 804 into sound waves.
  • the speaker can be a conventional film speaker or a piezoelectric ceramic speaker.
  • audio circuit 807 can also include a headphone jack.
  • the location component 808 is used to locate the current geographic location of the terminal 800 to implement navigation or LBS (Location Based Service).
  • the positioning component 808 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, a Russian Greiner system, or an EU Galileo system.
  • Power source 809 is used to power various components in terminal 800.
  • the power source 809 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery can support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • terminal 800 also includes one or more sensors 810.
  • the one or more sensors 810 include, but are not limited to, an acceleration sensor 811, a gyro sensor 812, a pressure sensor 813, a fingerprint sensor 814, an optical sensor 815, and a proximity sensor 816.
  • the acceleration sensor 811 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the terminal 800.
  • the acceleration sensor 811 can be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 801 can control the touch display screen 805 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 811.
  • the acceleration sensor 811 can also be used for the acquisition of game or user motion data.
  • the gyro sensor 812 can detect the body direction and the rotation angle of the terminal 800, and the gyro sensor 812 can cooperate with the acceleration sensor 811 to collect the 3D motion of the user to the terminal 800. Based on the data collected by the gyro sensor 812, the processor 801 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • the pressure sensor 813 may be disposed at a side border of the terminal 800 and/or a lower layer of the touch display screen 805.
  • the pressure sensor 813 When the pressure sensor 813 is disposed on the side frame of the terminal 800, the user's holding signal to the terminal 800 can be detected, and the processor 801 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 813.
  • the operability control on the UI interface is controlled by the processor 801 according to the user's pressure on the touch display screen 805.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 814 is configured to collect the fingerprint of the user, and the processor 801 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 801 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like.
  • the fingerprint sensor 814 can be provided with the front, back or side of the terminal 800. When the physical button or vendor logo is provided on the terminal 800, the fingerprint sensor 814 can be integrated with the physical button or the manufacturer logo.
  • Optical sensor 815 is used to collect ambient light intensity.
  • the processor 801 can control the display brightness of the touch display screen 805 according to the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 805 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 805 is lowered.
  • the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 815.
  • Proximity sensor 816 also referred to as a distance sensor, is typically disposed on the front panel of terminal 800. Proximity sensor 816 is used to capture the distance between the user and the front of terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front side of the terminal 800 is gradually decreasing, the touch screen 805 is controlled by the processor 801 to switch from the bright screen state to the screen state; when the proximity sensor 816 detects When the distance between the user and the front side of the terminal 800 gradually becomes larger, the processor 801 controls the touch display screen 805 to switch from the state of the screen to the bright state.
  • FIG. 8 does not constitute a limitation to the terminal 800, and may include more or less components than those illustrated, or may combine some components or adopt different component arrangements.
  • the embodiment of the present disclosure further provides a computer readable storage medium, where the computer readable storage medium stores instructions for implementing the method for identifying the graphic code provided by the foregoing embodiment when executed by the processor.
  • the embodiment of the present disclosure further provides a computer readable storage medium, where the computer readable storage medium stores instructions for executing the method for generating the graphic code provided by the foregoing embodiment when executed by the processor.
  • the identification device of the graphic code provided in the above embodiment is only exemplified by the division of the above functional modules when identifying the graphic code. In actual applications, the functions may be allocated by different functional modules as needed. Upon completion, the internal structure of the device is divided into different functional modules to perform all or part of the functions described above.
  • the identification device of the graphic code provided by the above embodiment is the same as the embodiment of the method for identifying the graphic code, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • the device for generating the graphic code and the method for generating the graphic code are the same as the embodiment of the present invention. For details, refer to the method embodiment, and details are not described herein again.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure provides a method, a device, a computer readable storage medium for identifying and generating a graphic code, belonging to the field of graphic codes. The graphic code comprises a plurality of standard icons. The identification method comprises: obtaining a target image; identifying the position of a reference line in a graphic code in the target image, and identifying the positions of the standard icons in the graphic code; determining, according to the position of the reference line and the positions of the standard icons, relative positional information of each of the standard icons and the reference line; and on the basis of the relative positional information of each of the standard icons and the reference line, determining a coded string corresponding to the graphic code. The generation method comprises: generating a graphic code, wherein the graphic code comprises at least one reference line and a plurality of standard icons, the standard icons respectively satisfy relative positional relationships with the reference line, and the graphic code carries data information. The present disclosure provides a new type of graphic code different from bar codes or two-dimensional codes, such that the forms of graphic codes are enriched, and more attention can be attracted to the information carried by the graphic codes.

Description

图形码的识别及生成方法、装置及计算机可读存储介质Method and device for identifying and generating graphic code and computer readable storage medium
本申请要求于2018年04月02日提交中国国家知识产权局、申请号为201810284534.X、发明名称为“图形码的识别及生成方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the State Intellectual Property Office of China on April 2, 2018, with the application number of 201810284534.X, and the Chinese patent application whose invention name is "graphic code identification and generation method, device and computer readable storage medium" is preferred. The entire contents are hereby incorporated by reference.
技术领域Technical field
本公开涉及图形码领域,特别涉及一种图形码的识别方法、装置及计算机可读存储介质。The present disclosure relates to the field of graphic codes, and in particular, to a method, an apparatus, and a computer readable storage medium for identifying a graphic code.
背景技术Background technique
随着科技的不断进步,图形码如一维码、二维码等随处可见。通常图形码中往往会携带一定的数据信息,如商品的一维码中携带商品的价格、分类和属性等数据信息;互联网产品的图形码中携带相应的跳转链接等。为了获得图形码中携带的数据信息,需要对图形码进行识别。With the continuous advancement of technology, graphic codes such as one-dimensional codes and two-dimensional codes can be seen everywhere. Usually, the graphic code often carries certain data information, such as the price information, classification and attributes of the commodity in the one-dimensional code of the commodity; the graphic code of the Internet product carries the corresponding jump link. In order to obtain the data information carried in the graphic code, the graphic code needs to be identified.
然而,相关技术中的图形码通常为一维码或二维码,使得图形码的形式比较单一。由于图形码的形式比较单一,从而使得绝大多数领域中均使用相同形式的图形码,如目前二维码几乎被应用于所有需要使用图形码的领域来携带数据信息。绝大多数领域使用相同形式的图形码,虽然使图形码具有普遍性,但单一形式的图形码容易给用户造成视觉疲劳,从而容易导致对图形码中所携带数据信息的关注度不高。However, the graphic code in the related art is usually a one-dimensional code or a two-dimensional code, so that the form of the graphic code is relatively simple. Since the form of the graphic code is relatively simple, the same form of the graphic code is used in most fields. For example, the current two-dimensional code is applied to all fields that need to use the graphic code to carry the data information. Most fields use the same form of graphics code. Although the graphics code is universal, a single form of graphics code is likely to cause visual fatigue to the user, which tends to cause less attention to the data information carried in the graphics code.
发明内容Summary of the invention
本公开实施例提供了一种图形码的识别及生成方法、装置及计算机可读存储介质,以解决相关技术中的图形码形式单一,容易导致对图形码中所携带的数据信息的关注度不高的技术问题。所述技术方案如下:The embodiments of the present disclosure provide a method, a device, and a computer readable storage medium for recognizing and generating a graphic code, so as to solve the single form of the graphic code in the related art, which may easily cause attention to the data information carried in the graphic code. High technical issues. The technical solution is as follows:
第一方面,提供了一种图形码的识别方法,所述图形码包括多个基准图标,所述方法包括:In a first aspect, a method for identifying a graphic code is provided, the graphic code comprising a plurality of reference icons, the method comprising:
获取目标图像;Obtain the target image;
在目标图像中,识别图形码中的参考线的位置,并识别所述图形码中的多个基准图标的位置;Identifying, in the target image, a position of the reference line in the graphic code and identifying a position of the plurality of reference icons in the graphic code;
根据所述参考线的位置和所述多个基准图标的位置,确定每个基准图标与所述参考线的相对位置信息;Determining relative position information of each reference icon and the reference line according to a position of the reference line and a position of the plurality of reference icons;
基于所述每个基准图标与所述参考线的相对位置信息,确定所述图形码对应的编码字符串。And determining, according to the relative position information of each of the reference icons and the reference line, an encoded character string corresponding to the graphic code.
可选地,所述图形码中还包括至少一个定位图标,所述在目标图像中,识别图形码中的参考线的位置,包括:Optionally, the graphic code further includes at least one positioning icon, where identifying a position of the reference line in the graphic code in the target image, including:
在所述目标图像中,识别图形码中的至少一个定位图标的位置;Identifying, in the target image, a location of at least one of the positioning icons in the graphic code;
基于所述至少一个定位图标的位置,确定所述图形码中的参考线的位置。A position of a reference line in the graphic code is determined based on a location of the at least one positioning icon.
可选地,所述定位图标包括具有预设的相对位置关系的第一定位圆和第二定位圆,所述至少一个定位图标的位置包括所述第一定位圆的圆心位置和所述第二定位圆的圆心位置。Optionally, the positioning icon includes a first positioning circle and a second positioning circle having a preset relative positional relationship, where the position of the at least one positioning icon includes a center position of the first positioning circle and the second Position the center of the circle.
可选地,所述在所述目标图像中,识别图形码中的至少一个定位图标的位置,包括:Optionally, in the target image, identifying a location of the at least one positioning icon in the graphic code, including:
基于预设的半径范围,在所述目标图像中,识别图形码中的第一定位圆;Identifying, in the target image, a first positioning circle in the graphic code based on a preset radius range;
在所述目标图像中,识别与所述第一定位圆距离最近的圆,作为图形码中的第二定位圆。In the target image, a circle closest to the first positioning circle is identified as a second positioning circle in the graphic code.
可选地,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值;Optionally, the reference icon is a reference circle, the second positioning circle has the same diameter as the reference circle, and the graphic code comprises a plurality of reference lines arranged in parallel and equally spaced, in the graphic code The distance between the diameter of the reference circle and the adjacent reference line satisfies a preset ratio;
所述基于所述至少一个定位图标的位置,确定所述图形码中的参考线的位置,包括:Determining a position of the reference line in the graphic code based on a location of the at least one positioning icon, including:
基于所述第一定位圆的圆心位置、所述第二定位圆的圆心位置、所述第二定位圆在所述目标图像中的直径和所述预设比值,确定所述图形码中的参考线的位置。Determining a reference in the graphic code based on a center position of the first positioning circle, a center position of the second positioning circle, a diameter of the second positioning circle in the target image, and the preset ratio The position of the line.
可选地,所述在目标图像中,识别图形码中的参考线的位置,包括:Optionally, in the target image, identifying a location of the reference line in the graphic code, including:
基于直线识别算法,在目标图像中,识别图形码中的参考线的位置。Based on the line recognition algorithm, the position of the reference line in the graphic code is identified in the target image.
可选地,所述基准图标为基准圆,所述基准图标的位置为基准圆的圆心位置,所述根据所述参考线的位置和所述多个基准图标的位置,确定每个基准图标与所述参考线的相对位置信息,包括:Optionally, the reference icon is a reference circle, the position of the reference icon is a center position of the reference circle, and the reference icon is determined according to the position of the reference line and the position of the plurality of reference icons. Relative position information of the reference line includes:
根据所述参考线的位置和所述多个基准圆的圆心位置,对于圆心在参考线上的第一类基准圆,确定所述第一类基准圆的圆心所在的参考线的标识信息,作为所述第一类基准圆与所述参考线的相对位置信息,对于圆心不在参考线上的第二类基准圆,确定与所述第二类基准圆的圆心距离最近的两条参考线,将与所述第二类基准圆的圆心距离最近的两条参考线中间的辅助参考线的标识信息作为所述第二类基准圆与所述参考线的相对位置信息。Determining identification information of a reference line where a center of the first type of reference circle is located, according to a position of the reference line and a center position of the plurality of reference circles, for a first type of reference circle whose center is on a reference line Determining relative position information of the first type of reference circle and the reference line, and determining, for a second type of reference circle whose center is not on the reference line, two reference lines closest to the center distance of the second type of reference circle, The identification information of the auxiliary reference line in the middle of the two reference lines closest to the center distance of the second type of reference circle is used as the relative position information of the second type of reference circle and the reference line.
第二方面,提供了一种图形码的生成方法,所述方法包括:In a second aspect, a method for generating a graphics code is provided, the method comprising:
生成图形码;Generate a graphic code;
其中,所述图形码包括至少一条参考线;Wherein the graphic code includes at least one reference line;
所述图形码包括多个基准图标,每个基准图标分别与所述参考线满足预设的相对位置关系;The graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying a preset relative positional relationship with the reference line;
所述图形码携带数据信息,识别所述图形码用于获得所述数据信息。The graphic code carries data information, and the graphic code is identified for obtaining the data information.
可选地,所述图形码还包括至少一个定位图标,所述定位图标用于在识别所述图形码的过程中对所述参考线进行定位。Optionally, the graphic code further includes at least one positioning icon, wherein the positioning icon is used to locate the reference line in the process of identifying the graphic code.
可选地,所述至少一个定位图标包括第一定位圆和第二定位圆。Optionally, the at least one positioning icon comprises a first positioning circle and a second positioning circle.
可选地,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径。Optionally, the reference icon is a reference circle, and the second positioning circle has the same diameter as the reference circle.
可选地,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值。Optionally, the graphic code comprises a plurality of mutually parallel and equally spaced reference lines, wherein a distance between the diameter of the reference circle and an adjacent reference line in the graphic code satisfies a preset ratio.
可选地,所述第一定位圆的圆心在任一参考线上,所述第二定位圆的圆心和所述基准圆的圆心分别在任两条相邻参考线中间的辅助参考线上。Optionally, the center of the first positioning circle is on any reference line, and the center of the second positioning circle and the center of the reference circle are respectively on the auxiliary reference line between any two adjacent reference lines.
第三方面,提供了一种图形码的识别装置,所述图形码包括多个基准图标,所述装置包括:In a third aspect, there is provided a device for identifying a graphic code, the graphic code comprising a plurality of reference icons, the device comprising:
获取模块,用于获取目标图像;Obtaining a module for acquiring a target image;
第一识别模块,用于在目标图像中,识别图形码中的参考线的位置;a first identification module, configured to identify a position of a reference line in the graphic code in the target image;
第二识别模块,用于识别所述图形码中的多个基准图标的位置;a second identification module, configured to identify a location of the plurality of reference icons in the graphic code;
第一确定模块,用于根据所述参考线的位置和所述多个基准图标的位置,确定每个基准图标与所述参考线的相对位置信息;a first determining module, configured to determine relative position information of each reference icon and the reference line according to a position of the reference line and a position of the plurality of reference icons;
第二确定模块,用于基于所述每个基准图标与所述参考线的相对位置信息,确定所述图形码对应的编码字符串。And a second determining module, configured to determine, according to the relative position information of each of the reference icons and the reference line, an encoded character string corresponding to the graphic code.
可选地,所述图形码中还包括至少一个定位图标,所述第一识别模块包括:Optionally, the graphic code further includes at least one positioning icon, where the first identification module includes:
识别单元,用于在所述目标图像中,识别图形码中的至少一个定位图标的位置;An identifying unit, configured to identify, in the target image, a location of at least one positioning icon in the graphic code;
确定单元,用于基于所述至少一个定位图标的位置,确定所述图形码中的参考线的位置。a determining unit, configured to determine a position of a reference line in the graphic code based on a location of the at least one positioning icon.
可选地,所述定位图标包括具有预设的相对位置关系的第一定位圆和第二定位圆,所述至少一个定位图标的位置包括所述第一定位圆的圆心位置和所述第二定位圆的圆心位置。Optionally, the positioning icon includes a first positioning circle and a second positioning circle having a preset relative positional relationship, where the position of the at least one positioning icon includes a center position of the first positioning circle and the second Position the center of the circle.
可选地,所述识别单元包括:Optionally, the identifying unit includes:
第一识别子单元,用于基于预设的半径范围,在所述目标图像中,识别图形码中的第一定位圆;a first identifying subunit, configured to identify a first positioning circle in the graphic code in the target image based on a preset radius range;
第二识别子单元,用于在所述目标图像中,识别与所述第一定位圆距离最近的圆,作为图形码中的第二定位圆。a second identification subunit, configured to identify, in the target image, a circle closest to the first positioning circle as a second positioning circle in the graphic code.
可选地,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值;Optionally, the reference icon is a reference circle, the second positioning circle has the same diameter as the reference circle, and the graphic code comprises a plurality of reference lines arranged in parallel and equally spaced, in the graphic code The distance between the diameter of the reference circle and the adjacent reference line satisfies a preset ratio;
所述确定单元用于:基于所述第一定位圆的圆心位置、所述第二定位圆的圆心位置、所述第二定位圆在所述目标图像中的直径和所述预设比值,确定所述图形码中的参考线的位置。The determining unit is configured to: determine, according to a center position of the first positioning circle, a center position of the second positioning circle, a diameter of the second positioning circle in the target image, and the preset ratio The position of the reference line in the graphic code.
可选地,所述第一识别模块用于:基于直线识别算法,在目标图像中,识别图形码中的参考线的位置。Optionally, the first identification module is configured to: identify, according to a line recognition algorithm, a position of a reference line in the graphic code in the target image.
可选地,所述基准图标为基准圆,所述基准图标的位置为基准圆的圆心位置,所述第一确定模块用于:Optionally, the reference icon is a reference circle, and the location of the reference icon is a center position of the reference circle, and the first determining module is configured to:
根据所述参考线的位置和所述多个基准圆的圆心位置,对于圆心在参考线上的第一类基准圆,确定所述第一类基准圆的圆心所在的参考线的标识信息,作为所述第一类基准圆与所述参考线的相对位置信息,对于圆心不在参考线上的第二类基准圆,确定与所述第二类基准圆的圆心距离最近的两条参考线,将与所述第二类基准圆的圆心距离最近的两条参考线中间的辅助参考线的标识信息作为所述第二类基准圆与所述参考线的相对位置信息。Determining identification information of a reference line where a center of the first type of reference circle is located, according to a position of the reference line and a center position of the plurality of reference circles, for a first type of reference circle whose center is on a reference line Determining relative position information of the first type of reference circle and the reference line, and determining, for a second type of reference circle whose center is not on the reference line, two reference lines closest to the center distance of the second type of reference circle, The identification information of the auxiliary reference line in the middle of the two reference lines closest to the center distance of the second type of reference circle is used as the relative position information of the second type of reference circle and the reference line.
第四方面,提供一种图形码的生成装置,所述装置用于生成图形码;A fourth aspect provides a device for generating a graphic code, the device for generating a graphic code;
其中,所述图形码包括至少一条参考线;Wherein the graphic code includes at least one reference line;
所述图形码包括多个基准图标,每个基准图标分别与所述参考线满足预设 的相对位置关系;The graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying a preset relative positional relationship with the reference line;
所述图形码携带数据信息,识别所述图形码用于获得所述数据信息。The graphic code carries data information, and the graphic code is identified for obtaining the data information.
可选地,所述图形码还包括至少一个定位图标,所述定位图标用于在识别所述图形码的过程中对所述参考线进行定位。Optionally, the graphic code further includes at least one positioning icon, wherein the positioning icon is used to locate the reference line in the process of identifying the graphic code.
可选地,所述至少一个定位图标包括第一定位圆和第二定位圆。Optionally, the at least one positioning icon comprises a first positioning circle and a second positioning circle.
可选地,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径。Optionally, the reference icon is a reference circle, and the second positioning circle has the same diameter as the reference circle.
可选地,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值。Optionally, the graphic code comprises a plurality of mutually parallel and equally spaced reference lines, wherein a distance between the diameter of the reference circle and an adjacent reference line in the graphic code satisfies a preset ratio.
可选地,所述第一定位圆的圆心在任一参考线上,所述第二定位圆的圆心和所述基准圆的圆心分别在任一参考线上或在任两条相邻参考线中间的辅助参考线上。Optionally, the center of the first positioning circle is on any reference line, and the center of the second positioning circle and the center of the reference circle are respectively assisted on any reference line or in the middle of any two adjacent reference lines. Reference line.
第五方面,提供了一种图形码的识别装置,所述装置包括:In a fifth aspect, a device for identifying a graphic code is provided, the device comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;
其中,所述处理器被配置为执行第一方面所述的图形码的识别方法的步骤。Wherein the processor is configured to perform the step of the method of identifying the graphic code according to the first aspect.
第六方面,提供了一种图形码的生成装置,所述装置包括:A sixth aspect provides a device for generating a graphic code, the device comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;
其中,所述处理器被配置为执行第二方面所述的图形码的生成方法的步骤。Wherein the processor is configured to perform the steps of the method for generating a graphic code according to the second aspect.
第七方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现第一方面所述的图形码的识别方法的步骤。In a seventh aspect, a computer readable storage medium is provided, the computer readable storage medium having instructions stored thereon, the instructions being executed by a processor to implement the steps of the method of identifying a graphic code of the first aspect.
第八方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现第二方面所述的图形码的生成方法的步骤。In an eighth aspect, a computer readable storage medium is provided, the computer readable storage medium having instructions stored thereon, the instructions being executed by a processor to implement the steps of the method of generating a graphics code according to the second aspect.
本公开实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present disclosure are:
通过设置图形码包括多个基准图标,提供一种形式不同于条形码或二维码的新型图形码,从而不仅丰富了图形码的形式,而且通过该图形码来携带数据信息能够吸引大众眼球,从而能够提高图形码所携带数据信息的关注度。通过设置图形码包括多个基准图标,使得该图形码可以根据所要标识的数据信息的 数量来调整基准图标的数量,不仅使用灵活方便,而且能适用于信息量很大的领域。By setting a graphic code including a plurality of reference icons, a novel graphic code different in form from a barcode or a two-dimensional code is provided, thereby not only enriching the form of the graphic code, but also carrying the data information through the graphic code can attract the public eye, thereby It can improve the attention of the data information carried by the graphic code. By setting the graphic code to include a plurality of reference icons, the graphic code can adjust the number of reference icons according to the number of data information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
附图说明DRAWINGS
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present disclosure. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是本公开实施例提供的一种图形码的示意图;1 is a schematic diagram of a graphic code provided by an embodiment of the present disclosure;
图2是本公开实施例提供的另一种图形码的示意图;2 is a schematic diagram of another graphic code provided by an embodiment of the present disclosure;
图3是本公开实施例提供的图形码的识别方法的流程图;3 is a flowchart of a method for identifying a graphic code according to an embodiment of the present disclosure;
图4A是本公开实施例提供的又一种图形码的示意图;4A is a schematic diagram of still another graphic code provided by an embodiment of the present disclosure;
图4B是本公开实施例提供的又一种图形码的示意图;4B is a schematic diagram of still another graphic code provided by an embodiment of the present disclosure;
图5是本公开实施例提供的一种图形码的应用场景示意图;FIG. 5 is a schematic diagram of an application scenario of a graphic code according to an embodiment of the present disclosure;
图6是本公开实施例提供的图形码的识别装置的结构示意图;FIG. 6 is a schematic structural diagram of a device for identifying a graphic code according to an embodiment of the present disclosure;
图7是本公开实施例提供的图形码的识别终端的结构示意图;7 is a schematic structural diagram of a terminal for identifying a graphic code according to an embodiment of the present disclosure;
图8是本公开实施例提供的图形码的生成终端的结构示意图。FIG. 8 is a schematic structural diagram of a terminal for generating a graphic code according to an embodiment of the present disclosure.
具体实施方式detailed description
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。The embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.
本公开实施例提供一种图形码,该图形码包括多个基准图标和至少一条参考线。当图形码包括多条参考线时,参考线之间相互平行且等间距分布。参考线用于定位基准图标的位置,因此,这些参考线可以为实际存在于图形码中的直线,即参考线同基准图标一起显示于图形码中,如图1所示;这些参考线也可以为仅用于定位基准图标位置的逻辑线,即图形码中不显示参考线,如图2所示,图2中的虚线表示参考线,其在图形码中不显示。基准图标的形状可以根据图形码的应用场合而定,具体实施时,基准图标的形状可以为圆形、等边三角形等。Embodiments of the present disclosure provide a graphics code including a plurality of reference icons and at least one reference line. When the graphic code includes a plurality of reference lines, the reference lines are arranged parallel to each other and equally spaced. The reference line is used to locate the position of the reference icon. Therefore, these reference lines can be straight lines actually existing in the graphic code, that is, the reference lines are displayed in the graphic code together with the reference icons, as shown in FIG. 1; these reference lines can also be The logic line is only used to locate the position of the reference icon, that is, the reference line is not displayed in the graphic code. As shown in FIG. 2, the broken line in FIG. 2 indicates the reference line, which is not displayed in the graphic code. The shape of the reference icon may be determined according to the application of the graphic code. In the specific implementation, the shape of the reference icon may be a circle, an equilateral triangle, or the like.
图形码中携带数据信息,为了获得本公开实施例提供的图形码中携带的数 据信息,本公开实施例提供一种图形码的识别方法,该识别方法可以通过具有图形码识别功能的终端来实现,该图形码的识别方法的具体实现方法详见下述实施例中的内容:The data code carries the data information. In order to obtain the data information carried in the graphic code provided by the embodiment of the present disclosure, the embodiment of the present disclosure provides a method for identifying a graphic code, which can be implemented by a terminal having a graphic code recognition function. The specific implementation method of the identification method of the graphic code is as follows:
图3为本公开实施例提供图形码的识别方法的流程图。如图3所示,该图形码的识别方法包括如下步骤:FIG. 3 is a flowchart of a method for identifying a graphic code according to an embodiment of the present disclosure. As shown in FIG. 3, the method for identifying the graphic code includes the following steps:
S1,获取目标图像。S1, acquiring a target image.
其中,目标图像可以为终端图库中预先存储的一张待识别图片,也可以是终端的摄像头当前拍摄到的一张待识别图片,还可以是终端当前正在扫描的待识别图片。The target image may be a pre-stored image to be recognized in the terminal gallery, or may be a to-be-identified image currently captured by the camera of the terminal, or may be a to-be-identified image currently being scanned by the terminal.
另外,由于终端直接扫描一整张待识别图片的话,可能需要的运行内存比较大,导致识别速率比较慢。为了避免这种情况出现,在识别待识别图片时,可以将待识别图片分块处理,如将待识别图片分割为多个矩形,并对每个矩形进行识别。因此,目标图像还可以为将一张待识别图片分割成的多个矩形图像中的任一个。其中,为了保证分割得到的矩形图像中包括完整的图形码,在分割待识别图像时,要确保相邻的矩形图像之间部分重叠,且分割到的每个矩形图像的尺寸不小于图形码的尺寸。具体地,在将待识别图片分割为多个矩形图像时,可以根据终端摄像头的像素大小及通常设置的图形码的长高比例来实现。如,如果终端摄像头的像素大小为1000*1000,且图形码的长高比例为10:1,则在分割矩形图像时,可以将待识别图片从下到上或者从上到下分割为尺寸为1000*120的十个矩形图像。In addition, since the terminal directly scans a whole picture to be recognized, the running memory may be required to be relatively large, resulting in a relatively slow recognition rate. In order to avoid such a situation, when the picture to be identified is identified, the picture to be identified may be divided into blocks, such as dividing the picture to be identified into a plurality of rectangles, and identifying each rectangle. Therefore, the target image may also be any one of a plurality of rectangular images into which one picture to be recognized is divided. In order to ensure that the rectangular image obtained by the segmentation includes the complete graphic code, when dividing the image to be recognized, it is ensured that the adjacent rectangular images partially overlap, and the size of each of the divided rectangular images is not smaller than the graphic code. size. Specifically, when the picture to be recognized is divided into a plurality of rectangular images, it can be implemented according to the pixel size of the terminal camera and the length ratio of the commonly set graphic code. For example, if the pixel size of the terminal camera is 1000*1000, and the aspect ratio of the graphic code is 10:1, when the rectangular image is divided, the image to be recognized can be divided into a size from bottom to top or top to bottom. Ten rectangular images of 1000*120.
进一步地,由于目标图像中可能会存在一些影响图形码识别的干扰因素,因此,在获取到目标图像后,可以对目标图像进行去噪处理来达到提高识别率的效果。其中,在对目标图像进行去噪处理时,包括但限于通过腐蚀膨胀算法处理目标图像。Further, since there may be some interference factors affecting the recognition of the graphic code in the target image, after the target image is acquired, the target image may be denoised to achieve the effect of improving the recognition rate. Wherein, when performing denoising processing on the target image, including but limited to processing the target image by a corrosion expansion algorithm.
S2,在目标图像中,识别图形码中的参考线的位置,并识别图形码中的多个基准图标的位置。S2. In the target image, identify the position of the reference line in the graphic code and identify the position of the plurality of reference icons in the graphic code.
关于参考线的数量、基准图标的形状和数量,本公开实施例均不作具体限定。基准图标的形状可以根据图形码的应用场合或所携带数据信息的类型等因素来确定。例如,如果图形码应用于音乐领域,则基准图标的形状可以为音符形状等,从而达到生动形象地表示应用场景的目的。基准图标的数量可以根据 所需要表达的信息量的多少来确定。例如,当图形码中包括10个基准图标,每个基准图标与参考线的相对位置信息为9个,且每个基准图标的状态包括实心和空心时,这个图形码可以携带的信息量为1810。关于基准图标与参考线的相对位置信息将在下面的内容中进行解释,此处暂不叙述。可选地,本公开实施例提供的图形码中包括8-16个基准图标。Regarding the number of reference lines, the shape and the number of reference icons, the embodiments of the present disclosure are not specifically limited. The shape of the reference icon can be determined according to factors such as the application of the graphic code or the type of data information carried. For example, if the graphic code is applied to the music field, the shape of the reference icon may be a note shape or the like, thereby achieving the purpose of vividly representing the application scene. The number of reference icons can be determined based on the amount of information that needs to be expressed. For example, when the graphic code includes 10 reference icons, the relative position information of each reference icon and the reference line is 9, and the state of each reference icon includes solid and hollow, the amount of information that the graphic code can carry is 1810. . Information about the relative position of the reference icon and the reference line will be explained in the following content, which will not be described here. Optionally, the graphic code provided by the embodiment of the present disclosure includes 8-16 reference icons.
其中,图形码中的参考线的位置包括但不限于通过参考线的直线方程来标识。也就是说,识别图形码中的参考线的位置即为确定图形码中的参考线的直线方程。Wherein, the position of the reference line in the graphic code includes but is not limited to being identified by a straight line equation of the reference line. That is, identifying the position of the reference line in the graphic code is a linear equation for determining the reference line in the graphic code.
具体地,该步骤S2在目标图像中,识别图形码中的参考线的位置时,包括但不限于通过如下两种方式来实现:Specifically, the step S2 identifies, in the target image, the position of the reference line in the graphic code, including but not limited to the following two ways:
第一种方式:图形码中除包括参考线和多个基准图标外,还包括至少一个定位图标,定位图标用于定位参考线的位置。在此基础上,在识别图形码中的参考线的位置时,可以先识别图形码中的至少一个定位图标的位置;然后,基于至少一个定位图标的位置,确定图形码中的参考线的位置。The first way: the graphic code includes at least one positioning icon in addition to the reference line and the plurality of reference icons, and the positioning icon is used to locate the position of the reference line. On the basis of this, when identifying the position of the reference line in the graphic code, the position of the at least one positioning icon in the graphic code may be first identified; then, the position of the reference line in the graphic code is determined based on the position of the at least one positioning icon. .
其中,定位图标的数量可以为一个、两个或三个等。定位图标的形状可以有很多种,如定位图标的形状为正六边形、圆形或正方形等。定位图标的形状与基准图标的形状可以相同,也可以不同。结合定位图标的数量,该种方式在识别图形码中的参考线的位置时,至少可以包括如下3种情况。The number of positioning icons may be one, two or three, and the like. The shape of the positioning icon can be various, such as the shape of the positioning icon is a regular hexagon, a circle or a square. The shape of the positioning icon may be the same as or different from the shape of the reference icon. In combination with the number of positioning icons, the manner of identifying the position of the reference line in the graphic code may include at least the following three cases.
第1种情况:定位图标的数量为一个。该种情况下,为了便于识别出定位图标,可以预设定位图标相对于基准图标具有明显特征,如定位图标的尺寸与基准图标的尺寸不同或者定位图标的形状与基准图标的形状不同。为了能够根据定位图标的位置确定参考线的位置,本公开实施例可以预设定位图标中包括两个与参考线建立关联关系的特征图形。如,定位图标内部预设有两个圆形且这两个圆形的圆心均位于多条参考线中的某一条指定参考线上。在此基础上,在识别图形码中的参考线的位置时,先根据定位图标与基准图标之间的明显特征确定定位图标的位置;然后,确定定位图标中包括的特征图形的位置;接着,确定与特征图形建立关联关系的参考线的位置;最后,根据参考线之间相互平行且等间距分布的特征确定其它参考线的位置。Case 1: The number of positioning icons is one. In this case, in order to facilitate the identification of the positioning icon, the positioning icon may be preset to have a distinct feature with respect to the reference icon, such as the size of the positioning icon being different from the size of the reference icon or the shape of the positioning icon being different from the shape of the reference icon. In order to be able to determine the position of the reference line according to the position of the positioning icon, the embodiment of the present disclosure may preset the positioning icon to include two feature patterns associated with the reference line. For example, the positioning icon is internally provided with two circles and the centers of the two circles are located on one of the plurality of reference lines. On the basis of this, when identifying the position of the reference line in the graphic code, first determining the position of the positioning icon according to the obvious feature between the positioning icon and the reference icon; then, determining the position of the feature graphic included in the positioning icon; then, The position of the reference line that is associated with the feature graphic is determined; finally, the position of the other reference line is determined based on features that are parallel and equally spaced between the reference lines.
例如,如果定位图标为明显大于其余基准图标的一个大圆,定位图标内部设置有两个特征小圆,且预设两个特征小圆的圆心均位于多条参考线中从上至下数的第3条参考线上,则定位图标的位置可以为这两个特征小圆的圆心位置。 此时,在识别图形码中的参考线的位置时,可以先识别出该大圆在图形码中的位置;然后,在该大圆中查找两个特征小圆的圆心位置;接下来,根据这两个特征小圆的圆心位置确定第3条参考线的位置;最后,根据参考线的等间距分布的特征确定图形码中除第3条参考线外的其它参考线的位置。For example, if the positioning icon is a large circle that is significantly larger than the rest of the reference icons, the positioning icon is internally provided with two characteristic small circles, and the center of the preset two characteristic small circles is located in the plurality of reference lines from top to bottom. On the three reference lines, the position of the positioning icon can be the center position of the small circle of the two features. At this time, when identifying the position of the reference line in the graphic code, the position of the large circle in the graphic code may be first recognized; then, the center position of the two characteristic small circles is found in the large circle; The position of the center of the feature small circle determines the position of the third reference line; finally, the position of the other reference lines other than the third reference line in the graphic code is determined according to the characteristics of the equally spaced distribution of the reference line.
其中,此处及下述内容中涉及的根据参考线的等间距分布的特征确定其它参考线的位置的方式将在后面的内容中进行详述。Here, the manner in which the characteristics of the other reference lines are determined according to the characteristics of the equidistant distribution of the reference lines referred to herein and below will be described in detail later.
第2种情况:定位图标的数量为两个。在该种情况下,为了便于识别这两个定位图标,可以预设这两个定位图标具有明显区别,且这两个定位图标具有预设的相对位置关系。该预设的相对位置关系可以为这两个定位图标中的特征点与某一条参考线之间具有关联关系。例如,两个定位图标均为圆形,且它们的直径不同,它们的圆心为其特征点,且这两个圆形的圆心均位于某一条参考线上。在此基础上,在识别图形码中的参考线的位置时,先确定这两个定位图标的位置;然后,确定它们中的特征点的位置;接下来,根据这两个定位图标中的特征点的位置确定与特征点具有关联关系的参考线的位置;最后,根据参考线之间相互平行且等间距分布的特征确定其它参考线的位置。Case 2: The number of positioning icons is two. In this case, in order to facilitate the identification of the two positioning icons, the two positioning icons may be preset to have a significant difference, and the two positioning icons have a preset relative positional relationship. The preset relative positional relationship may be an association relationship between the feature points in the two positioning icons and a certain reference line. For example, both positioning icons are circular, and their diameters are different, their centers are their feature points, and the centers of the two circles are located on a certain reference line. On the basis of this, when identifying the position of the reference line in the graphic code, first determine the positions of the two positioning icons; then, determine the position of the feature points in them; next, according to the features in the two positioning icons The position of the point determines the position of the reference line that is associated with the feature point; finally, the position of the other reference line is determined based on features that are parallel and equally spaced between the reference lines.
优选地,在本公开实施例中,该种情况中的定位图标包括具有预设的相对位置关系的第一定位圆和第二定位圆,第一定位圆和第二定位圆的直径不同。此时,定位图标的位置可以为第一定位圆的圆心位置和第二定位圆的圆心位置。其中,该预设的相对位置关系包括:第一定位圆的圆心位于第一预设参考线上且第二定位圆的圆心位于第二预设参考线上。第一预设参考线和第二预设参考线可以相同,也可以不同。Preferably, in the embodiment of the present disclosure, the positioning icon in the case includes a first positioning circle and a second positioning circle having a preset relative positional relationship, and the diameters of the first positioning circle and the second positioning circle are different. At this time, the position of the positioning icon may be the center position of the first positioning circle and the center position of the second positioning circle. The preset relative positional relationship includes: a center of the first positioning circle is located on the first preset reference line and a center of the second positioning circle is located on the second preset reference line. The first preset reference line and the second preset reference line may be the same or different.
当第一预设参考线和第二预设参考线相同时,即第一定位圆和第二定位圆的圆心位于同一参考线上时,可以根据第一定位圆的圆心位置和第二定位圆的圆心位置确定它们所在的参考线的位置,并根据参考线之间相互平行且等间距分布的特征确定其它参考线的位置。When the first preset reference line and the second preset reference line are the same, that is, the centers of the first positioning circle and the second positioning circle are located on the same reference line, according to the center position of the first positioning circle and the second positioning circle The position of the center of the circle determines the position of the reference line in which they are located, and the position of the other reference lines is determined based on features that are parallel and equally spaced between the reference lines.
当第一预设参考线和第二预设参考线不相同时,可以预设第一定位圆和第二定位圆的圆心所在的参考线的位置,如预设第一预设参考线为参考线中的第三条参考线,预设第二预设参考线为参考线中的第四条参考线。进而在识别时,根据第一定位圆的圆心和第二定位圆的圆心的位置分别确定第一预设参考线和第二预设参考线的位置,并根据参考线之间相互平行且等间距分布的特征确定其它参考线的位置。When the first preset reference line and the second preset reference line are different, the positions of the reference lines where the centers of the first positioning circle and the second positioning circle are located may be preset, such as preset the first preset reference line as a reference. The third reference line in the line, the second preset reference line is preset as the fourth reference line in the reference line. Further, at the time of identification, the positions of the first predetermined reference line and the second preset reference line are respectively determined according to the positions of the center of the first positioning circle and the center of the second positioning circle, and are parallel and equally spaced according to the reference lines. The characteristics of the distribution determine the location of other reference lines.
进一步地,当图形码中的两个定位图标为第一定位圆和第二定位圆时,需要先识别出第一定位圆和第二定位圆。本公开实施例在识别定位圆时,先识别出其中的一个,再根据预设的相对位置关系识别另外一个。如先识别出第一定位圆,再识别第二定位圆。为了便于说明,此处以先识别第一定位圆为例进行说明。为了便于从图形码中识别出第一定位圆,可以预设第一定位圆的半径范围,即无论终端扫码的远近,第一定位圆的半径均落在这个预设的半径范围内。在此基础上,在目标图像中,识别图形码中的至少一个定位图标的位置时,可以:先基于第一定位圆预设的半径范围,在目标图像中识别图形码中的第一定位圆;然后,在目标图像中识别第二定位圆。Further, when the two positioning icons in the graphic code are the first positioning circle and the second positioning circle, the first positioning circle and the second positioning circle need to be identified first. When identifying the positioning circle, the embodiment of the present disclosure first identifies one of the positioning circles, and then identifies another one according to the preset relative positional relationship. If the first positioning circle is first identified, the second positioning circle is identified. For convenience of explanation, the first positioning circle is first identified as an example. In order to facilitate the identification of the first positioning circle from the graphic code, the radius of the first positioning circle may be preset, that is, the radius of the first positioning circle falls within the preset radius regardless of the distance of the terminal scanning code. On the basis of the above, in the target image, when identifying the position of the at least one positioning icon in the graphic code, the first positioning circle in the graphic code may be identified in the target image based on the preset radius range of the first positioning circle. Then, the second positioning circle is identified in the target image.
其中,在识别第二定位圆时,根据第一定位圆与第二定位圆之间预设的相对位置关系实现。例如,如果预设的相对位置关系中还设置第二定位圆为与第一定位圆距离最近的圆,则可以识别与第一定位圆距离最近的圆,将与第一定位圆距离最近的圆作为图形码中的第二定位圆。具体地,在识别与第一定位圆距离最近的圆时,可以先识别图形码中的圆形及对应的圆心,然后从识别到的圆形中查找圆心与第一定位圆的圆心之间的距离最小的圆,作为第二定位圆。又例如,如果预设的相对位置关系中设置第二定位圆与第一定位圆相邻且其圆心与第一定位圆的圆心在同一参考线上时,则可以在目标图像中第一定位圆两侧的图形中识别圆心与第一定位圆的圆心在同一参考线上的圆,将该圆心与第一定位圆的圆心在同一参考线上的圆作为第二定位圆。当然,如果预设的相对位置关系中设置第二定位圆为其它情况,还可以通过其它对应方式识别第二定位圆,本实施例在此不再列举。Wherein, when the second positioning circle is identified, the relative positional relationship between the first positioning circle and the second positioning circle is implemented. For example, if the preset relative position relationship further sets the second positioning circle to be the circle closest to the first positioning circle, the circle closest to the first positioning circle may be identified, and the circle closest to the first positioning circle may be identified. As the second positioning circle in the graphic code. Specifically, when identifying a circle closest to the first positioning circle, the circle and the corresponding center in the graphic code may be first identified, and then the center of the circle and the center of the first positioning circle are searched from the identified circle. The smallest circle from the distance, as the second positioning circle. For another example, if the preset relative positional relationship is set to be adjacent to the first positioning circle and the center of the circle is on the same reference line as the center of the first positioning circle, the first positioning circle may be in the target image. In the graphs on both sides, a circle whose center is on the same reference line as the center of the first positioning circle is identified, and a circle whose center is on the same reference line as the center of the first positioning circle is used as the second positioning circle. Certainly, if the second positioning circle is set in the preset relative position relationship, the second positioning circle may be identified by other corresponding manners, which is not enumerated in this embodiment.
进一步地,该种情况下,预设的相对位置关系中还可以定义第一定位圆与第二定位圆在水平方向的相对位置关系,如预设的相对位置关系中定义第二定位圆在第一定位圆的右侧。通过在预设的相对位置关系中定义第一定位圆与第二定位圆在水平方向的相对位置关系,在识别出第一定位圆和第二定位圆后,还可以识别终端的扫码方向。例如,结合上面预设第二定位圆在第一定位圆右侧的例子,当扫码过程中发现第二定位圆在第一定位圆的左侧,则可以确定终端当前为反向扫码。需要说明的是,通过该种方式判断终端扫码方向时,为避免识别的扫码方向出错,如当第二定位圆位于第一定位圆一侧时,如果位于第一定位圆另一侧相同位置的基准图标与第二定位圆的形状和尺寸均相同时可能会导致识别的扫码方向出错,因此,该种情况应该保证基准图标与第二定位 圆具有明显区别,如形状不同。又如,当基准图标为基准圆时,应该确保基准圆与第二定位圆的直径不同。Further, in this case, the relative positional relationship between the first positioning circle and the second positioning circle in the horizontal direction may be defined in the preset relative position relationship, and the second positioning circle is defined in the preset relative position relationship. One is positioned to the right of the circle. By defining the relative positional relationship between the first positioning circle and the second positioning circle in the horizontal direction in the preset relative positional relationship, after the first positioning circle and the second positioning circle are recognized, the scanning direction of the terminal can also be identified. For example, in combination with the example in which the second positioning circle is preset to the right of the first positioning circle, when the second positioning circle is found to be on the left side of the first positioning circle during the scanning process, it may be determined that the terminal is currently a reverse scanning code. It should be noted that, in this manner, when the scanning direction of the terminal is determined, the scanning direction of the identification is avoided, for example, when the second positioning circle is located on the side of the first positioning circle, if the second positioning circle is located on the other side of the first positioning circle. When the position icon and the second positioning circle are the same in shape and size, the direction of the scanned code may be wrong. Therefore, it should be ensured that the reference icon is significantly different from the second positioning circle, such as a different shape. For another example, when the reference icon is the reference circle, it should be ensured that the reference circle is different from the diameter of the second positioning circle.
第3种情况:定位图标的数量为三个。本公开实施例中在该种情况下介绍三个定位图标均为圆形的情况,即该种情况在第2种情况的基础上,定位图标除包括第一定位圆和第二定位圆外,还包括第三定位圆,且预设第三定位圆的圆心与第一定位圆的圆心在竖直方向上有相对位置关系。如,预设第三定位圆的圆心在第一定位圆的圆心所在参考线的上面那条参考线上,从而限定了第三定位圆的圆心与第一定位圆的圆心在竖直方向的关系,进而在识别过程中,终端可以判断是正向识别图形码,还是反向识别图形码。具体地,如果识别到的第三定位圆的圆心与第一定位圆的圆心在竖直方向的关系,与它们预设竖直方向上的相对位置关系一致,则可以确定终端当前正在正向扫描图形码。反之,可以确定终端当前正在反向扫描图形码。Case 3: The number of positioning icons is three. In the case of the present disclosure, the case where the three positioning icons are all circular is introduced in the case that the positioning icon includes the first positioning circle and the second positioning circle, in addition to the second positioning case. The third positioning circle is further included, and the center of the third positioning circle is preset to have a relative positional relationship with the center of the first positioning circle in the vertical direction. For example, the center of the third positioning circle is preset on the reference line above the reference line of the center of the first positioning circle, thereby defining the relationship between the center of the third positioning circle and the center of the first positioning circle in the vertical direction. Then, in the identification process, the terminal can determine whether to recognize the graphic code in the forward direction or to recognize the graphic code in the reverse direction. Specifically, if the relationship between the center of the third positioning circle and the center of the first positioning circle in the vertical direction is consistent with the relative positional relationship in the preset vertical direction, it may be determined that the terminal is currently scanning in the forward direction. Graphic code. Conversely, it can be determined that the terminal is currently scanning the graphics code in reverse.
优选地,如图4A所示的图形码中,定位图标包括第一定位圆、第二定位圆和第三定位圆,第二定位圆和第三定位圆的半径相同并小于第一定位圆的半径,且第二定位圆和第三定位圆分别位于第一定位圆两侧,第一定位圆的圆心和第二定位圆的圆心位于同一参考线上,第三定位圆的圆心位于第一定位圆的圆心所在参考线的上面的参考线上。在识别该图形码时可以:首先,根据第一定位圆的半径识别第一定位圆;然后,在第一定位圆两侧的圆中查找圆心与第一定位圆的圆心处于同一直线的圆作为第二定位圆,将第一定位圆另一侧的圆作为第三定位圆;接下来,根据第一定位圆的圆心和第二定位圆的圆心位置确定它们所在的参考线的位置,并根据第一定位圆和第二定位圆的圆心所在的参考线的位置及根据参考线之间相互平行且等间距分布的特征确定其它参考线的位置;最后,根据第一定位圆的圆心和第三定位圆的圆心在竖直方向的位置关系确定终端的扫码方向。Preferably, in the graphic code shown in FIG. 4A, the positioning icon includes a first positioning circle, a second positioning circle, and a third positioning circle, and the second positioning circle and the third positioning circle have the same radius and are smaller than the first positioning circle. a radius, and the second positioning circle and the third positioning circle are respectively located on two sides of the first positioning circle, the center of the first positioning circle and the center of the second positioning circle are located on the same reference line, and the center of the third positioning circle is located at the first positioning The center of the circle is on the reference line above the reference line. When the graphic code is recognized, first, the first positioning circle is identified according to the radius of the first positioning circle; then, a circle having a circle center and a center of the first positioning circle is found in a circle on both sides of the first positioning circle as a circle a second positioning circle, the circle on the other side of the first positioning circle is used as a third positioning circle; next, determining the position of the reference line where the first reference circle is located according to the center of the first positioning circle and the center of the second positioning circle, and according to Positions of reference lines where the center of the first positioning circle and the second positioning circle are located and positions of other reference lines are determined according to mutually parallel and equally spaced features between the reference lines; finally, according to the center of the first positioning circle and the third The positional relationship of the center of the positioning circle in the vertical direction determines the scanning direction of the terminal.
进一步地,由于当扫描距离不同时,参考线之间的间距便不相同,为了准确根据参考线之间相互平行且等间距分布的特征确定其它参考线的位置,需要预设定位图标的尺寸与参考线之间的间距存在一定的比值关系。如预设第一定位圆的直径与相邻参考线的间距之间的比值为固定值。在此基础上,当确定某一条参考线的直线方程后(如当第一定位圆和第二定位圆的圆心处于同一参考线上,根据第一定位圆和第二定位圆的圆心确定它们所在的参考线的直线方程后),可以获取定位图标在目标图像中的尺寸,并根据定位图标在目标图像中 的尺寸和预设的定位图标尺寸与参考线间距之间的比值,确定目标图像中相邻参考线之间的间距,从而根据确定的某一条参考线的直线方程和目标图像中相邻参考线之间的间距确定其它参考线的直线方程。Further, since the spacing between the reference lines is different when the scanning distance is different, in order to accurately determine the positions of the other reference lines according to the features of the parallel and equally spaced distribution between the reference lines, the size of the preset positioning icons needs to be preset. There is a certain ratio relationship between the spacing between the reference lines. For example, the ratio between the diameter of the first positioning circle and the spacing of adjacent reference lines is a fixed value. On the basis of this, after determining the linear equation of a certain reference line (for example, when the centers of the first positioning circle and the second positioning circle are on the same reference line, determining the position according to the center of the first positioning circle and the second positioning circle After the line equation of the reference line), the size of the positioning icon in the target image can be obtained, and the target image is determined according to the ratio between the size of the positioning icon in the target image and the preset positioning icon size and the reference line spacing. The spacing between adjacent reference lines to determine the line equations of the other reference lines based on the determined line equation of one of the reference lines and the spacing between adjacent reference lines in the target image.
例如,当定位图标包括第一定位圆时,可以预设第一定位圆的直径与相邻参考线的间距的比值为固定值。在此基础上,当确定某一条参考线的直线方程后,可以先获取目标图像中第一定位圆的直径,并根据目标图像中第一定位圆的直径和预设的第一定位圆的直径与相邻参考线的间距的比值,计算目标图像中相邻参考线之间的间距,最后根据确定的某一条参考线的直线方程及计算得到的目标图像中相邻参考线之间的间距确定其它参考线的直线方程。For example, when the positioning icon includes the first positioning circle, the ratio of the diameter of the first positioning circle to the spacing of adjacent reference lines may be preset to a fixed value. On the basis of this, after determining the linear equation of a certain reference line, the diameter of the first positioning circle in the target image may be obtained first, and according to the diameter of the first positioning circle in the target image and the diameter of the preset first positioning circle. Calculating the distance between adjacent reference lines in the target image, and determining the spacing between adjacent reference lines in the target image according to the determined linear equation of a certain reference line and the calculated spacing between adjacent reference lines in the target image. The straight line equation for other reference lines.
需要说明的是,上述识别参考线的位置中所涉及的3种情况中,根据一条参考线的位置和相邻参考线之间的间距确定其余参考线的位置的方式均可以通过该举例中的方法来确定。It should be noted that, in the three cases involved in identifying the position of the reference line, the manner of determining the positions of the remaining reference lines according to the position of one reference line and the spacing between adjacent reference lines may be adopted in the example. Method to determine.
另外,图形码中除定位图标为圆形外,基准图标也为圆形,即基准图标为基准圆。在一个优选实施例中,图形码中包括第一定位圆、第二定位圆、多个基准圆和多条相互平行且等间距分布的参考线,第一定位圆的直径大于第二定位圆的直径,且第二定位圆与基准圆具有相同的直径,图形码中基准圆的直径与相邻参考线之间的距离满足预设比值,如图4A所示的图形码。在该实施例中,在基于至少一个定位图标的位置,确定图形码中的参考线的位置时,可以:基于第一定位圆的圆心位置、第二定位圆的圆心位置、第二定位圆在目标图像中的直径和预设比值,确定图形码中的参考线的位置。该预设比值的具体数值可以根据需要设定,本公开实施例对此不作具体限定。In addition, in addition to the positioning icon being a circle, the reference icon is also a circle, that is, the reference icon is a reference circle. In a preferred embodiment, the graphic code includes a first positioning circle, a second positioning circle, a plurality of reference circles, and a plurality of reference lines arranged parallel to each other and equally spaced, the diameter of the first positioning circle being larger than the second positioning circle. The diameter, and the second positioning circle has the same diameter as the reference circle, and the distance between the diameter of the reference circle and the adjacent reference line in the graphic code satisfies a preset ratio, such as the graphic code shown in FIG. 4A. In this embodiment, when determining the position of the reference line in the graphic code based on the position of the at least one positioning icon, the center position of the first positioning circle, the center position of the second positioning circle, and the second positioning circle may be: The diameter in the target image and the preset ratio determine the position of the reference line in the graphic code. The specific value of the preset ratio may be set as needed, and the embodiment of the present disclosure does not specifically limit this.
需要说明的是,如图4A所示的图形码中的情况,即第一定位圆和第二定位圆的圆心处于同一参考线上的情况中,基于第一定位圆的圆心位置、第二定位圆的圆心位置、第二定位圆在目标图像中的直径和预设比值,确定图形码中的参考线的位置的方式同上面介绍的根据确定的某一条参考线的直线方程和目标图像中相邻参考线之间的间距确定其它参考线的直线方程的方式类似。然而,当第一定位圆的圆心位置、第二定位圆的圆心位置处于不同参考线上时,基于第一定位圆的圆心位置、第二定位圆的圆心位置、第二定位圆在目标图像中的直径和预设比值,确定图形码中的参考线的方式如下述举例:It should be noted that, in the case of the graphic code shown in FIG. 4A, that is, in the case where the centers of the first positioning circle and the second positioning circle are on the same reference line, based on the center position and the second positioning of the first positioning circle. The position of the center of the circle, the diameter of the second positioning circle in the target image, and the preset ratio, determining the position of the reference line in the graphic code in the same manner as the linear equation and the target image according to the determined one of the reference lines described above The spacing between adjacent reference lines is similar in that the line equations of other reference lines are determined. However, when the center position of the first positioning circle and the center position of the second positioning circle are on different reference lines, the center position based on the first positioning circle, the center position of the second positioning circle, and the second positioning circle are in the target image. The diameter and the preset ratio, the way to determine the reference line in the graphic code is as follows:
例如,预设第一定位圆的圆心所在参考线为m1,第二定位圆的圆心所在 参考线为m2,参考线为m1与参考线为m2之间间隔n个预设的参考线间距。在此基础上,在识别图形码中的参考线位置时:首先,基于第一定位圆圆心坐标和第二定位圆圆心坐标建立参考线m1和参考线m2的直线方程,需要注意,此时建立的直线方程中的参考线m1和参考线m2的斜率k1和k2未知;接着,基于第一定位圆的预设直径、第一定位圆在目标图像中的直径和预设的参考线间距,计算出目标图像中参考线之间的间距,该目标图像中参考线之间的间距乘以n即为目标图像中参考线m1和参考线m2之间的距离;最后,基于目标图像中参考线m1和参考线m2之间的距离和建立的斜率未知的两个直线方程,即可计算出k1和k2,进而确定了参考线m1和参考线m2的直线方程。For example, the reference line of the center of the first positioning circle is preset as m1, the reference line of the center of the second positioning circle is m2, and the reference line is m1 and the reference line is m2 with n preset reference line spacings. On the basis of this, when identifying the position of the reference line in the graphic code: first, based on the first positioning circle center coordinate and the second positioning circle center coordinate, the line equation of the reference line m1 and the reference line m2 is established, and it is necessary to pay attention to establish The slopes k1 and k2 of the reference line m1 and the reference line m2 in the straight line equation are unknown; then, based on the preset diameter of the first positioning circle, the diameter of the first positioning circle in the target image, and the preset reference line spacing, The distance between the reference lines in the target image, the distance between the reference lines in the target image multiplied by n is the distance between the reference line m1 and the reference line m2 in the target image; finally, based on the reference line m1 in the target image With the distance between the reference line m2 and the two straight line equations whose slopes are unknown, k1 and k2 can be calculated, and the linear equations of the reference line m1 and the reference line m2 are determined.
进一步地,如图4B所示的图形码,该图形码中包括第一定位圆(图4B中的大圆)、第二定位圆(图4B中大圆右侧的小圆)、多个基准圆和多条相互平行且等间距分布的参考线,第二定位圆与基准圆的直径相同,基准圆的直径与相邻参考线之间的距离比值为1:1,即图形码中基准圆的直径与相邻参考线之间的距离相同,且第一定位圆、第二定位圆和基准圆的圆心均位于参考线上或位于相邻两条参考线中间的辅助参考线上。通过如此设置可以使图形码更加美观。更优选地,该图形码中相邻基准圆的圆心在水平方向的距离相同。当然,图4B所示的图形码中大圆左侧的那个小圆也可以为定位圆,其余圆为基准圆。Further, as shown in FIG. 4B, the graphic code includes a first positioning circle (the large circle in FIG. 4B), a second positioning circle (the small circle on the right side of the large circle in FIG. 4B), a plurality of reference circles, and a plurality of reference lines arranged parallel to each other and equally spaced, the second positioning circle is the same diameter as the reference circle, and the ratio of the diameter of the reference circle to the adjacent reference line is 1:1, that is, the diameter of the reference circle in the graphic code The distance from the adjacent reference line is the same, and the centers of the first positioning circle, the second positioning circle, and the reference circle are all located on the reference line or on the auxiliary reference line between the two adjacent reference lines. By setting this up, the graphic code can be made more beautiful. More preferably, the center of the adjacent reference circle in the graphic code has the same distance in the horizontal direction. Of course, the small circle on the left side of the big circle in the graphic code shown in FIG. 4B can also be a positioning circle, and the remaining circles are reference circles.
第二种方式:基于直线识别算法,在目标图像中,识别图形码中的参考线的位置。The second way: based on the line recognition algorithm, in the target image, the position of the reference line in the graphic code is identified.
其中,该直线识别算法可以为霍夫直线识别算法等。结合图形码中多条参考线相互平行且等间距分布的特征,该种方式可以基于直线识别算法,在目标图像中查找相互平行且等间距分布的多条直线,将查找到的相互平行且等间距分布的多条直线作为多条参考线,将这些直线的位置作为图形码中参考线的位置。The line recognition algorithm may be a Hough line recognition algorithm or the like. Combining the features of multiple reference lines in the graphic code which are parallel and evenly spaced, the method can search for multiple lines parallel to each other and equally spaced in the target image based on the line recognition algorithm, and find the parallel lines and so on. A plurality of straight lines of the pitch distribution are used as a plurality of reference lines, and the positions of the straight lines are taken as the positions of the reference lines in the graphic code.
该种方式下,确定每条参考线的位置的方式,可以通过直线识别算法确定一条参考线的位置,然后通过上面内容中介绍的根据一条参考线的位置确定其余参考线的位置的方式确定其余参考线的位置;也可以直接通过直线识别算法确定每条参考线的位置。In this mode, the position of each reference line is determined. The position of a reference line can be determined by a line recognition algorithm, and then the rest is determined by determining the position of the remaining reference lines according to the position of one reference line described in the above content. The position of the reference line; the position of each reference line can also be determined directly by the line recognition algorithm.
进一步地,步骤S2在识别图形码中的多个基准图标的位置时,可以通过图形识别算法实现。例如,当基准图标为基准圆时,可以通过霍夫圆识别算法 识别基准圆。当基准图标为基准圆时,基准图标的位置可以为基准圆的圆心位置。需要说明的是,上述内容中提及的识别圆的方式,均可以通过霍夫圆识别算法来实现。Further, step S2 can be implemented by a pattern recognition algorithm when identifying the positions of the plurality of reference icons in the graphic code. For example, when the reference icon is a reference circle, the reference circle can be identified by the Hough circle recognition algorithm. When the reference icon is the reference circle, the position of the reference icon can be the center position of the reference circle. It should be noted that the manner of identifying the circle mentioned in the above content can be realized by the Hough circle recognition algorithm.
当图形码中的定位图标为定位圆,基准图标为基准圆时,为了避免识别出错,通常图形码中会预设定位圆与基准圆之间不重叠、不相交及不存在包含与被包含关系等特征,因此,在获取到目标图像后,可以先通过圆识别算法查找目标图像中的多个圆,然后对查找到的多个圆进行预处理,以去掉多个圆中明显不具备定位圆和基准圆特征的圆,从而避免这些圆对后续的识别过程产生干扰,进而提高识别率。When the positioning icon in the graphic code is the positioning circle and the reference icon is the reference circle, in order to avoid the recognition error, usually the graphic code does not overlap between the positioning circle and the reference circle, does not intersect, and does not exist in the inclusion relationship. And so on, therefore, after acquiring the target image, the circle recognition algorithm can be used to find multiple circles in the target image, and then the plurality of circles found are preprocessed to remove the plurality of circles and obviously have no positioning circle. And the circle of the reference circle feature, so as to avoid the interference of these circles on the subsequent recognition process, thereby improving the recognition rate.
优选地,如图4A或图4B所示,图形码中基准圆的圆心位于任一条参考线上,或者位于相邻的两条参考线中间的辅助参考线上,且相邻基准圆不重叠。在此基础上,在识别图形码中的多个基准圆的圆心位置时,还可以从每条参考线和每条辅助参考线的中点向两边扫描;根据扫描结果判断每条参考线和每条辅助参考线上是否存在像素颜色呈指定规律变化的像素,其中,指定规律为空心圆或实心圆圆心所在直线的像素颜色变化规律;如果任一条参考线或任一条辅助参考线上存在像素颜色呈指定规律变化的像素,则确定该条参考线或该条辅助参考线上存在基准圆,并记录基准圆及其所在的参考线或辅助参考线的标识信息;根据每个基准圆及其所在参考线或辅助参考线的标识信息确定每个基准圆的位置。Preferably, as shown in FIG. 4A or FIG. 4B, the center of the reference circle in the graphic code is located on any of the reference lines, or on the auxiliary reference line between the adjacent two reference lines, and the adjacent reference circles do not overlap. On the basis of this, when identifying the center position of the plurality of reference circles in the graphic code, scanning from the midpoint of each reference line and each auxiliary reference line to both sides; determining each reference line and each according to the scanning result Whether there is a pixel whose pixel color changes in a specified pattern on the auxiliary reference line, wherein the color of the pixel of the line where the hollow circle or the center of the solid circle is specified is specified; if there is a pixel color on any of the reference lines or any auxiliary reference line A pixel that changes in a specified pattern determines whether there is a reference circle on the reference line or the auxiliary reference line, and records identification information of the reference circle and the reference line or auxiliary reference line where it is located; according to each reference circle and its The identification information of the reference line or the auxiliary reference line determines the position of each reference circle.
S3,根据参考线的位置和多个基准图标的位置,确定每个基准图标与参考线的相对位置信息。S3. Determine relative position information of each reference icon and the reference line according to the position of the reference line and the position of the plurality of reference icons.
其中,相对位置信息的具体内容可以根据图形码的样式而定。例如,当图形码中包括多条参考线,且基准图标位于参考线上或辅助参考线上时,相对位置信息可以为参考线的标识信息或辅助参考线的标识信息。又例如,当图形码中仅包括一条参考线时,相对位置信息可以为基准图标与该参考线的距离(在参考线上方距离为正,下方则为负),也可以为该距离除以单位长度所得的倍数值。此处,一个单位长度的定义可以为第一定位圆的直径或第二定位圆的直径。The specific content of the relative position information may be determined according to the style of the graphic code. For example, when a plurality of reference lines are included in the graphic code, and the reference icon is located on the reference line or the auxiliary reference line, the relative position information may be identification information of the reference line or identification information of the auxiliary reference line. For another example, when only one reference line is included in the graphic code, the relative position information may be the distance between the reference icon and the reference line (the distance is positive above the reference line, and the lower is negative), and the distance may be divided by the unit. The multiple of the length. Here, one unit length may be defined as the diameter of the first positioning circle or the diameter of the second positioning circle.
优选地,图形码中的基准图标为基准圆,基准图标的位置为基准圆的圆心位置,基准圆的圆心位置设置于参考线上或设置于相邻参考线中间的辅助参考线上。在此基础上,在根据参考线的位置和多个基准图标的位置,确定每个基 准图标与参考线的相对位置信息时,可以:根据参考线的位置和多个基准圆的圆心位置,对于圆心在参考线上的第一类基准圆,确定第一类基准圆的圆心所在的参考线的标识信息,作为第一类基准圆与参考线的相对位置信息,对于圆心不在参考线上的第二类基准圆,确定与第二类基准圆的圆心距离最近的两条参考线,将与第二类基准圆的圆心距离最近的两条参考线中间的的辅助参考线的标识信息作为第二类基准圆与参考线的相对位置信息。Preferably, the reference icon in the graphic code is a reference circle, the position of the reference icon is the center position of the reference circle, and the center position of the reference circle is set on the reference line or on the auxiliary reference line disposed in the middle of the adjacent reference line. On the basis of this, when determining the relative position information of each reference icon and the reference line according to the position of the reference line and the position of the plurality of reference icons, the position of the reference line and the center position of the plurality of reference circles may be: The first type of reference circle of the center of the reference line determines the identification information of the reference line where the center of the first type of reference circle is located, as the relative position information of the reference circle of the first type and the reference line, and the first position of the reference line is not on the reference line The second type of reference circle determines two reference lines closest to the center distance of the second type of reference circle, and the identification information of the auxiliary reference line in the middle of the two reference lines closest to the center of the second type of reference circle is used as the second Relative position information of the reference circle and the reference line.
其中,参考线的标识信息可以通过参考线的编号表示,辅助参考线的标识信息可以通过辅助参考线的编号表示。具体地,在图形码中,可以预先将多条参考线从上至下进行编号,并将该编号作为参考线的标识信息,并预先将相邻参考线中间的辅助参考线从上至下依次编号,将该编号作为辅助参考线的标识信息。The identification information of the reference line may be represented by the number of the reference line, and the identification information of the auxiliary reference line may be represented by the number of the auxiliary reference line. Specifically, in the graphic code, a plurality of reference lines may be numbered from top to bottom in advance, and the number is used as the identification information of the reference line, and the auxiliary reference lines in the middle of the adjacent reference lines are sequentially arranged from top to bottom. Number, which is used as the identification information of the auxiliary reference line.
结合图4A所示的图形码,如果参考线由上至下的编号为1、3、5、7和9,定位圆为中间的大圆和其右侧的小圆,其余图形为基准圆,则第一类基准圆为由左至右数的第1个和第3个圆,第二类基准圆为由左至右的数的第2个、第4个、第7个、第8个和第9个圆。图4A中,当定位图标为图4A中的大圆和其左右侧的两个小圆,其余图形为基准圆,且参考线的标识信息或辅助参考线的标识信息为基准图标与参考线的相对位置信息时,从左至右的各个基准图标与参考线的相对位置信息分别为3、6、7、8、6和2。In combination with the graphic code shown in FIG. 4A, if the reference lines are numbered 1, 3, 5, 7, and 9 from top to bottom, the positioning circle is a large circle in the middle and a small circle on the right side thereof, and the remaining figures are reference circles, The first type of reference circle is the first and third circles from left to right, and the second type of reference circle is the second, fourth, seventh, and eighth of the left to right number. The 9th round. In FIG. 4A, when the positioning icon is the large circle in FIG. 4A and the two small circles on the left and right sides thereof, the remaining graphics are reference circles, and the identification information of the reference line or the identification information of the auxiliary reference line is the relative relationship between the reference icon and the reference line. In the position information, the relative position information of each of the reference icons and the reference lines from left to right are 3, 6, 7, 8, 6, and 2, respectively.
S4,基于每个基准图标与参考线的相对位置信息,确定图形码对应的编码字符串。S4. Determine an encoded character string corresponding to the graphic code based on the relative position information of each of the reference icons and the reference line.
编码字符串为对图形码的识别结果,通过该编码字符串可以直接或间接获得图形码中携带的数据信息。该步骤S4包括但不限于通过如下两种实现方式:The encoded string is a recognition result of the graphic code, and the data information carried in the graphic code can be directly or indirectly obtained through the encoded string. This step S4 includes but is not limited to the following two implementations:
第一种方式:编码字符串直接为每个基准图标与参考线的相对位置信息的组合。The first way: the encoded string is directly a combination of the relative position information of each reference icon and the reference line.
该种情况下,每个基准图标与参考线均存在一个相对位置信息,组合所有基准图标与参考线的相对位置信息,即可得到图形码对应的编码字符串。例如,如果每个基准图标与参考线的相对位置信息为它们所在的参考线或辅助参考线的编号,则组合所有基准图标所在的参考线或辅助参考线的编号,得到图形码对应的编码字符串。图4A所示的图形码中,当定位图标为图4A中的大圆和其左右侧的两个小圆时,图形码对应的编码字符串为367862。In this case, each reference icon and the reference line have a relative position information, and the relative position information of all the reference icons and the reference line is combined to obtain the coded string corresponding to the graphic code. For example, if the relative position information of each reference icon and the reference line is the number of the reference line or the auxiliary reference line where they are located, the number of the reference line or the auxiliary reference line where all the reference icons are located is combined to obtain the coded character corresponding to the graphic code. string. In the graphic code shown in FIG. 4A, when the positioning icon is the large circle in FIG. 4A and the two small circles on the left and right sides thereof, the code string corresponding to the graphic code is 367862.
第二种方式:编码字符串由每个基准图标与参考线的相对位置信息转化而 来。The second way: the encoded string is converted from the relative position information of each reference icon and the reference line.
该种方式下,终端中预先存储有相对位置信息与编码字符的对应关系。此种方式下步骤S4可以:基于每个基准图标与参考线的相对位置信息,以及预先存储的相对位置信息与编码字符的对应关系,确定图形码对应的编码字符串。具体地,在获得每个基准图标与参考线的相对位置信息后,可以将每个基准图标与参考线的相对位置信息,与预先存储的相对位置信息与编码字符的对应关系进行比对,来确定每个基准图标与参考线的相对位置信息对应的编码字符。组合所有基准图标与参考线的相对位置信息对应的编码字符,得到图形码对应的编码字符串。In this manner, the correspondence between the relative position information and the coded characters is stored in advance in the terminal. In this manner, step S4 may: determine the encoded character string corresponding to the graphic code based on the relative position information of each reference icon and the reference line, and the correspondence between the previously stored relative position information and the encoded character. Specifically, after obtaining the relative position information of each of the reference icons and the reference line, the relative position information of each of the reference icons and the reference line may be compared with the correspondence between the previously stored relative position information and the coded characters. A coded character corresponding to the relative position information of each reference icon and the reference line is determined. The coded characters corresponding to the relative position information of all the reference icons and the reference lines are combined to obtain an encoded character string corresponding to the graphic code.
进一步地,通常为了数据信息的安全,图形码中实际包括的数据信息可能并不存储于终端中,而是存储于服务器上,则为了获得图形码中实际包括的数据信息,终端可以对编码字符串进行加密,并将加密后的编码字符串发送至服务器,服务器解密得到编码字符串后,查找编码字符串与信息的对应关系,得到图形码实际包括的数据信息,并将数据信息返回终端,此时终端得到图形码中的信息。该过程即为根据编码字符串间接获得图形码中携带的数据信息的一种方式。通过对编码字符串加密后再进行发送,可以提高数据信息的安全性,防止编码字符串因被抓包而泄露。Further, generally, for the security of the data information, the data information actually included in the graphic code may not be stored in the terminal, but stored on the server, and the terminal may encode the character in order to obtain the data information actually included in the graphic code. The string is encrypted, and the encrypted encoded string is sent to the server. After the server decrypts the encoded string, the server searches for the correspondence between the encoded string and the information, obtains the data information actually included in the graphic code, and returns the data information to the terminal. At this point, the terminal gets the information in the graphic code. The process is a way to obtain the data information carried in the graphic code indirectly according to the encoded character string. By encrypting the encoded string and then transmitting it, the security of the data information can be improved, and the encoded string can be prevented from being leaked due to the captured packet.
本公开实施例提供的图形码,包括相互平行的多条参考线和多个基准圆,可以根据图形码的这些特征将该图形码应用于一些特定的场景。如图4A和图4B所示的图形码,该图形码包括相互平行的五条参考线,类似于音乐中的五线谱,且包括两种半径的圆,图4A和图4B中的大圆为第一定位圆,第一定位圆右侧的圆为第二定位圆,其余圆为基准圆,且第二定位圆与其它基准圆的直径相同。由于该图形码包括五线谱,且直径相同的基准圆与五线谱中的音符大小相类似,因而可以将该图形码应用于音乐领域来携带歌手信息、专辑信息或者音乐的下载地址等。如图5所示,其为该图形码的一种具体应用场景,当扫描到该图形码后,终端跳转至对应的音乐播放界面。因此,当将本公开实施例提供的图形码应用于特定领域时,可以更加形象生动地表达图形码所携带的数据信息,从而增加数据信息的关注度。另外,图形码中的第一定位圆中还可以放置图形码所携带的数据信息的品牌标识,从而增加图形码与品牌的结合度,进而增大对品牌的宣传效果。The graphic code provided by the embodiment of the present disclosure includes a plurality of reference lines and a plurality of reference circles that are parallel to each other, and the graphic code can be applied to some specific scenes according to the features of the graphic code. As shown in FIG. 4A and FIG. 4B, the graphic code includes five reference lines parallel to each other, similar to the staff in music, and includes circles of two radii, and the large circle in FIGS. 4A and 4B is the first positioning. The circle, the circle on the right side of the first positioning circle is the second positioning circle, the remaining circles are the reference circle, and the second positioning circle has the same diameter as the other reference circles. Since the graphic code includes a staff and the reference circle of the same diameter is similar to the note size in the staff, the graphic code can be applied to the music field to carry the singer information, the album information, or the download address of the music. As shown in FIG. 5, it is a specific application scenario of the graphic code. After scanning the graphic code, the terminal jumps to the corresponding music playing interface. Therefore, when the graphic code provided by the embodiment of the present disclosure is applied to a specific field, the data information carried by the graphic code can be more vividly expressed, thereby increasing the degree of attention of the data information. In addition, the first positioning circle in the graphic code can also place the brand identifier of the data information carried by the graphic code, thereby increasing the combination degree of the graphic code and the brand, thereby increasing the publicity effect on the brand.
当然,本公开实施例提供的图形码及其识别方法显然可以应用于其它需要 使用图形码的领域,本公开实施例在此不再详细举例。Of course, the graphics code and the identification method provided by the embodiments of the present disclosure are obviously applicable to other fields that require the use of the graphics code, and the embodiments of the present disclosure are not illustrated in detail herein.
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be combined to form an optional embodiment of the present disclosure, and will not be further described herein.
本公开实施例提供的方法,通过设置图形码包括多个基准图标,提供一种形式不同于条形码或二维码的新型图形码,从而不仅丰富了图形码的形式,而且通过该图形码来携带信息能够吸引大众眼球,从而能够提高图形码所携带的数据信息的关注度。通过设置图形码包括多个基准图标,使得该图形码可以根据所要标识的信息数量来调整基准图标的数量,不仅使用灵活方便,而且能适用于信息量很大的领域。The method provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code to include a plurality of reference icons, thereby enriching not only the form of the graphic code but also carrying the graphic code. Information can attract the attention of the public, which can increase the attention of the data information carried by the graphic code. By setting the graphic code to include a plurality of reference icons, the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
本公开实施例还提供一种图形码的生成方法,该生成方法包括:生成图形码;其中,图形码包括至少一条参考线;图形码包括多个基准图标,每个基准图标分别与参考线满足预设的相对位置关系;图形码携带数据信息,识别图形码用于获得数据信息。The embodiment of the present disclosure further provides a method for generating a graphic code, the generating method comprising: generating a graphic code; wherein the graphic code includes at least one reference line; the graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying the reference line Preset relative positional relationship; the graphic code carries data information, and the identification graphic code is used to obtain data information.
其中,本公开实施例提供的图形码的生成方法即用于生成上述实施例的目标图像中需要识别的图形码。识别图形码的结果用于获得图形码中携带的数据信息,即通过识别图形码可以获得其中携带的数据信息。The method for generating a graphic code provided by the embodiment of the present disclosure is used to generate a graphic code that needs to be identified in the target image of the foregoing embodiment. The result of identifying the graphic code is used to obtain the data information carried in the graphic code, that is, the data information carried therein can be obtained by identifying the graphic code.
参考线用于定位基准图标的位置。参考线的数量可以为一条,也可以为多条。当图形码包括多条参考线时,参考线之间相互平行且等间距分布。另外,参考线可以为实际存在于图形码中的直线;也可以为预设在图形码中的与基准图标之间满足预设的相对位置关系的逻辑线,即图形码中并不显示参考线,只是在确定基准图标位置的时候需要参考线的辅助。The reference line is used to position the datum icon. The number of reference lines can be one or multiple. When the graphic code includes a plurality of reference lines, the reference lines are arranged parallel to each other and equally spaced. In addition, the reference line may be a line actually existing in the graphic code; or may be a logical line that is preset in the graphic code and satisfies a preset relative positional relationship with the reference icon, that is, the reference line is not displayed in the graphic code. It is only necessary to assist the reference line when determining the position of the reference icon.
基准图标用于携带数据信息。关于图形码中基准图标的数量,可以根据所需携带的信息量的大小确定。当需要携带的数据信息量比较大时,可以设置图形码中包括的基准图标的数量比较多。基准图标的形状也可以根据需要设定,如基准图标为圆形、椭圆、等边三角形、六边形等。The benchmark icon is used to carry data information. Regarding the number of reference icons in the graphic code, it can be determined according to the size of the amount of information to be carried. When the amount of data information to be carried is relatively large, the number of reference icons included in the graphic code can be set to be relatively large. The shape of the reference icon can also be set as needed, such as a circle icon, an ellipse, an equilateral triangle, a hexagon, or the like.
每个基准图标分别与参考线满足预设的相对位置关系,根据该预设的相对位置关系可以获得每个基准图标与参考线的相对位置信息,确保如上面图形码的识别方法实施例中所述,在识别图形码时,通过每个基准图标与参考线的相对位置信息,可以确定图形码对应的编码字符串,进而获得图形码中携带的数据信息。Each of the reference icons respectively meets a preset relative positional relationship with the reference line, and the relative position information of each of the reference icons and the reference line can be obtained according to the preset relative positional relationship, and the method for identifying the graphic code is as described in the embodiment. In the case of recognizing the graphic code, the relative position information of each reference icon and the reference line can be used to determine the encoded character string corresponding to the graphic code, thereby obtaining the data information carried in the graphic code.
优选地,图形码除包括至少一条参考线和多个基准图标外,还包括至少一个定位图标,该定位图标用于在识别图形码的过程中对参考线进行定位。在此基础上,在识别图形码的过程中,先通过定位图标确定参考线的位置,然后根据参考线的位置确定基准图标的位置,最后根据基准图标与参考线的相对位置信息识别图形码中携带的数据信息。Preferably, the graphic code includes at least one positioning icon for positioning the reference line in the process of identifying the graphic code, in addition to the at least one reference line and the plurality of reference icons. On the basis of this, in the process of identifying the graphic code, the position of the reference line is first determined by the positioning icon, then the position of the reference icon is determined according to the position of the reference line, and finally the graphic code is identified according to the relative position information of the reference icon and the reference line. Carrying data information.
关于定位图标的数量及根据定位图标确定参考线的位置的具体实现方式等内容,已在上面的图形码的识别方法实施例中进行了详细地解释说明,具体可参见上面识别方法实施例中的相应内容,此处不再赘述。The content of the positioning icon and the specific implementation of determining the position of the reference line according to the positioning icon have been explained in detail in the above embodiment of the method for identifying the graphic code. For details, refer to the embodiment of the above identification method. The corresponding content will not be described here.
优选地,图形码中的至少一个定位图标可以包括第一定位圆和第二定位圆。第一定位圆和第二定位圆用于定位一条或两条参考线的位置。其中,第一定位圆和第二定位圆的半径可以相同,也可以不同,保证第一定位圆和第二定位圆包括不同的特征,使得能够区分第一定位圆和第二定位圆即可。然而,为了便于简单方便地区别第一定位圆和第二定位圆,图形码中的第一定位圆和第二定位圆为直径不同的圆。Preferably, at least one of the positioning icons may include a first positioning circle and a second positioning circle. The first positioning circle and the second positioning circle are used to position the one or two reference lines. The radius of the first positioning circle and the second positioning circle may be the same or different, and the first positioning circle and the second positioning circle are included to have different features, so that the first positioning circle and the second positioning circle can be distinguished. However, in order to facilitate the simple and convenient distinction between the first positioning circle and the second positioning circle, the first positioning circle and the second positioning circle in the graphic code are circles having different diameters.
其中,第一定位圆和第二定位圆之间具有预设的相对位置关系。关于第一定位圆和第二定位圆之间的预设的相对位置关系、识别第一定位圆和第二定位圆的方式及通过第一定位圆和第二定位圆确定一条或两条参考线的方式,已在上面的图形码的识别方法实施例中进行了详细地解释说明,具体可参见上述识别方法实施例中的相应内容。Wherein, the first positioning circle and the second positioning circle have a preset relative positional relationship. a predetermined relative positional relationship between the first positioning circle and the second positioning circle, a manner of identifying the first positioning circle and the second positioning circle, and determining one or two reference lines by the first positioning circle and the second positioning circle The method has been explained in detail in the above embodiment of the method for identifying the graphic code. For details, refer to the corresponding content in the embodiment of the above identification method.
优选地,图形码中除定位图标为圆形外,基准图标也为圆形,即基准图标为基准圆,且第二定位圆与基准圆具有相同的直径。也就是说,在该实施例中,图形码中包括第一定位圆、第二定位圆和多个基准圆,且第二定位圆和基准圆的直径相同。Preferably, in the graphic code, except that the positioning icon is a circle, the reference icon is also a circle, that is, the reference icon is a reference circle, and the second positioning circle has the same diameter as the reference circle. That is, in this embodiment, the graphic code includes a first positioning circle, a second positioning circle, and a plurality of reference circles, and the second positioning circle and the reference circle have the same diameter.
具体地,在该实施例中,图形码中包括两种直径的圆,第一定位圆的直径与第二定位圆的直径不同,例如,第一定位圆的直径大于第二定位圆的直径。通过如此设置,可以很容易地从图形码中识别出第一定位圆,并根据第一定位圆与第二定位圆之间预设的相对位置关系确定第二定位圆,进而可以确定图形码中的基准圆为哪些。Specifically, in this embodiment, the graphic code includes two diameter circles, and the diameter of the first positioning circle is different from the diameter of the second positioning circle. For example, the diameter of the first positioning circle is larger than the diameter of the second positioning circle. By setting in this way, the first positioning circle can be easily identified from the graphic code, and the second positioning circle is determined according to the preset relative positional relationship between the first positioning circle and the second positioning circle, thereby determining the graphic code. What is the benchmark circle?
进一步地,图形码包括第一定位圆、第二定位圆、多个基准圆和多条相互平行且等间距分布的参考线,第二定位圆和基准圆的直径相同,基准圆的直径与相邻参考线之间的距离满足预设比值。该预设比值的具体数值可以根据需要 设定。通过设置图形码中基准圆的直径与相邻参考线之间的距离满足预设比值,确保可以根据一条参考线的位置确定其余参考线的位置。关于根据一条参考线的位置确定其余参考线的位置的方式,可以参见上面实施例中的内容。优选地,该预设比值为1,即基准圆的直径与相邻参考线之间的距离相等,使得图形码更加美观。Further, the graphic code includes a first positioning circle, a second positioning circle, a plurality of reference circles, and a plurality of reference lines which are parallel and equally spaced, the second positioning circle and the reference circle have the same diameter, and the diameter and phase of the reference circle The distance between adjacent reference lines satisfies a preset ratio. The specific value of the preset ratio can be set as needed. By setting the distance between the diameter of the reference circle and the adjacent reference line in the graphic code to satisfy the preset ratio, it is ensured that the positions of the remaining reference lines can be determined according to the position of one reference line. Regarding the manner of determining the position of the remaining reference lines based on the position of one reference line, reference may be made to the contents of the above embodiment. Preferably, the preset ratio is 1, that is, the diameter of the reference circle is equal to the distance between adjacent reference lines, so that the graphic code is more beautiful.
优选地,图形码包括第一定位圆和第二定位圆、多个基准圆和多条相互平行且等间距分布的参考线,第一定位圆的圆心在任一参考线上,第二定位圆的圆心和基准圆的圆心分别在任一参考线上或在任两条相邻参考线中间的辅助参考线上,第二定位圆和基准圆的直径相同,如图4A和图4B所示。当图形码包括奇数条参考线时,第一定位圆的圆心位于正中间的那条参考线上。例如,当图形码包括五条参考线时,第一定位圆的圆心位于第三条参考线上。当然,在该实施例中,第二定位圆和基准圆的直径相同,且基准圆的直径与相邻参考线之间的距离满足预设比值。通过如此设置图形码中的基准圆和定位圆,使得图形码更加美观。优选地,如图4A和图4B所示,第一定位圆设置于图形码的中间位置,从而不仅便于识别第一定位圆,而且使图形码整体更加美观。Preferably, the graphic code comprises a first positioning circle and a second positioning circle, a plurality of reference circles and a plurality of reference lines arranged parallel to each other and equally spaced, the center of the first positioning circle is on any reference line, and the second positioning circle is The center of the center and the reference circle are respectively on any reference line or on the auxiliary reference line between any two adjacent reference lines, and the second positioning circle and the reference circle have the same diameter, as shown in FIGS. 4A and 4B. When the graphic code includes an odd number of reference lines, the center of the first positioning circle is located on the reference line in the middle. For example, when the graphic code includes five reference lines, the center of the first positioning circle is located on the third reference line. Of course, in this embodiment, the diameters of the second positioning circle and the reference circle are the same, and the distance between the diameter of the reference circle and the adjacent reference line satisfies a preset ratio. By setting the reference circle and the positioning circle in the graphic code in this way, the graphic code is more beautiful. Preferably, as shown in FIG. 4A and FIG. 4B, the first positioning circle is disposed at an intermediate position of the graphic code, so that not only the first positioning circle is easily recognized, but also the overall graphic code is more beautiful.
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be combined to form an optional embodiment of the present disclosure, and will not be further described herein.
本公开实施例提供的方法,通过设置图形码包括多个基准图标和至少一条参考线,提供一种形式不同于条形码或二维码的新型图形码,从而不仅丰富了图形码的形式,而且通过该图形码来携带信息能够吸引大众眼球,从而能够提高图形码所携带的数据信息的关注度。通过设置图形码包括多个基准图标,使得该图形码可以根据所要标识的信息数量来调整基准图标的数量,不仅使用灵活方便,而且能适用于信息量很大的领域。The method provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code including the plurality of reference icons and the at least one reference line, thereby enriching the form of the graphic code and passing The graphic code to carry information can attract the attention of the public, thereby improving the attention of the data information carried by the graphic code. By setting the graphic code to include a plurality of reference icons, the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
如图6所示,本公开实施例还提供一种图形码的识别装置,图形码包括多个基准图标,图形码的识别装置包括:As shown in FIG. 6, the embodiment of the present disclosure further provides a device for identifying a graphic code, where the graphic code includes a plurality of reference icons, and the device for identifying the graphic code includes:
获取模块601,用于获取目标图像;An obtaining module 601, configured to acquire a target image;
第一识别模块602,用于在目标图像中,识别图形码中的参考线的位置;a first identification module 602, configured to identify a position of a reference line in the graphic code in the target image;
第二识别模块603,用于识别图形码中的多个基准图标的位置;a second identification module 603, configured to identify locations of the plurality of reference icons in the graphic code;
第一确定模块604,用于根据参考线的位置和多个基准图标的位置,确定每个基准图标与参考线的相对位置信息;a first determining module 604, configured to determine relative position information of each reference icon and a reference line according to a position of the reference line and a position of the plurality of reference icons;
第二确定模块605,用于基于每个基准图标与参考线的相对位置信息,确定图形码对应的编码字符串。The second determining module 605 is configured to determine an encoded character string corresponding to the graphic code based on the relative position information of each of the reference icons and the reference line.
可选地,图形码中还包括至少一个定位图标,第一识别模块602包括:Optionally, the graphic code further includes at least one positioning icon, where the first identification module 602 includes:
识别单元,用于在目标图像中,识别图形码中的至少一个定位图标的位置;a identifying unit, configured to identify, in the target image, a location of the at least one positioning icon in the graphic code;
确定单元,用于基于至少一个定位图标的位置,确定图形码中的参考线的位置。And a determining unit, configured to determine a position of the reference line in the graphic code based on the position of the at least one positioning icon.
可选地,定位图标包括具有预设的相对位置关系的第一定位圆和第二定位圆,至少一个定位图标的位置包括第一定位圆的圆心位置和第二定位圆的圆心位置。Optionally, the positioning icon includes a first positioning circle and a second positioning circle having a preset relative positional relationship, and the position of the at least one positioning icon includes a center position of the first positioning circle and a center position of the second positioning circle.
可选地,识别单元包括:Optionally, the identification unit comprises:
第一识别子单元,用于基于预设的半径范围,在目标图像中,识别图形码中的第一定位圆;a first identifying subunit, configured to identify a first positioning circle in the graphic code in the target image based on the preset radius range;
第二识别子单元,用于在目标图像中,识别与第一定位圆距离最近的圆,作为图形码中的第二定位圆。And a second identification subunit, configured to identify, in the target image, a circle closest to the first positioning circle as a second positioning circle in the graphic code.
可选地,基准图标为基准圆,第二定位圆与基准圆具有相同的直径,图形码包括多条相互平行且等间距分布的参考线,在图形码中基准圆的直径与相邻参考线之间的距离满足预设比值;确定单元用于:基于第一定位圆的圆心位置、第二定位圆的圆心位置、第二定位圆在目标图像中的直径和预设比值,确定图形码中的参考线的位置。Optionally, the reference icon is a reference circle, and the second positioning circle has the same diameter as the reference circle, and the graphic code includes a plurality of reference lines that are parallel and equally spaced, and the diameter of the reference circle and the adjacent reference line in the graphic code The distance between the two meets the preset ratio; the determining unit is configured to: determine the graphic code based on the center position of the first positioning circle, the center position of the second positioning circle, the diameter of the second positioning circle in the target image, and the preset ratio value The location of the reference line.
可选地,第一识别模块602用于:基于直线识别算法,在目标图像中,识别图形码中的参考线的位置。Optionally, the first identification module 602 is configured to: identify, according to a line recognition algorithm, a position of a reference line in the graphic code in the target image.
可选地,基准图标为基准圆,基准图标的位置为基准圆的圆心位置,第一确定模块604用于:Optionally, the reference icon is a reference circle, and the position of the reference icon is a center position of the reference circle, and the first determining module 604 is configured to:
根据参考线的位置和多个基准圆的圆心位置,对于圆心在参考线上的第一类基准圆,确定第一类基准圆的圆心所在的参考线的标识信息,作为第一类基准圆与参考线的相对位置信息;对于圆心不在参考线上的第二类基准圆,确定与第二类基准圆的圆心距离最近的两条参考线,将与第二类基准圆的圆心距离最近的两条参考线中间的辅助参考线的标识信息作为第二类基准圆与参考线的相对位置信息。According to the position of the reference line and the center position of the plurality of reference circles, for the first type of reference circle whose center is on the reference line, the identification information of the reference line where the center of the first type of reference circle is located is determined as the first type of reference circle and Relative position information of the reference line; for the second type of reference circle whose center is not on the reference line, determine two reference lines closest to the center distance of the second type of reference circle, and the two closest to the center of the second type of reference circle The identification information of the auxiliary reference line in the middle of the reference line is used as the relative position information of the reference circle of the second type and the reference line.
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be combined to form an optional embodiment of the present disclosure, and will not be further described herein.
本公开实施例提供的装置,通过设置图形码包括多个基准图标,提供一种形式不同于条形码或二维码的新型图形码,从而不仅丰富了图形码的形式,而且通过该图形码来携带数据信息能够吸引大众眼球,从而能够提高图形码所携带的数据信息的关注度。通过设置图形码包括多个基准图标,使得该图形码可以根据所要标识的信息数量来调整基准图标的数量,不仅使用灵活方便,而且能适用于信息量很大的领域。The device provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code to include a plurality of reference icons, thereby enriching not only the form of the graphic code but also carrying the graphic code. The data information can attract the attention of the public, so that the attention of the data information carried by the graphic code can be improved. By setting the graphic code to include a plurality of reference icons, the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
本公开实施例还提供一种图形码的生成装置,该图形码的生成装置用于生成图形码;An embodiment of the present disclosure further provides a device for generating a graphic code, where the graphic code generating device is configured to generate a graphic code;
其中,图形码包括至少一条参考线;Wherein the graphic code includes at least one reference line;
图形码包括多个基准图标,每个基准图标分别与参考线满足预设的相对位置关系;The graphic code includes a plurality of reference icons, and each of the reference icons respectively meets a preset relative positional relationship with the reference line;
图形码携带数据信息,识别图形码用于获得数据信息。The graphic code carries data information, and the identification graphic code is used to obtain data information.
可选地,图形码还包括至少一个定位图标,定位图标用于在识别图形码的过程中对参考线进行定位。Optionally, the graphic code further includes at least one positioning icon for positioning the reference line in the process of identifying the graphic code.
可选地,至少一个定位图标包括第一定位圆和第二定位圆。Optionally, the at least one positioning icon comprises a first positioning circle and a second positioning circle.
可选地,基准图标为基准圆,第二定位圆与基准圆具有相同的直径。Optionally, the reference icon is a reference circle, and the second positioning circle has the same diameter as the reference circle.
可选地,图形码包括多条相互平行且等间距分布的参考线,在图形码中基准圆的直径与相邻参考线之间的距离满足预设比值。Optionally, the graphic code comprises a plurality of reference lines arranged in parallel and equally spaced, wherein the distance between the diameter of the reference circle and the adjacent reference line in the graphic code satisfies a preset ratio.
可选地,第一定位圆的圆心在任一参考线上,第二定位圆的圆心和基准圆的圆心分别在任一参考线上或在任两条相邻参考线中间的辅助参考线上。Optionally, the center of the first positioning circle is on any reference line, and the center of the second positioning circle and the center of the reference circle are respectively on any reference line or on an auxiliary reference line between any two adjacent reference lines.
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be combined to form an optional embodiment of the present disclosure, and will not be further described herein.
本公开实施例提供的装置,通过设置图形码包括多个基准图标和至少一条参考线,提供一种形式不同于条形码或二维码的新型图形码,从而不仅丰富了图形码的形式,而且通过该图形码来携带数据信息能够吸引大众眼球,从而能够提高图形码所携带的数据信息的关注度。通过设置图形码包括多个基准图标,使得该图形码可以根据所要标识的信息数量来调整基准图标的数量,不仅使用灵活方便,而且能适用于信息量很大的领域。The device provided by the embodiment of the present disclosure provides a new type of graphic code different from the barcode or the two-dimensional code by setting the graphic code including the plurality of reference icons and the at least one reference line, thereby enriching the form of the graphic code and passing The graphic code to carry the data information can attract the attention of the public, thereby improving the attention of the data information carried by the graphic code. By setting the graphic code to include a plurality of reference icons, the graphic code can adjust the number of the reference icons according to the amount of information to be identified, which is not only flexible and convenient, but also applicable to an area with a large amount of information.
本公开实施例提供一种图形码的识别装置,该图形码的识别装置为能够进 行图形码识别的终端。图7示出了本公开一个示例性实施例提供的终端700的结构框图。该终端700可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio LayerIII,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端700还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。Embodiments of the present disclosure provide a device for identifying a graphic code, the identification device of the graphic code being a terminal capable of performing graphic code recognition. FIG. 7 is a block diagram showing the structure of a terminal 700 provided by an exemplary embodiment of the present disclosure. The terminal 700 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), and an MP4 (Moving Picture Experts Group Audio Layer IV). 4) Player, laptop or desktop computer. Terminal 700 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
通常,终端700包括有:处理器701和存储器702。Generally, the terminal 700 includes a processor 701 and a memory 702.
处理器701可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器701可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器701也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器701可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器701还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。 Processor 701 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 701 may be configured by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve. The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of the content that the display needs to display. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
存储器702可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器702还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器702中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器701所执行以实现本申请中方法实施例提供的图形码的识别方法。 Memory 702 can include one or more computer readable storage media, which can be non-transitory. Memory 702 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in memory 702 is configured to store at least one instruction for execution by processor 701 to implement the graphics code provided by the method embodiments of the present application. Identification method.
在一些实施例中,终端700还可选包括有:外围设备接口703和至少一个外围设备。处理器701、存储器702和外围设备接口703之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口703相连。具体地,外围设备包括:射频电路704、触摸显示屏705、摄像头706、音频电路707、定位组件708和电源709中的至少一种。In some embodiments, the terminal 700 optionally further includes: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702, and the peripheral device interface 703 can be connected by a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 703 via a bus, signal line or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 704, a touch display screen 705, a camera 706, an audio circuit 707, a positioning component 708, and a power source 709.
外围设备接口703可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器701和存储器702。在一些实施例中,处理器701、 存储器702和外围设备接口703被集成在同一芯片或电路板上;在一些其他实施例中,处理器701、存储器702和外围设备接口703中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 703 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 701 and the memory 702. In some embodiments, processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one of processor 701, memory 702, and peripheral interface 703 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路704用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路704通过电磁信号与通信网络以及其他通信设备进行通信。射频电路704将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路704包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路704可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路704还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 704 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal. Radio frequency circuit 704 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 704 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. Radio frequency circuit 704 can communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to, a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and/or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 704 may also include NFC (Near Field Communication) related circuitry, which is not limited in this application.
显示屏705用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏705是触摸显示屏时,显示屏705还具有采集在显示屏705的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器701进行处理。此时,显示屏705还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏705可以为一个,设置终端700的前面板;在另一些实施例中,显示屏705可以为至少两个,分别设置在终端700的不同表面或呈折叠设计;在再一些实施例中,显示屏705可以是柔性显示屏,设置在终端700的弯曲表面上或折叠面上。甚至,显示屏705还可以设置成非矩形的不规则图形,也即异形屏。显示屏705可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 705 is used to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When display 705 is a touch display, display 705 also has the ability to capture touch signals over the surface or surface of display 705. The touch signal can be input to the processor 701 as a control signal for processing. At this time, the display screen 705 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 705 may be one, and the front panel of the terminal 700 is disposed; in other embodiments, the display screen 705 may be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; In still other embodiments, display screen 705 can be a flexible display screen disposed on a curved surface or a folded surface of terminal 700. Even the display screen 705 can be set to a non-rectangular irregular pattern, that is, a profiled screen. The display screen 705 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
摄像头组件706用于采集图像或视频。可选地,摄像头组件706包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件706还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可 以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。 Camera component 706 is used to capture images or video. Optionally, camera assembly 706 includes a front camera and a rear camera. Usually, the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal. In some embodiments, the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions. In some embodiments, camera assembly 706 can also include a flash. The flash can be a monochrome temperature flash or a two-color temperature flash. The two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
音频电路707可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器701进行处理,或者输入至射频电路704以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端700的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器701或射频电路704的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路707还可以包括耳机插孔。The audio circuit 707 can include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing to the processor 701 for processing, or input to the radio frequency circuit 704 for voice communication. For the purpose of stereo acquisition or noise reduction, the microphones may be multiple, and are respectively disposed at different parts of the terminal 700. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is then used to convert electrical signals from processor 701 or radio frequency circuit 704 into sound waves. The speaker can be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into human audible sound waves, but also the electrical signal can be converted into sound waves that are inaudible to humans for ranging and the like. In some embodiments, the audio circuit 707 can also include a headphone jack.
定位组件708用于定位终端700的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件708可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。The location component 708 is used to locate the current geographic location of the terminal 700 to implement navigation or LBS (Location Based Service). The positioning component 708 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, a Russian Greiner system, or an EU Galileo system.
电源709用于为终端700中的各个组件进行供电。电源709可以是交流电、直流电、一次性电池或可充电电池。当电源709包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。 Power source 709 is used to power various components in terminal 700. The power source 709 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 709 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端700还包括有一个或多个传感器710。该一个或多个传感器710包括但不限于:加速度传感器711、陀螺仪传感器712、压力传感器713、指纹传感器714、光学传感器715以及接近传感器716。In some embodiments, terminal 700 also includes one or more sensors 710. The one or more sensors 710 include, but are not limited to, an acceleration sensor 711, a gyro sensor 712, a pressure sensor 713, a fingerprint sensor 714, an optical sensor 715, and a proximity sensor 716.
加速度传感器711可以检测以终端700建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器711可以用于检测重力加速度在三个坐标轴上的分量。处理器701可以根据加速度传感器711采集的重力加速度信号,控制触摸显示屏705以横向视图或纵向视图进行用户界面的显示。加速度传感器711还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 711 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the terminal 700. For example, the acceleration sensor 711 can be used to detect components of gravity acceleration on three coordinate axes. The processor 701 can control the touch display screen 705 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 can also be used for the acquisition of game or user motion data.
陀螺仪传感器712可以检测终端700的机体方向及转动角度,陀螺仪传感器712可以与加速度传感器711协同采集用户对终端700的3D动作。处理器701根据陀螺仪传感器712采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 712 can detect the body direction and the rotation angle of the terminal 700, and the gyro sensor 712 can cooperate with the acceleration sensor 711 to collect the 3D motion of the user to the terminal 700. Based on the data collected by the gyro sensor 712, the processor 701 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
压力传感器713可以设置在终端700的侧边框和/或触摸显示屏705的下 层。当压力传感器713设置在终端700的侧边框时,可以检测用户对终端700的握持信号,由处理器701根据压力传感器713采集的握持信号进行左右手识别或快捷操作。当压力传感器713设置在触摸显示屏705的下层时,由处理器701根据用户对触摸显示屏705的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 713 can be disposed at a side border of the terminal 700 and/or a lower layer of the touch display screen 705. When the pressure sensor 713 is disposed on the side frame of the terminal 700, the user's holding signal to the terminal 700 can be detected, and the processor 701 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed on the lower layer of the touch display screen 705, the operability control on the UI interface is controlled by the processor 701 according to the user's pressure operation on the touch display screen 705. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
指纹传感器714用于采集用户的指纹,由处理器701根据指纹传感器714采集到的指纹识别用户的身份,或者,由指纹传感器714根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器701授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器714可以被设置终端700的正面、背面或侧面。当终端700上设置有物理按键或厂商Logo时,指纹传感器714可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 714 is used to collect the fingerprint of the user. The processor 701 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 701 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like. The fingerprint sensor 714 can be provided with the front, back or side of the terminal 700. When the physical button or vendor logo is provided on the terminal 700, the fingerprint sensor 714 can be integrated with the physical button or the manufacturer logo.
光学传感器715用于采集环境光强度。在一个实施例中,处理器701可以根据光学传感器715采集的环境光强度,控制触摸显示屏705的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏705的显示亮度;当环境光强度较低时,调低触摸显示屏705的显示亮度。在另一个实施例中,处理器701还可以根据光学传感器715采集的环境光强度,动态调整摄像头组件706的拍摄参数。Optical sensor 715 is used to collect ambient light intensity. In one embodiment, the processor 701 can control the display brightness of the touch display 705 based on the ambient light intensity acquired by the optical sensor 715. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 705 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 705 is lowered. In another embodiment, the processor 701 can also dynamically adjust the shooting parameters of the camera assembly 706 according to the ambient light intensity collected by the optical sensor 715.
接近传感器716,也称距离传感器,通常设置在终端700的前面板。接近传感器716用于采集用户与终端700的正面之间的距离。在一个实施例中,当接近传感器716检测到用户与终端700的正面之间的距离逐渐变小时,由处理器701控制触摸显示屏705从亮屏状态切换为息屏状态;当接近传感器716检测到用户与终端700的正面之间的距离逐渐变大时,由处理器701控制触摸显示屏705从息屏状态切换为亮屏状态。Proximity sensor 716, also referred to as a distance sensor, is typically disposed on the front panel of terminal 700. Proximity sensor 716 is used to collect the distance between the user and the front side of terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front side of the terminal 700 is gradually decreasing, the touch screen 705 is controlled by the processor 701 to switch from the bright screen state to the screen state; when the proximity sensor 716 detects When the distance between the user and the front side of the terminal 700 gradually becomes larger, the processor 701 controls the touch display screen 705 to switch from the screen state to the bright screen state.
本领域技术人员可以理解,图7中示出的结构并不构成对终端700的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。It will be understood by those skilled in the art that the structure shown in FIG. 7 does not constitute a limitation to the terminal 700, and may include more or less components than those illustrated, or may combine some components or adopt different component arrangements.
本公开实施例提供一种图形码的生成装置,该图形码的生成装置为能够进行图形码生成的终端。图8示出了本公开一个示例性实施例提供的终端800的 结构框图。该终端800可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端800还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。An embodiment of the present disclosure provides a device for generating a graphic code, which is a terminal capable of generating a graphic code. FIG. 8 is a block diagram showing the structure of a terminal 800 provided by an exemplary embodiment of the present disclosure. The terminal 800 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), and an MP4 (Moving Picture Experts Group Audio Layer IV). Level 4) Player, laptop or desktop computer. Terminal 800 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
通常,终端800包括有:处理器801和存储器802。Generally, the terminal 800 includes a processor 801 and a memory 802.
处理器801可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器801可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器801也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器801可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器801还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。 Processor 801 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 801 can be implemented by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve. The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby. In some embodiments, the processor 801 can be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of the content that the display needs to display. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
存储器802可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器802还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器802中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器801所执行以实现本申请中方法实施例提供的图形码的生成方法。 Memory 802 can include one or more computer readable storage media, which can be non-transitory. Memory 802 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash memory devices. In some embodiments, the non-transitory computer readable storage medium in memory 802 is configured to store at least one instruction for execution by processor 801 to implement the graphics code provided by the method embodiments of the present application. The method of generation.
在一些实施例中,终端800还可选包括有:外围设备接口803和至少一个外围设备。处理器801、存储器802和外围设备接口803之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口803相连。具体地,外围设备包括:射频电路804、触摸显示屏805、摄像头806、音频电路807、定位组件808和电源809中的至少一种。In some embodiments, terminal 800 also optionally includes a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 can be connected by a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 803 via a bus, signal line or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 804, a touch display screen 805, a camera 806, an audio circuit 807, a positioning component 808, and a power source 809.
外围设备接口803可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器801和存储器802。在一些实施例中,处理器801、存储器802和外围设备接口803被集成在同一芯片或电路板上;在一些其他实 施例中,处理器801、存储器802和外围设备接口803中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。 Peripheral device interface 803 can be used to connect at least one peripheral device associated with I/O (Input/Output) to processor 801 and memory 802. In some embodiments, processor 801, memory 802, and peripheral interface 803 are integrated on the same chip or circuit board; in some other embodiments, any of processor 801, memory 802, and peripheral interface 803 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路804用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路804通过电磁信号与通信网络以及其他通信设备进行通信。射频电路804将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路804包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路804可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路804还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 804 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal. Radio frequency circuit 804 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 804 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 804 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 804 can communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to, a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and/or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 may also include a circuit related to NFC (Near Field Communication), which is not limited in this application.
显示屏805用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏805是触摸显示屏时,显示屏805还具有采集在显示屏805的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器801进行处理。此时,显示屏805还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏805可以为一个,设置终端800的前面板;在另一些实施例中,显示屏805可以为至少两个,分别设置在终端800的不同表面或呈折叠设计;在再一些实施例中,显示屏805可以是柔性显示屏,设置在终端800的弯曲表面上或折叠面上。甚至,显示屏805还可以设置成非矩形的不规则图形,也即异形屏。显示屏805可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 805 is used to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When display 805 is a touch display, display 805 also has the ability to capture touch signals over the surface or surface of display 805. The touch signal can be input to the processor 801 for processing as a control signal. At this time, the display screen 805 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 805 may be one, and the front panel of the terminal 800 is disposed; in other embodiments, the display screen 805 may be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; In still other embodiments, the display screen 805 can be a flexible display screen disposed on a curved surface or a folded surface of the terminal 800. Even the display screen 805 can be set to a non-rectangular irregular pattern, that is, a profiled screen. The display screen 805 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
摄像头组件806用于采集图像或视频。可选地,摄像头组件806包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件806还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以 用于不同色温下的光线补偿。 Camera component 806 is used to capture images or video. Optionally, camera assembly 806 includes a front camera and a rear camera. Usually, the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal. In some embodiments, the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions. In some embodiments, camera assembly 806 can also include a flash. The flash can be a monochrome temperature flash or a two-color temperature flash. A two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
音频电路807可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器801进行处理,或者输入至射频电路804以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端800的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器801或射频电路804的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路807还可以包括耳机插孔。The audio circuit 807 can include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing to the processor 801 for processing, or input to the radio frequency circuit 804 for voice communication. For the purpose of stereo acquisition or noise reduction, the microphones may be multiple, and are respectively disposed at different parts of the terminal 800. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is then used to convert electrical signals from the processor 801 or the RF circuit 804 into sound waves. The speaker can be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into human audible sound waves, but also the electrical signal can be converted into sound waves that are inaudible to humans for ranging and the like. In some embodiments, audio circuit 807 can also include a headphone jack.
定位组件808用于定位终端800的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件808可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。The location component 808 is used to locate the current geographic location of the terminal 800 to implement navigation or LBS (Location Based Service). The positioning component 808 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, a Russian Greiner system, or an EU Galileo system.
电源809用于为终端800中的各个组件进行供电。电源809可以是交流电、直流电、一次性电池或可充电电池。当电源809包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。 Power source 809 is used to power various components in terminal 800. The power source 809 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 809 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端800还包括有一个或多个传感器810。该一个或多个传感器810包括但不限于:加速度传感器811、陀螺仪传感器812、压力传感器813、指纹传感器814、光学传感器815以及接近传感器816。In some embodiments, terminal 800 also includes one or more sensors 810. The one or more sensors 810 include, but are not limited to, an acceleration sensor 811, a gyro sensor 812, a pressure sensor 813, a fingerprint sensor 814, an optical sensor 815, and a proximity sensor 816.
加速度传感器811可以检测以终端800建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器811可以用于检测重力加速度在三个坐标轴上的分量。处理器801可以根据加速度传感器811采集的重力加速度信号,控制触摸显示屏805以横向视图或纵向视图进行用户界面的显示。加速度传感器811还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 811 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the terminal 800. For example, the acceleration sensor 811 can be used to detect components of gravity acceleration on three coordinate axes. The processor 801 can control the touch display screen 805 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 can also be used for the acquisition of game or user motion data.
陀螺仪传感器812可以检测终端800的机体方向及转动角度,陀螺仪传感器812可以与加速度传感器811协同采集用户对终端800的3D动作。处理器801根据陀螺仪传感器812采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 812 can detect the body direction and the rotation angle of the terminal 800, and the gyro sensor 812 can cooperate with the acceleration sensor 811 to collect the 3D motion of the user to the terminal 800. Based on the data collected by the gyro sensor 812, the processor 801 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
压力传感器813可以设置在终端800的侧边框和/或触摸显示屏805的下层。当压力传感器813设置在终端800的侧边框时,可以检测用户对终端800 的握持信号,由处理器801根据压力传感器813采集的握持信号进行左右手识别或快捷操作。当压力传感器813设置在触摸显示屏805的下层时,由处理器801根据用户对触摸显示屏805的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 813 may be disposed at a side border of the terminal 800 and/or a lower layer of the touch display screen 805. When the pressure sensor 813 is disposed on the side frame of the terminal 800, the user's holding signal to the terminal 800 can be detected, and the processor 801 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed on the lower layer of the touch display screen 805, the operability control on the UI interface is controlled by the processor 801 according to the user's pressure on the touch display screen 805. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
指纹传感器814用于采集用户的指纹,由处理器801根据指纹传感器814采集到的指纹识别用户的身份,或者,由指纹传感器814根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器801授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器814可以被设置终端800的正面、背面或侧面。当终端800上设置有物理按键或厂商Logo时,指纹传感器814可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 814 is configured to collect the fingerprint of the user, and the processor 801 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 801 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like. The fingerprint sensor 814 can be provided with the front, back or side of the terminal 800. When the physical button or vendor logo is provided on the terminal 800, the fingerprint sensor 814 can be integrated with the physical button or the manufacturer logo.
光学传感器815用于采集环境光强度。在一个实施例中,处理器801可以根据光学传感器815采集的环境光强度,控制触摸显示屏805的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏805的显示亮度;当环境光强度较低时,调低触摸显示屏805的显示亮度。在另一个实施例中,处理器801还可以根据光学传感器815采集的环境光强度,动态调整摄像头组件806的拍摄参数。Optical sensor 815 is used to collect ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the touch display screen 805 according to the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 805 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 805 is lowered. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 815.
接近传感器816,也称距离传感器,通常设置在终端800的前面板。接近传感器816用于采集用户与终端800的正面之间的距离。在一个实施例中,当接近传感器816检测到用户与终端800的正面之间的距离逐渐变小时,由处理器801控制触摸显示屏805从亮屏状态切换为息屏状态;当接近传感器816检测到用户与终端800的正面之间的距离逐渐变大时,由处理器801控制触摸显示屏805从息屏状态切换为亮屏状态。Proximity sensor 816, also referred to as a distance sensor, is typically disposed on the front panel of terminal 800. Proximity sensor 816 is used to capture the distance between the user and the front of terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front side of the terminal 800 is gradually decreasing, the touch screen 805 is controlled by the processor 801 to switch from the bright screen state to the screen state; when the proximity sensor 816 detects When the distance between the user and the front side of the terminal 800 gradually becomes larger, the processor 801 controls the touch display screen 805 to switch from the state of the screen to the bright state.
本领域技术人员可以理解,图8中示出的结构并不构成对终端800的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。It will be understood by those skilled in the art that the structure shown in FIG. 8 does not constitute a limitation to the terminal 800, and may include more or less components than those illustrated, or may combine some components or adopt different component arrangements.
本公开实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储有指令,该指令被处理器执行时实现上述实施例提供的图形码的识别方法。The embodiment of the present disclosure further provides a computer readable storage medium, where the computer readable storage medium stores instructions for implementing the method for identifying the graphic code provided by the foregoing embodiment when executed by the processor.
本公开实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储有指令,该指令被处理器执行时实现上述实施例提供的图形码的生成方法。The embodiment of the present disclosure further provides a computer readable storage medium, where the computer readable storage medium stores instructions for executing the method for generating the graphic code provided by the foregoing embodiment when executed by the processor.
需要说明的是:上述实施例提供的图形码的识别装置在识别图形码时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的图形码的识别装置与图形码的识别方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。另外,上述实施例提供的图形码的生成装置与图形码的生成方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the identification device of the graphic code provided in the above embodiment is only exemplified by the division of the above functional modules when identifying the graphic code. In actual applications, the functions may be allocated by different functional modules as needed. Upon completion, the internal structure of the device is divided into different functional modules to perform all or part of the functions described above. In addition, the identification device of the graphic code provided by the above embodiment is the same as the embodiment of the method for identifying the graphic code, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again. In addition, the device for generating the graphic code and the method for generating the graphic code are the same as the embodiment of the present invention. For details, refer to the method embodiment, and details are not described herein again.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本公开的较佳实施例,并不用以限制本公开,凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above description is only the preferred embodiment of the present disclosure, and is not intended to limit the disclosure. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and principles of the present disclosure, should be included in the protection of the present disclosure. Within the scope.

Claims (30)

  1. 一种图形码的识别方法,其特征在于,所述图形码包括多个基准图标,所述方法包括:A method for identifying a graphic code, wherein the graphic code comprises a plurality of reference icons, the method comprising:
    获取目标图像;Obtain the target image;
    在目标图像中,识别图形码中的参考线的位置,并识别所述图形码中的多个基准图标的位置;Identifying, in the target image, a position of the reference line in the graphic code and identifying a position of the plurality of reference icons in the graphic code;
    根据所述参考线的位置和所述多个基准图标的位置,确定每个基准图标与所述参考线的相对位置信息;Determining relative position information of each reference icon and the reference line according to a position of the reference line and a position of the plurality of reference icons;
    基于所述每个基准图标与所述参考线的相对位置信息,确定所述图形码对应的编码字符串。And determining, according to the relative position information of each of the reference icons and the reference line, an encoded character string corresponding to the graphic code.
  2. 根据权利要求1所述的方法,其特征在于,所述图形码中还包括至少一个定位图标,所述在目标图像中,识别图形码中的参考线的位置,包括:The method according to claim 1, wherein the graphic code further comprises at least one positioning icon, wherein in the target image, identifying a position of the reference line in the graphic code comprises:
    在所述目标图像中,识别图形码中的至少一个定位图标的位置;Identifying, in the target image, a location of at least one of the positioning icons in the graphic code;
    基于所述至少一个定位图标的位置,确定所述图形码中的参考线的位置。A position of a reference line in the graphic code is determined based on a location of the at least one positioning icon.
  3. 根据权利要求2所述的方法,其特征在于,所述定位图标包括具有预设的相对位置关系的第一定位圆和第二定位圆,所述至少一个定位图标的位置包括所述第一定位圆的圆心位置和所述第二定位圆的圆心位置。The method according to claim 2, wherein the positioning icon comprises a first positioning circle and a second positioning circle having a preset relative positional relationship, and the position of the at least one positioning icon comprises the first positioning The center position of the circle and the center position of the second positioning circle.
  4. 根据权利要求3所述的方法,其特征在于,所述在所述目标图像中,识别图形码中的至少一个定位图标的位置,包括:The method according to claim 3, wherein in the target image, identifying a location of at least one of the positioning icons in the graphic code comprises:
    基于预设的半径范围,在所述目标图像中,识别图形码中的第一定位圆;Identifying, in the target image, a first positioning circle in the graphic code based on a preset radius range;
    在所述目标图像中,识别与所述第一定位圆距离最近的圆,作为图形码中的第二定位圆。In the target image, a circle closest to the first positioning circle is identified as a second positioning circle in the graphic code.
  5. 根据权利要求3所述的方法,其特征在于,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值;The method according to claim 3, wherein the reference icon is a reference circle, the second positioning circle has the same diameter as the reference circle, and the graphic code comprises a plurality of parallel and equally spaced distributions a reference line, wherein a distance between a diameter of the reference circle and an adjacent reference line in the graphic code satisfies a preset ratio;
    所述基于所述至少一个定位图标的位置,确定所述图形码中的参考线的位置,包括:Determining a position of the reference line in the graphic code based on a location of the at least one positioning icon, including:
    基于所述第一定位圆的圆心位置、所述第二定位圆的圆心位置、所述第二定位圆在所述目标图像中的直径和所述预设比值,确定所述图形码中的参考线的位置。Determining a reference in the graphic code based on a center position of the first positioning circle, a center position of the second positioning circle, a diameter of the second positioning circle in the target image, and the preset ratio The position of the line.
  6. 根据权利要求1所述的方法,其特征在于,所述在目标图像中,识别图形码中的参考线的位置,包括:The method according to claim 1, wherein in the target image, identifying a position of a reference line in the graphic code comprises:
    基于直线识别算法,在目标图像中,识别图形码中的参考线的位置。Based on the line recognition algorithm, the position of the reference line in the graphic code is identified in the target image.
  7. 根据权利要求1所述的方法,其特征在于,所述基准图标为基准圆,所述基准图标的位置为基准圆的圆心位置,所述根据所述参考线的位置和所述多个基准图标的位置,确定每个基准图标与所述参考线的相对位置信息,包括:The method according to claim 1, wherein the reference icon is a reference circle, the position of the reference icon is a center position of a reference circle, the position according to the reference line, and the plurality of reference icons a location, determining relative position information of each reference icon and the reference line, including:
    根据所述参考线的位置和所述多个基准圆的圆心位置,对于圆心在参考线上的第一类基准圆,确定所述第一类基准圆的圆心所在的参考线的标识信息,作为所述第一类基准圆与所述参考线的相对位置信息,对于圆心不在参考线上的第二类基准圆,确定与所述第二类基准圆的圆心距离最近的两条参考线,将与所述第二类基准圆的圆心距离最近的两条参考线中间的辅助参考线的标识信息,作为所述第二类基准圆与所述参考线的相对位置信息。Determining identification information of a reference line where a center of the first type of reference circle is located, according to a position of the reference line and a center position of the plurality of reference circles, for a first type of reference circle whose center is on a reference line Determining relative position information of the first type of reference circle and the reference line, and determining, for a second type of reference circle whose center is not on the reference line, two reference lines closest to the center distance of the second type of reference circle, The identification information of the auxiliary reference line between the two reference lines closest to the center distance of the second type of reference circle is used as the relative position information of the second type of reference circle and the reference line.
  8. 一种图形码的生成方法,其特征在于,所述方法包括:A method for generating a graphic code, the method comprising:
    生成图形码;Generate a graphic code;
    其中,所述图形码包括至少一条参考线;Wherein the graphic code includes at least one reference line;
    所述图形码包括多个基准图标,每个基准图标分别与所述参考线满足预设的相对位置关系;The graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying a preset relative positional relationship with the reference line;
    所述图形码携带数据信息,识别所述图形码用于获得所述数据信息。The graphic code carries data information, and the graphic code is identified for obtaining the data information.
  9. 根据权利要求8所述的方法,其特征在于,所述图形码还包括至少一个定位图标,所述定位图标用于在识别所述图形码的过程中对所述参考线进行定位。The method of claim 8 wherein said graphic code further comprises at least one positioning icon for positioning said reference line in the process of identifying said graphic code.
  10. 根据权利要求9所述的方法,其特征在于,所述至少一个定位图标包括第一定位圆和第二定位圆。The method of claim 9 wherein said at least one positioning icon comprises a first positioning circle and a second positioning circle.
  11. 根据权利要求10所述的方法,其特征在于,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径。The method of claim 10 wherein said reference icon is a reference circle and said second positioning circle has the same diameter as said reference circle.
  12. 根据权利要求11所述的方法,其特征在于,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值。The method according to claim 11, wherein said graphic code comprises a plurality of mutually parallel and equally spaced reference lines, wherein said reference circle has a diameter between said reference circle and an adjacent reference line The distance meets the preset ratio.
  13. 根据权利要求11所述的方法,其特征在于,所述第一定位圆的圆心在任一参考线上,所述第二定位圆的圆心和所述基准圆的圆心分别在任一参考线上或在任两条相邻参考线中间的辅助参考线上。The method according to claim 11, wherein the center of the first positioning circle is on any reference line, and the center of the second positioning circle and the center of the reference circle are respectively on any reference line or in any An auxiliary reference line in the middle of two adjacent reference lines.
  14. 一种图形码的识别装置,其特征在于,所述图形码包括多个基准图标,所述装置包括:A device for identifying a graphic code, wherein the graphic code comprises a plurality of reference icons, and the device comprises:
    获取模块,用于获取目标图像;Obtaining a module for acquiring a target image;
    第一识别模块,用于在目标图像中,识别图形码中的参考线的位置;a first identification module, configured to identify a position of a reference line in the graphic code in the target image;
    第二识别模块,用于识别所述图形码中的多个基准图标的位置;a second identification module, configured to identify a location of the plurality of reference icons in the graphic code;
    第一确定模块,用于根据所述参考线的位置和所述多个基准图标的位置,确定每个基准图标与所述参考线的相对位置信息;a first determining module, configured to determine relative position information of each reference icon and the reference line according to a position of the reference line and a position of the plurality of reference icons;
    第二确定模块,用于基于所述每个基准图标与所述参考线的相对位置信息,确定所述图形码对应的编码字符串。And a second determining module, configured to determine, according to the relative position information of each of the reference icons and the reference line, an encoded character string corresponding to the graphic code.
  15. 根据权利要求14所述的装置,其特征在于,所述图形码中还包括至少一个定位图标,所述第一识别模块包括:The device according to claim 14, wherein the graphic code further comprises at least one positioning icon, the first identification module comprising:
    识别单元,用于在所述目标图像中,识别图形码中的至少一个定位图标的位置;An identifying unit, configured to identify, in the target image, a location of at least one positioning icon in the graphic code;
    确定单元,用于基于所述至少一个定位图标的位置,确定所述图形码中的参考线的位置。a determining unit, configured to determine a position of a reference line in the graphic code based on a location of the at least one positioning icon.
  16. 根据权利要求15所述的装置,其特征在于,所述定位图标包括具有预设的相对位置关系的第一定位圆和第二定位圆,所述至少一个定位图标的位置包括所述第一定位圆的圆心位置和所述第二定位圆的圆心位置。The device according to claim 15, wherein the positioning icon comprises a first positioning circle and a second positioning circle having a preset relative positional relationship, and the position of the at least one positioning icon comprises the first positioning The center position of the circle and the center position of the second positioning circle.
  17. 根据权利要求16所述的装置,其特征在于,所述识别单元包括:The device according to claim 16, wherein the identification unit comprises:
    第一识别子单元,用于基于预设的半径范围,在所述目标图像中,识别图形码中的第一定位圆;a first identifying subunit, configured to identify a first positioning circle in the graphic code in the target image based on a preset radius range;
    第二识别子单元,用于在所述目标图像中,识别与所述第一定位圆距离最近的圆,作为图形码中的第二定位圆。a second identification subunit, configured to identify, in the target image, a circle closest to the first positioning circle as a second positioning circle in the graphic code.
  18. 根据权利要求16所述的装置,其特征在于,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值;The apparatus according to claim 16, wherein said reference icon is a reference circle, said second positioning circle has the same diameter as said reference circle, and said graphic code comprises a plurality of mutually parallel and equally spaced distributions a reference line, wherein a distance between a diameter of the reference circle and an adjacent reference line in the graphic code satisfies a preset ratio;
    所述确定单元用于:基于所述第一定位圆的圆心位置、所述第二定位圆的圆心位置、所述第二定位圆在所述目标图像中的直径和所述预设比值,确定所述图形码中的参考线的位置。The determining unit is configured to: determine, according to a center position of the first positioning circle, a center position of the second positioning circle, a diameter of the second positioning circle in the target image, and the preset ratio The position of the reference line in the graphic code.
  19. 根据权利要求14所述的装置,其特征在于,所述第一识别模块用于:基于直线识别算法,在目标图像中,识别图形码中的参考线的位置。The apparatus according to claim 14, wherein the first identification module is configured to identify a position of a reference line in the graphic code in the target image based on a line recognition algorithm.
  20. 根据权利要求14所述的装置,其特征在于,所述基准图标为基准圆,所述基准图标的位置为基准圆的圆心位置,所述第一确定模块用于:The device according to claim 14, wherein the reference icon is a reference circle, the position of the reference icon is a center position of the reference circle, and the first determining module is configured to:
    根据所述参考线的位置和所述多个基准圆的圆心位置,对于圆心在参考线上的第一类基准圆,确定所述第一类基准圆的圆心所在的参考线的标识信息,作为所述第一类基准圆与所述参考线的相对位置信息,对于圆心不在参考线上的第二类基准圆,确定与所述第二类基准圆的圆心距离最近的两条参考线,将与所述第二类基准圆的圆心距离最近的两条参考线中间的辅助参考线的标识信息,作为所述第二类基准圆与所述参考线的相对位置信息。Determining identification information of a reference line where a center of the first type of reference circle is located, according to a position of the reference line and a center position of the plurality of reference circles, for a first type of reference circle whose center is on a reference line Determining relative position information of the first type of reference circle and the reference line, and determining, for a second type of reference circle whose center is not on the reference line, two reference lines closest to the center distance of the second type of reference circle, The identification information of the auxiliary reference line between the two reference lines closest to the center distance of the second type of reference circle is used as the relative position information of the second type of reference circle and the reference line.
  21. 一种图形码的生成装置,其特征在于,所述装置用于生成图形码;A device for generating a graphic code, wherein the device is configured to generate a graphic code;
    其中,所述图形码包括至少一条参考线;Wherein the graphic code includes at least one reference line;
    所述图形码包括多个基准图标,每个基准图标分别与所述参考线满足预设的相对位置关系;The graphic code includes a plurality of reference icons, each of the reference icons respectively satisfying a preset relative positional relationship with the reference line;
    所述图形码携带数据信息,识别所述图形码用于获得所述数据信息。The graphic code carries data information, and the graphic code is identified for obtaining the data information.
  22. 根据权利要求21所述的装置,其特征在于,所述图形码还包括至少一个定位图标,所述定位图标用于在识别所述图形码的过程中对所述参考线进行定位。The apparatus according to claim 21, wherein said graphic code further comprises at least one positioning icon for positioning said reference line in the process of identifying said graphic code.
  23. 根据权利要求22所述的装置,其特征在于,所述至少一个定位图标包括第一定位圆和第二定位圆。The apparatus of claim 22 wherein said at least one positioning icon comprises a first positioning circle and a second positioning circle.
  24. 根据权利要求23所述的装置,其特征在于,所述基准图标为基准圆,所述第二定位圆与所述基准圆具有相同的直径。The apparatus according to claim 23, wherein said reference icon is a reference circle, and said second positioning circle has the same diameter as said reference circle.
  25. 根据权利要求24所述的装置,其特征在于,所述图形码包括多条相互平行且等间距分布的参考线,在所述图形码中所述基准圆的直径与相邻参考线之间的距离满足预设比值。The apparatus according to claim 24, wherein said graphic code comprises a plurality of mutually parallel and equally spaced reference lines, wherein said reference code has a diameter between said reference circle and an adjacent reference line The distance meets the preset ratio.
  26. 根据权利要求24所述的装置,其特征在于,所述第一定位圆的圆心在任一参考线上,所述第二定位圆的圆心和所述基准圆的圆心分别在任一参考线上或在任两条相邻参考线中间的辅助参考线上。The apparatus according to claim 24, wherein a center of said first positioning circle is on any reference line, a center of said second positioning circle and a center of said reference circle are respectively on any reference line or in any An auxiliary reference line in the middle of two adjacent reference lines.
  27. 一种图形码的识别装置,其特征在于,所述装置包括:A device for identifying a graphic code, the device comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;
    其中,所述处理器被配置为执行权利要求1-7所述的任一项方法的步骤。Wherein the processor is configured to perform the steps of any of the methods of claims 1-7.
  28. 一种图形码的生成装置,其特征在于,所述装置包括:A device for generating a graphic code, characterized in that the device comprises:
    处理器;processor;
    用于存储处理器可执行指令的存储器;a memory for storing processor executable instructions;
    其中,所述处理器被配置为执行权利要求8-13所述的任一项方法的步骤。Wherein the processor is configured to perform the steps of any of the methods of claims 8-13.
  29. 一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,其特征在于,所述指令被处理器执行时实现权利要求1-7所述的任一项方法的步骤。A computer readable storage medium having stored thereon instructions, wherein the instructions are executed by a processor to implement the steps of any of the methods of claims 1-7.
  30. 一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,其特征在于,所述指令被处理器执行时实现权利要求8-13所述的任一项方法的步骤。A computer readable storage medium having stored thereon instructions, wherein the instructions are executed by a processor to perform the steps of any of the methods of claims 8-13.
PCT/CN2018/087873 2018-04-02 2018-05-22 Method, device, computer readable storage medium for identifying and generating graphic code WO2019192061A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810284534.XA CN108491748B (en) 2018-04-02 2018-04-02 Graphic code identification and generation method and device and computer readable storage medium
CN201810284534.X 2018-04-02

Publications (1)

Publication Number Publication Date
WO2019192061A1 true WO2019192061A1 (en) 2019-10-10

Family

ID=63317485

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/087873 WO2019192061A1 (en) 2018-04-02 2018-05-22 Method, device, computer readable storage medium for identifying and generating graphic code

Country Status (2)

Country Link
CN (1) CN108491748B (en)
WO (1) WO2019192061A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368872B (en) * 2016-05-13 2019-04-23 腾讯科技(深圳)有限公司 A kind of method and apparatus generating bar code image
CN110705329B (en) * 2019-09-30 2021-09-14 联想(北京)有限公司 Processing method and device and electronic equipment
CN111797643B (en) * 2020-07-08 2022-04-26 北京京东振世信息技术有限公司 Method and terminal for recognizing bar code
CN114548343A (en) * 2020-11-27 2022-05-27 海能达通信股份有限公司 Graphic code display method, terminal and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047272A (en) * 2008-04-02 2011-05-04 交叉媒体技术有限责任两合公司 Method for storing and reading data
CN106295441A (en) * 2016-08-03 2017-01-04 明基电通有限公司 A kind of system and method for dynamic threshold digitized bar code image
CN106529635A (en) * 2016-10-18 2017-03-22 网易(杭州)网络有限公司 Coding pattern generating and identifying method and apparatus
WO2017144582A1 (en) * 2016-02-23 2017-08-31 Nestec Sa Code and container of system for preparing a beverage or foodstuff

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047272A (en) * 2008-04-02 2011-05-04 交叉媒体技术有限责任两合公司 Method for storing and reading data
WO2017144582A1 (en) * 2016-02-23 2017-08-31 Nestec Sa Code and container of system for preparing a beverage or foodstuff
CN106295441A (en) * 2016-08-03 2017-01-04 明基电通有限公司 A kind of system and method for dynamic threshold digitized bar code image
CN106529635A (en) * 2016-10-18 2017-03-22 网易(杭州)网络有限公司 Coding pattern generating and identifying method and apparatus

Also Published As

Publication number Publication date
CN108491748B (en) 2020-01-10
CN108491748A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
US11205282B2 (en) Relocalization method and apparatus in camera pose tracking process and storage medium
WO2019141100A1 (en) Method and apparatus for displaying additional object, computer device, and storage medium
CN108710525B (en) Map display method, device, equipment and storage medium in virtual scene
WO2019192061A1 (en) Method, device, computer readable storage medium for identifying and generating graphic code
US20200104320A1 (en) Method, apparatus and computer device for searching audio, and storage medium
CN109922356B (en) Video recommendation method and device and computer-readable storage medium
CN107803030B (en) Refreshing method and device for resource site on virtual map
CN111753784A (en) Video special effect processing method and device, terminal and storage medium
WO2022134632A1 (en) Work processing method and apparatus
CN109862412B (en) Method and device for video co-shooting and storage medium
CN110933468A (en) Playing method, playing device, electronic equipment and medium
CN110321126B (en) Method and device for generating page code
CN111754386B (en) Image area shielding method, device, equipment and storage medium
CN109886208B (en) Object detection method and device, computer equipment and storage medium
CN110121094A (en) Video is in step with display methods, device, equipment and the storage medium of template
CN109166150A (en) Obtain the method, apparatus storage medium of pose
CN112150560A (en) Method and device for determining vanishing point and computer storage medium
CN109189290B (en) Click area identification method and device and computer readable storage medium
CN110853124B (en) Method, device, electronic equipment and medium for generating GIF dynamic diagram
CN112135191A (en) Video editing method, device, terminal and storage medium
WO2018192455A1 (en) Method and apparatus for generating subtitles
CN109388732B (en) Music map generating and displaying method, device and storage medium
CN112950535A (en) Video processing method and device, electronic equipment and storage medium
CN113051485A (en) Group searching method, device, terminal and storage medium
CN111596925A (en) Method, apparatus, computer device and medium for automatically generating code

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: 18913952

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/02/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18913952

Country of ref document: EP

Kind code of ref document: A1