WO2020156553A1 - Qr code positioning box identification method and apparatus, and electronic device and storage medium - Google Patents

Qr code positioning box identification method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2020156553A1
WO2020156553A1 PCT/CN2020/074168 CN2020074168W WO2020156553A1 WO 2020156553 A1 WO2020156553 A1 WO 2020156553A1 CN 2020074168 W CN2020074168 W CN 2020074168W WO 2020156553 A1 WO2020156553 A1 WO 2020156553A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
dimensional code
target areas
positioning frame
target
Prior art date
Application number
PCT/CN2020/074168
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 WO2020156553A1 publication Critical patent/WO2020156553A1/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/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • 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
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • This application relates to the technical field of two-dimensional code recognition, and in particular to a method, device, electronic equipment and storage medium for recognizing a two-dimensional code positioning frame.
  • the QR code has become a convenient carrier for information dissemination. Users can scan the QR code to obtain relevant product information or link to relevant web pages to browse more information.
  • the purpose of the embodiments of the present application is to provide a method, device, electronic device, and storage medium for identifying a two-dimensional code positioning frame, which are configured to solve the limited recognizable shape in the existing two-dimensional code positioning frame identification method And identify technical problems with low accuracy.
  • an embodiment of the present application provides a method for identifying a positioning frame of a two-dimensional code, the method including:
  • Obtain the QR code image identify multiple target areas in the QR code image that meet the preset color ratio requirements according to the preset pixel scanning rules; use the target area that meets the preset requirements among the multiple target areas as the QR code positioning frame .
  • the identifying multiple target areas in the two-dimensional code image that meet the requirements of a preset color ratio according to a preset pixel scanning rule includes:
  • the preset scanning unit scan the QR code image in the first preset direction to obtain the color ratio of each unit on the QR code area; if the number of target areas meeting the preset color ratio requirement is less than the preset threshold, adjust The size of the scan unit is preset to obtain an updated preset scan unit, where the size of the preset scan unit is a size of one or more pixel combinations.
  • the scanning the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area includes:
  • the preset scanning unit obtain the color ratio of each unit on the QR code area along the horizontal direction; or, according to the preset scanning unit, obtain the color ratio of each unit on the QR code area along the vertical direction .
  • the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
  • the use of preset verification rules to delete target areas that do not meet the verification requirements to obtain the remaining target areas includes:
  • the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
  • the target area in which the error between the ratio of black and white color and the preset ratio in the multiple target areas is less than the preset value and the interval between black and white colors meets the preset interval sequence is used as the two-dimensional code positioning frame.
  • the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
  • the contour recognition algorithm is used to recognize the contour of each target area; the target area whose contour meets the preset contour requirements is used as the two-dimensional code positioning frame.
  • the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
  • the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
  • an embodiment of the present application provides a two-dimensional code positioning frame recognition device, including:
  • the acquiring module is configured to acquire the two-dimensional code image; the recognition module is configured to identify multiple target areas in the two-dimensional code image that meet the preset color ratio requirements according to preset pixel scanning rules; the selection module is configured to combine multiple targets The target area in the area that meets the preset requirements is used as the QR code positioning frame.
  • the identification module includes:
  • the scanning sub-module is configured to scan the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area; update the sub-module and configure it to meet the preset color ratio requirements If the number of target regions is less than the preset threshold, the size of the preset scanning unit is adjusted to obtain an updated preset scanning unit, where the size of the preset scanning unit is the size of one or more pixel combinations.
  • the scanning sub-module is specifically configured to obtain the color ratio of each unit in the QR code area along the horizontal direction according to the preset scanning unit; or, according to the preset scanning unit, obtain the color ratio along the vertical direction.
  • the color ratio of each unit corresponding to the QR code area is specifically configured to obtain the color ratio of each unit in the QR code area along the horizontal direction according to the preset scanning unit; or, according to the preset scanning unit, obtain the color ratio along the vertical direction.
  • the selection module includes:
  • the screening sub-module is configured to use preset verification rules to delete the target area that does not meet the verification requirements to obtain the remaining target area; the determining sub-module is configured to locate the target area in the remaining target area that meets the preset requirements as a QR code frame.
  • the screening sub-module is specifically configured to scan the QR code image according to the second preset direction to verify whether the color ratio of the target area meets the verification requirements.
  • the first preset direction and the second preset direction are different;
  • the target area required by the verification is deleted, and the remaining target area is obtained.
  • the selection module is specifically configured to use a target area in a plurality of target areas whose black and white color ratio to a preset ratio error is less than the preset value and the black and white color interval meets the preset interval sequence as the two-dimensional code positioning frame.
  • the selection module is specifically configured to use a contour recognition algorithm to recognize the contour of each target area; the target area whose contour meets the preset contour requirement is used as the two-dimensional code positioning frame.
  • the selection module is specifically configured to select three target areas arbitrarily; determine whether the positional relationship of the three target areas meets the preset requirements; if they meet the preset requirements, determine that the three target areas are respectively QR code positioning frames .
  • the selection module is specifically configured to select three target areas arbitrarily; determine whether the area difference of any two of the three target areas is less than a preset difference; if it is less than the preset difference, determine three targets
  • the area is the QR code positioning frame.
  • an embodiment of the present application provides an electronic device, including: a processor, a storage medium, and a bus.
  • the storage medium stores machine-readable instructions executable by the processor.
  • the processor executes machine-readable instructions to execute the steps of the two-dimensional code positioning frame identification method provided in the first aspect during execution.
  • an embodiment of the present application provides a storage medium with a program stored on the storage medium, and the program executes the steps of the two-dimensional code positioning frame identification method provided in the first aspect when the program is run by a processor.
  • the present application by acquiring the two-dimensional code image, according to the preset pixel scanning rules, multiple target areas in the two-dimensional code image meeting the preset color ratio requirements are identified, and the target areas that meet the preset requirements in the multiple target areas are identified
  • the area is used as a two-dimensional code positioning frame, so that in the process of recognizing the two-dimensional code positioning frame, multiple positioning frames of different shapes can be identified and the recognition accuracy is higher.
  • FIG. 1 is a schematic flowchart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application;
  • FIG. 2 is a schematic diagram of a two-dimensional code positioning frame provided by an embodiment of this application.
  • FIG. 3 is another schematic diagram of a two-dimensional code positioning frame provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of another flow chart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application;
  • FIG. 5 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application;
  • FIG. 6 is a schematic diagram of another process of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application;
  • FIG. 7 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application;
  • FIG. 8 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application;
  • FIG. 9 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
  • FIG. 10 is a schematic structural diagram of a two-dimensional code positioning frame recognition device provided by an embodiment of the application.
  • FIG. 11 is another schematic structural diagram of the two-dimensional code positioning frame identification device provided by the embodiment of the present application.
  • FIG. 12 is a schematic diagram of another structure of the two-dimensional code positioning frame identification device provided by an embodiment of the application.
  • FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • a two-dimensional bar code is a machine-readable pattern that encodes information in two dimensions, and can be configured to store information or indicate data types. Specifically, the data symbol information is recorded in black and white graphics distributed on a plane (two-dimensional direction) by a certain geometric figure according to a certain rule, and the code preparation skillfully uses the "0" and "1" that constitute the internal logic of the computer. "The concept of bit stream uses several geometric shapes corresponding to binary to represent text and numerical information, which can be automatically read by recognition devices such as image input equipment or photoelectric scanning equipment to realize automatic information processing.
  • QR code has become a convenient carrier for information dissemination. Users can scan the QR code to obtain relevant product information or link to relevant web pages to browse more information. Therefore, the two-dimensional code recognition technology is gradually being widely used in many fields, for example, the production of two-dimensional code business cards to achieve identity recognition (such as: conference sign-in); the use of two-dimensional code in the logistics industry for logistics tracking; electronic ticketing (such as : The use of QR codes in air tickets and movie tickets, etc.) eliminates the steps of queuing to buy tickets and ticket inspections, realizing paperless and green environmental protection; in the field of e-commerce, the use of QR codes to complete the delivery and the use of QR codes to issue coupons; In mobile payments (such as WeChat Pay and Alipay Payment, etc.) payment or collection is completed through QR codes; and in other entertainment applications, QR codes are used as links to information such as advertisements or music videos.
  • identity recognition such as: conference sign-in
  • electronic ticketing such as : The use of QR codes in air tickets and movie tickets, etc.
  • QR codes
  • the process of two-dimensional code recognition it is usually necessary to first identify the positions of the three positioning frames of the two-dimensional code, and then determine the range of the two-dimensional code according to the three positioning frames, and then recognize the two-dimensional code.
  • the commonly used two-dimensional code positioning frame recognition methods are: smoothing and filtering the picture, binarizing, looking for contours, filtering the features of two sub-contours in the contour, and finding the 3 closest areas from the filtered contours It is the QR code positioning frame.
  • an embodiment of the present application provides a two-dimensional code positioning frame recognition method, which can recognize positioning frames of different shapes and has Higher recognition accuracy.
  • the execution subject of the method for identifying the positioning frame of the two-dimensional code can be a smart phone and a tablet computer, or a computer and an externally connected image acquisition device (such as a camera and a scanner, etc.) Server, etc., this application does not limit this.
  • FIG. 1 is a schematic flowchart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
  • the two-dimensional code positioning frame identification method includes:
  • the image containing the two-dimensional code information can be collected through image collection devices such as a scanning camera and a scanner.
  • image collection devices such as a scanning camera and a scanner.
  • the two-dimensional code image can be obtained through the camera of the mobile phone, so that the image can be obtained according to the obtained.
  • the two-dimensional code image is identified to obtain the position of the two-dimensional code positioning frame, and the range of the two-dimensional code is determined to realize the recognition of the two-dimensional code and obtain the information contained in the two-dimensional code.
  • multiple frames of two-dimensional code images can be acquired to separately identify each frame of two-dimensional code images, so that the information contained in the two-dimensional code can be effectively recognized or the accuracy of the two-dimensional code recognition can be improved.
  • S102 According to the preset pixel scanning rule, identify multiple target areas in the two-dimensional code image that meet the preset color ratio requirements.
  • the two-dimensional code image can be scanned according to a preset pixel scanning rule.
  • the preset pixel rule may refer to: divide the QR code image into multiple scanning units according to the size of the preset scanning unit, and scan the QR code image in each unit in turn, where the size of the preset scanning unit It can be the size of a preset number of pixels, and the preset number can be 1, 5, 7, or 8, etc. There is no restriction here, and it can also be adjusted flexibly according to the actual situation.
  • the two-dimensional code image corresponding to each scanning unit can be identified, and it is determined whether the two-dimensional code image corresponding to the scanning unit meets the preset color ratio requirement.
  • the preset color ratio requirements can be set according to different shapes of positioning boxes.
  • the preset color ratio requirements can include circular positioning box color ratio requirements, decentered square positioning box color ratio requirements or triangular positioning box color ratio requirements. One or more of.
  • FIG. 2 is a schematic diagram of a two-dimensional code positioning frame provided by an embodiment of this application.
  • FIG. 3 is another schematic diagram of a two-dimensional code positioning frame provided by an embodiment of this application.
  • the color ratio requirement of the circular positioning frame, the color ratio requirement of the decentered square positioning frame, or the color ratio requirement of the triangular positioning frame may be preset ratio ranges based on the aforementioned specific color ratio values, for example, decentered square positioning
  • the frame color ratio requirement can be "black: white: black: white: black meets the ratio range of 0.8:4.8:0.8 to 1.2:5.2:1.2".
  • the scanning unit can be determined as the target area.
  • multiple scanning units in the two-dimensional code image can be recognized to obtain multiple A target area that meets the preset color ratio requirements.
  • S103 Use a target area that meets a preset requirement among the multiple target areas as a two-dimensional code positioning frame.
  • multiple target areas can be screened, and three of the target areas that meet the preset requirements can be determined as the two-dimensional code positioning frame, where the preset requirements can refer to three target areas with the same or similar area.
  • the area error of the target area is less than a preset error value (such as 0.1 or 0.2).
  • step S102 For example, if there are 7 target areas identified in step S102 that meet the requirements of the preset color ratio, the area of each target area can be calculated separately, and then the three target areas with the closest areas are selected as the two-dimensional Code positioning box.
  • the preset requirement may also be to determine that the three target regions with the closest contour shapes among the multiple target regions are the two-dimensional code positioning frames.
  • the two-dimensional code positioning frame may be selected from multiple target areas according to one of the foregoing multiple preset requirements, or it may be based on a combination of multiple preset requirements. Select the two-dimensional code positioning frame in each target area, which is not limited in this application.
  • the method for identifying the positioning frame of the QR code provided by the embodiment of the present application recognizes multiple targets in the QR code image that meet the preset color ratio requirements by acquiring the QR code image and according to preset pixel scanning rules Area, the target area that meets the preset requirements among multiple target areas is used as the two-dimensional code positioning frame, so that in the process of recognizing the two-dimensional code positioning frame, multiple positioning frames of different shapes can be recognized and the recognition accuracy is more high.
  • FIG. 4 is a schematic diagram of another flow chart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
  • the foregoing identification of multiple target areas in the two-dimensional code image that meets the preset color ratio requirement according to the preset pixel scanning rule includes:
  • S201 Scan the QR code image according to the first preset direction according to the preset scanning unit, and obtain the color ratio of each unit corresponding to the QR code area.
  • the preset scanning unit can be an n ⁇ m pixel array unit, n and m respectively represent the number of pixels in each row and each column, for example: n can be 5, 7 or 9, etc., m can be 5, 6. , 7 or 8, etc.
  • the size of n and m may be equal, that is, the number of pixels in rows and columns in the preset scanning unit may be the same.
  • the two-dimensional code image can be scanned along the first preset direction according to the size of the range of the preset scanning unit.
  • the first preset direction may include any one of: from left to right along the horizontal direction, from top to bottom along the vertical direction, or along other oblique angles (such as 45 degrees or 135 degrees).
  • S202 If the number of target areas meeting the preset color ratio requirement is less than the preset threshold, adjust the size of the preset scan unit to obtain an updated preset scan unit, where the size of the preset scan unit is one or more pixels The size of the point combination.
  • the color ratios of the two-dimensional code images corresponding to multiple scanning units can be separately determined whether the color ratios of the two-dimensional code images corresponding to each scanning unit meet the preset color ratio requirements, and statistics can meet the expected Set the number of target areas required by the color ratio. Furthermore, it can be determined whether the number of target regions meeting the preset color ratio requirement is less than a preset threshold. For example, if the positioning frame of the two-dimensional code image is generally 3, the preset threshold may be 3. If it is determined that the number of target areas meeting the requirements of the preset color ratio is less than 3, the size of the preset scanning unit can be adjusted, the preset scanning unit can be updated, and the QR code image can be performed again according to the updated preset scanning unit. Scan to obtain at least 3 target areas to realize the identification of all positioning frames.
  • the preset scanning unit can be adjusted to a larger size when the preset scanning unit is updated; Assuming that the size of the scanning unit is larger, such as a 9 ⁇ 9 pixel array unit, when updating the preset scanning unit, the preset scanning unit can be adjusted to a smaller size to more accurately obtain the possible positioning frame Target area.
  • the scanning the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area includes:
  • the preset scanning unit obtain the color ratio of each unit on the QR code area along the horizontal direction; or, according to the preset scanning unit, obtain the color ratio of each unit on the QR code area along the vertical direction .
  • the first preset direction can be a horizontal direction or a vertical direction.
  • scanning can be performed along the horizontal or vertical direction according to the preset scanning unit.
  • the vertical direction can also be set as the second preset direction, and the color of each unit corresponding to the QR code area is obtained by scanning along the horizontal direction. After the proportions, the color proportions of each unit corresponding to the QR code area can be scanned again along the vertical direction to assist the scanning acquisition process in the first preset direction, so that the scanning acquisition results are more accurate.
  • the horizontal direction can be set as the second preset direction, and the effect is similar to the foregoing embodiment, and will not be repeated here.
  • FIG. 5 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application.
  • the above-mentioned using a target area that meets preset requirements among multiple target areas as a two-dimensional code positioning frame includes:
  • S301 Using a preset verification rule, delete the target area that does not meet the verification requirements, and obtain the remaining target area.
  • the preset verification rule is configured to verify whether the target area meets the requirements.
  • the preset verification rule may be to filter out abnormal target areas among multiple target areas, that is, to determine whether each target area is abnormal, and if there is an abnormality, delete the target area.
  • the following 7 target areas are acquired by scanning: A, B, C, D, E, F, and G.
  • the area of A is much larger than the other target areas
  • the area of F is much smaller than the other target areas.
  • a and F are abnormal target areas, that is, A and F are target areas that do not meet the verification requirements and can be deleted.
  • the positions of the above seven target areas can also be determined. Assuming that C has a particularly high degree of deviation from other target areas, C may not be within the range of the QR code, so C can also be deleted.
  • the preset verification rule may also include: scanning the target area again through an angle direction different from the first preset direction to determine whether the color ratio is the same as The scanning results in the first preset direction are consistent, etc., which is not limited in this application.
  • S302 Use a target area that meets the preset requirement in the remaining target area as a two-dimensional code positioning frame.
  • the preset requirements may mean that the three target areas are equal or similar in area.
  • the area error of the three target areas is smaller than a preset error value (such as 0.1 or 0.2), etc., so that a target area that can meet the preset requirements can be selected from the remaining target areas to obtain a two-dimensional code positioning frame.
  • the remaining target area is directly used as a two-dimensional code positioning frame.
  • FIG. 6 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
  • the above-mentioned preset verification rules are used to delete target areas that do not meet the verification requirements to obtain the remaining target areas, including:
  • S401 Scan the two-dimensional code image according to the second preset direction to verify whether the color ratio of the target area meets the verification requirement, and the first preset direction is different from the second preset direction.
  • the included angle between the second preset direction and the first preset direction is greater than 0 degrees, such as 45 degrees or 90 degrees
  • the verification requirement may be the aforementioned preset color ratio requirement.
  • the color ratio of the target area may be obtained again along the second preset direction and the color ratio in the target area obtained by scanning along the second preset direction can be determined Whether it meets the preset color ratio requirements, if so, it is determined that the color ratio of the target area meets the verification requirements.
  • the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
  • the target area in which the error between the ratio of black and white color and the preset ratio in the multiple target areas is less than the preset value and the interval between black and white colors meets the preset interval sequence is used as the two-dimensional code positioning frame.
  • the error between the ratio of black and white colors in the target area and the preset ratio can be calculated and determined whether the error is less than the preset value. If it is less than the preset value, then the black and white colors in the target area can be determined Whether the interval meets the preset interval sequence, and if the preset interval sequence is satisfied, the target area is determined to be the two-dimensional code positioning frame.
  • the ratio of black and white colors in a certain target area is calculated to be 0.9:1, then the ratio of black and white colors in the target area can be calculated as The error of the preset ratio is 0.1, which is less than the preset value of 0.2, and it can be further determined whether the black and white color interval in the target area meets the preset sequence. For example, if the preset sequence of black and white color intervals is: "white-black-white” and the black-and-white color interval of the target area also conforms to "white-black-white", it can be determined that the target area is a two-dimensional code positioning frame.
  • each target area can be judged according to the above method, so that the difference between the black and white color ratio and the preset ratio in the multiple target areas can be obtained as the second target area whose black and white color interval meets the preset interval sequence.
  • Dimension code positioning box
  • FIG. 7 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
  • the above-mentioned using a target area that meets a preset requirement among multiple target areas as a two-dimensional code positioning frame includes:
  • S501 Use a contour recognition algorithm to recognize the contour of each target area.
  • S502 Use the target area whose contour of the target area meets the preset contour requirement as the two-dimensional code positioning frame.
  • a contour recognition algorithm can be used to recognize the contour of each target area. After multiple contours corresponding to multiple target areas are obtained, multiple contours can be compared. Because of the shape of the three positioning frames in the QR code It is basically the same or completely the same, so the target areas corresponding to the three contours with the closest shapes among the contours can be selected as the two-dimensional code positioning frame.
  • FIG. 8 is a schematic diagram of another process of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
  • the above-mentioned using a target area that meets preset requirements among multiple target areas as a two-dimensional code positioning frame includes:
  • S602 Determine whether the positional relationship of the three target areas meets a preset requirement.
  • three target areas can be arbitrarily selected from multiple target areas and the positions of the three target areas can be determined to determine whether the positional relationship of the three target areas meets the preset requirements, for example: it can be determined whether the three target areas constitute An isosceles triangle and one of the angles of the triangle is a right angle. If the selected three target areas meet the preset requirements, the three target areas can be determined to be the three positioning frames of the two-dimensional code.
  • three target areas can be selected again for judgment; or a new target area can be selected to replace any of the three selected target areas for judgment.
  • the initially selected three target areas are P1, P2, and P3 and it is determined that the positional relationship of P1, P2, and P3 does not meet the preset requirements
  • replace P2 with P4 and then continue to judge whether the positional relationship of P1, P3, and P4 meets the preset requirements.
  • the two-dimensional code positioning frame can be determined from multiple target areas according to the above method.
  • FIG. 9 is a schematic diagram of another process of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
  • the above-mentioned using a target area that meets preset requirements among multiple target areas as a two-dimensional code positioning frame includes:
  • S702 Determine whether the area difference of any two target areas among the three target areas is smaller than a preset difference value.
  • three target areas can be arbitrarily selected from multiple target areas, the areas of the three target areas are calculated and the area difference between any two target areas is further calculated, and then it is determined whether the area difference between any two target areas is less than If the preset difference is smaller than the preset difference, it can be determined that the three selected target areas are the two-dimensional code positioning frame.
  • the area difference between any two target regions can be calculated, including: (m1-m2), (m2-m3) and (m1-m3), it can be judged whether (m1-m2), (m2-m3) or (m1-m3) is smaller than the preset difference, if the above three areas If the differences are all smaller than the preset difference, it can be determined that the three selected target areas are the two-dimensional code positioning frames. It should be noted that if the calculated area difference is negative, the absolute value of the area difference can be compared with the preset difference value.
  • an embodiment of the present application also provides a two-dimensional code positioning frame identification device.
  • FIG. 10 is a schematic structural diagram of a two-dimensional code positioning frame identification device provided by an embodiment of the application.
  • the two-dimensional code positioning frame recognition device includes:
  • the obtaining module 810 is configured to obtain a two-dimensional code image;
  • the recognition module 820 is configured to recognize multiple target areas in the two-dimensional code image that meet the preset color ratio requirements according to preset pixel scanning rules;
  • the selecting module 830 is configured to The target area that meets the preset requirements among the multiple target areas is used as the two-dimensional code positioning frame.
  • FIG. 11 is a schematic diagram of another structure of a two-dimensional code positioning frame identification device provided by an embodiment of the application.
  • the identification module 820 includes:
  • the scanning sub-module 821 is configured to scan the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area; the update sub-module 822 is configured to meet the preset color The number of target regions required by the ratio is less than the preset threshold, then the size of the preset scanning unit is adjusted to obtain an updated preset scanning unit, where the size of the preset scanning unit is the size of one or more pixel combinations.
  • the scanning sub-module 821 is specifically configured to obtain the color ratio of each unit in the QR code area along the horizontal direction according to a preset scanning unit; or, according to the preset scanning unit, along the vertical direction, Get the color ratio of each unit corresponding to the QR code area.
  • FIG. 12 is a schematic diagram of another structure of a two-dimensional code positioning frame identification device provided by an embodiment of the application.
  • the selection module 830 includes:
  • the screening sub-module 831 is configured to use preset verification rules to delete target areas that do not meet the verification requirements to obtain the remaining target areas; the determining sub-module 832 is configured to take the target areas that meet the preset requirements in the remaining target areas as two-dimensional Code positioning box.
  • the screening sub-module 831 is specifically configured to scan the QR code image according to the second preset direction to verify whether the color ratio of the target area meets the verification requirements.
  • the first preset direction is different from the second preset direction;
  • the target area that meets the verification requirements is deleted, and the remaining target area is obtained.
  • the selection module 830 is specifically configured to use a target area in a plurality of target areas whose black-and-white color ratio to a preset ratio error is less than the preset value and the black-and-white color interval meets the preset interval sequence as the two-dimensional code positioning frame.
  • the selection module 830 is specifically configured to use a contour recognition algorithm to recognize the contour of each target area; use the target area whose contour meets the preset contour requirement as the two-dimensional code positioning frame.
  • the selection module 830 is specifically configured to select three target areas arbitrarily; determine whether the positional relationship of the three target areas meets preset requirements; if they meet the preset requirements, determine that the three target areas are respectively QR code positioning frame.
  • the selection module 830 is specifically configured to randomly select three target areas; determine whether the area difference between any two target areas in the three target areas is less than a preset difference; if it is less than the preset difference, determine three The target area is the QR code positioning frame.
  • the two-dimensional code positioning frame recognition device provided in the embodiment of the present application executes the two-dimensional code positioning frame recognition method described in the foregoing method embodiment, and therefore has all the benefits described in the foregoing method embodiment. The effect is not repeated in this application.
  • the aforementioned modules may be connected or communicate with each other via a wired connection or a wireless connection.
  • Wired connections may include metal cables, optical cables, hybrid cables, etc., or any combination thereof.
  • the wireless connection may include a connection in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module and any one module can be divided into two or more units.
  • the specific working process of the device described above can refer to the corresponding process in the method embodiment, which will not be repeated in this application.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division, and there may be other divisions in actual implementation.
  • multiple modules or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some communication interfaces, devices or modules, and may be in electrical, mechanical or other forms.
  • the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • an embodiment of the present application also provides an electronic device, including: a processor 1101, a storage medium 1102, and a bus; the storage medium 1102 stores machine-readable instructions executable by the processor 1101, and when the electronic device is running
  • the processor 1101 communicates with the storage medium 1102 through a bus, and the processor 1101 executes machine-readable instructions to execute the two-dimensional code positioning frame identification method provided in the foregoing method embodiment when executed.
  • the machine-readable instructions stored in the storage medium 1102 are the two-dimensional code positioning frame identification method described in the foregoing embodiment of the application, and the processor 1101 can execute the two-dimensional code positioning frame identification method for two-dimensional code identification, Therefore, the electronic device also has all the beneficial effects described in the foregoing method embodiments, and the description will not be repeated in this application.
  • the electronic device may be a mobile phone or a tablet computer with an image capture function, or a computer or server with an external image capture device.
  • the type or structure of the electronic device is not limited in this application.
  • the embodiment of the present application only describes one processor in the electronic device.
  • the electronic device in this application may also include one or more processors, a communication bus, and different forms of storage media configured to execute program instructions, such as a magnetic disk, ROM, RAM, or any combination thereof. Therefore, the steps executed by one processor described in this application may also be executed jointly or individually by multiple processors.
  • an embodiment of the present application further provides a program product, such as a storage medium, on which a program is stored.
  • a program product such as a storage medium
  • the program is configured to execute the QR code positioning frame described in the above method embodiment. recognition methods.
  • the functions described in the foregoing embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a nonvolatile readable storage medium executable by a processor .
  • the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium, including several The instructions are used to make an execution device (which may be a personal computer, a server, a mobile phone, a tablet computer, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.

Abstract

Disclosed are a QR code positioning box identification method and apparatus, and an electronic device and a storage medium, relating to the technical field of QR code identification. The method comprises: acquiring a QR code image (S101); identifying, according to a preset pixel scanning rule, multiple target areas in the QR code image that meet a preset color proportion requirement (S102); and using a target area in the multiple target areas that meets a preset requirement as a QR code positioning box (S103). By means of the method, in the process of identifying a QR code positioning box, various positioning boxes of different shapes can be identified and the identification accuracy thereof is higher.

Description

二维码定位框识别方法、装置、电子设备及存储介质Two-dimensional code positioning frame identification method, device, electronic equipment and storage medium
相关申请的交叉引用Cross references to related applications
本申请要求于2019年01月31日提交中国专利局的申请号为CN201910100834.2、名称为“二维码定位框识别方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on January 31, 2019, with the application number CN201910100834.2, titled "Method, device, electronic equipment and storage medium for QR code positioning frame identification", which The entire content is incorporated into this application by reference.
技术领域Technical field
本申请涉及二维码识别技术领域,具体而言,涉及一种二维码定位框识别方法、装置、电子设备及存储介质。This application relates to the technical field of two-dimensional code recognition, and in particular to a method, device, electronic equipment and storage medium for recognizing a two-dimensional code positioning frame.
背景技术Background technique
随着科技的发展,二维码已成为信息传播的便捷载体,用户通过扫描二维码即可获得相关产品信息或链接到相关网页上浏览更多信息。在二维码识别过程中,通常需要先识别得到二维码的三个定位框的位置,然后根据三个定位框确定二维码的范围,进而对二维码进行识别。With the development of science and technology, the QR code has become a convenient carrier for information dissemination. Users can scan the QR code to obtain relevant product information or link to relevant web pages to browse more information. In the two-dimensional code recognition process, it is usually necessary to first identify the positions of the three positioning frames of the two-dimensional code, and then determine the range of the two-dimensional code according to the three positioning frames, and then identify the two-dimensional code.
目前,现有技术中在确定二维码定位框时,通常需要对图片进行平滑滤波,二值化,寻找轮廓,筛选轮廓中有两个子轮廓的特征,从筛选后的轮廓中找到面积最接近的3个即是二维码定位框。At present, in the prior art, when determining the positioning frame of the two-dimensional code, it is usually necessary to smoothly filter the picture, binarize, find the contour, filter the features of two sub-contours in the contour, and find the closest area from the filtered contour The 3 are the two-dimensional code positioning frame.
但是,上述现有对二维码定位框的识别方法中,仅仅通过轮廓进行识别,可识别的形状有限并且往往导致识别准确性不高。However, in the above-mentioned existing method for recognizing the positioning frame of a two-dimensional code, only the contour is used for recognition, the recognizable shape is limited and the recognition accuracy is often not high.
发明内容Summary of the invention
有鉴于此,本申请实施例的目的在于提供一种二维码定位框识别方法、装置、电子设备及存储介质,配置成解决现有二维码定位框的识别方法中,可识别的形状有限并且识别准确性不高的技术问题。In view of this, the purpose of the embodiments of the present application is to provide a method, device, electronic device, and storage medium for identifying a two-dimensional code positioning frame, which are configured to solve the limited recognizable shape in the existing two-dimensional code positioning frame identification method And identify technical problems with low accuracy.
第一方面,本申请实施例提供了一种二维码定位框识别方法,该方法包括:In the first aspect, an embodiment of the present application provides a method for identifying a positioning frame of a two-dimensional code, the method including:
获取二维码图像;根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域;将多个目标区域中符合预设要求的目标区域作为二维码定位框。Obtain the QR code image; identify multiple target areas in the QR code image that meet the preset color ratio requirements according to the preset pixel scanning rules; use the target area that meets the preset requirements among the multiple target areas as the QR code positioning frame .
可选地,所述根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域,包括:Optionally, the identifying multiple target areas in the two-dimensional code image that meet the requirements of a preset color ratio according to a preset pixel scanning rule includes:
根据预设扫描单元,按照第一预设方向扫描二维码图像,获取二维码区域上对应各单元的颜色比例;若满足预设颜色比例要求的目标区域个数小于预设阈值,则调整预设扫描单元的尺寸,获取更新的预设扫描单元,其中,预设扫描单元的尺寸为一个或多个像素点组合的尺寸。According to the preset scanning unit, scan the QR code image in the first preset direction to obtain the color ratio of each unit on the QR code area; if the number of target areas meeting the preset color ratio requirement is less than the preset threshold, adjust The size of the scan unit is preset to obtain an updated preset scan unit, where the size of the preset scan unit is a size of one or more pixel combinations.
可选地,所述根据预设扫描单元,按照第一预设方向扫描二维码图像,获取二维码区域上对应各单元的颜色比例,包括:Optionally, the scanning the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area includes:
根据预设扫描单元,沿着水平方向,获取二维码区域上对应各单元的颜色比例;或,根据预设扫描单元,沿着竖直方向,获取二维码区域上对应各单元的颜色比例。According to the preset scanning unit, obtain the color ratio of each unit on the QR code area along the horizontal direction; or, according to the preset scanning unit, obtain the color ratio of each unit on the QR code area along the vertical direction .
可选地,所述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域;将剩余目标区域中符合预设要求的目标区域作为二维码定位框。Using preset verification rules, delete the target area that does not meet the verification requirements to obtain the remaining target area; use the target area that meets the preset requirements in the remaining target area as the QR code positioning frame.
可选地,所述采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域,包括:Optionally, the use of preset verification rules to delete target areas that do not meet the verification requirements to obtain the remaining target areas includes:
按照第二预设方向扫描二维码图像,验证目标区域的颜色比例是否满足验证要求,第一预设方向与所述第二预设方向不同;将不满足验证要求的目标区域删除,得到剩余目标区域。Scan the QR code image according to the second preset direction to verify whether the color ratio of the target area meets the verification requirements, the first preset direction is different from the second preset direction; delete the target area that does not meet the verification requirements, and obtain the remaining target area.
可选地,所述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
将多个目标区域中黑白颜色比值与预设比值误差小于预设值并且黑白颜色间隔满足预设间隔顺序的目标区域作为二维码定位框。The target area in which the error between the ratio of black and white color and the preset ratio in the multiple target areas is less than the preset value and the interval between black and white colors meets the preset interval sequence is used as the two-dimensional code positioning frame.
可选地,所述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
采用轮廓识别算法,识别各目标区域的轮廓;将目标区域的轮廓满足预设轮廓要求的目标区域作为二维码定位框。The contour recognition algorithm is used to recognize the contour of each target area; the target area whose contour meets the preset contour requirements is used as the two-dimensional code positioning frame.
可选地,所述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
任意选取三个目标区域;判断三个目标区域的位置关系是否符合预设要求;若符合预设要求,则确定三个目标区域分别为二维码定位框。Choose three target areas arbitrarily; determine whether the positional relationship of the three target areas meets the preset requirements; if they meet the preset requirements, determine that the three target areas are respectively QR code positioning frames.
可选地,所述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
任意选取三个目标区域;判断三个目标区域中任意两个目标区域的面积差是否小于预设差值;若小于预设差值,则确定三个目标区域为二维码定位框。Choose three target areas arbitrarily; determine whether the area difference of any two of the three target areas is less than the preset difference; if it is less than the preset difference, determine the three target areas as the QR code positioning frame.
第二方面,本申请实施例提供一种二维码定位框识别装置,包括:In a second aspect, an embodiment of the present application provides a two-dimensional code positioning frame recognition device, including:
获取模块,配置成获取二维码图像;识别模块,配置成根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域;选取模块,配置成将多个目标区域中符合预设要求的目标区域作为二维码定位框。The acquiring module is configured to acquire the two-dimensional code image; the recognition module is configured to identify multiple target areas in the two-dimensional code image that meet the preset color ratio requirements according to preset pixel scanning rules; the selection module is configured to combine multiple targets The target area in the area that meets the preset requirements is used as the QR code positioning frame.
可选地,识别模块,包括:Optionally, the identification module includes:
扫描子模块,配置成根据预设扫描单元,按照第一预设方向扫描二维码图像,获取二维码区域上对应各单元的颜色比例;更新子模块,配置成若满足预设颜色比例要求的目标区域个数小于预设阈值,则调整预设扫描单元的尺寸,获取更新的预设扫描单元,其中,预设扫描单元的尺寸为一个或多个像素点组合的尺寸。The scanning sub-module is configured to scan the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area; update the sub-module and configure it to meet the preset color ratio requirements If the number of target regions is less than the preset threshold, the size of the preset scanning unit is adjusted to obtain an updated preset scanning unit, where the size of the preset scanning unit is the size of one or more pixel combinations.
可选地,扫描子模块,具体配置成根据预设扫描单元,沿着水平方向,获取二维码区域上对应各单元的颜色比例;或,根据预设扫描单元,沿着竖直方向,获取二维码区域上对应各单元的颜色比例。Optionally, the scanning sub-module is specifically configured to obtain the color ratio of each unit in the QR code area along the horizontal direction according to the preset scanning unit; or, according to the preset scanning unit, obtain the color ratio along the vertical direction. The color ratio of each unit corresponding to the QR code area.
可选地,选取模块,包括:Optionally, the selection module includes:
筛选子模块,配置成采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域;确定子模块,配置成将剩余目标区域中符合预设要求的目标区域作为二维码定位框。The screening sub-module is configured to use preset verification rules to delete the target area that does not meet the verification requirements to obtain the remaining target area; the determining sub-module is configured to locate the target area in the remaining target area that meets the preset requirements as a QR code frame.
可选地,筛选子模块,具体配置成按照第二预设方向扫描二维码图像,验证目标区域的颜色比例是否满足验证要求,第一预设方向与第二预设方向不同;将不满足验证要求的目标区域删除,得到剩余目标区域。Optionally, the screening sub-module is specifically configured to scan the QR code image according to the second preset direction to verify whether the color ratio of the target area meets the verification requirements. The first preset direction and the second preset direction are different; The target area required by the verification is deleted, and the remaining target area is obtained.
可选地,选取模块,具体配置成将多个目标区域中黑白颜色比值与预设比值误差小于预设值并且黑白颜色间隔满足预设间隔顺序的目标区域作为二维码定位框。Optionally, the selection module is specifically configured to use a target area in a plurality of target areas whose black and white color ratio to a preset ratio error is less than the preset value and the black and white color interval meets the preset interval sequence as the two-dimensional code positioning frame.
可选地,选取模块,具体配置成采用轮廓识别算法,识别各目标区域的轮廓;将目标区域的轮廓满足预设轮廓要求的目标区域作为二维码定位框。Optionally, the selection module is specifically configured to use a contour recognition algorithm to recognize the contour of each target area; the target area whose contour meets the preset contour requirement is used as the two-dimensional code positioning frame.
可选地,选取模块,具体配置成任意选取三个目标区域;判断三个目标区域的位置关系是否符合预设要求;若符合预设要求,则确定三个目标区域分别为二维码定位框。Optionally, the selection module is specifically configured to select three target areas arbitrarily; determine whether the positional relationship of the three target areas meets the preset requirements; if they meet the preset requirements, determine that the three target areas are respectively QR code positioning frames .
可选地,选取模块,具体配置成任意选取三个目标区域;判断三个目标区域中任意两个目标区域的面积差是否小于预设差值;若小于预设差值,则确定三个目标区域为二维码定位框。Optionally, the selection module is specifically configured to select three target areas arbitrarily; determine whether the area difference of any two of the three target areas is less than a preset difference; if it is less than the preset difference, determine three targets The area is the QR code positioning frame.
第三方面,本申请实施例提供了一种电子设备,包括:处理器、存储介质和总线,存储介质存储有处理器可执行的机器可读指令,当电子设备运行时,处理器与存储介质之间通过总线通信,处理器执行机器可读指令,以在执行时执行如第一方面中提供的二维码定位框识别方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium Through the bus communication, the processor executes machine-readable instructions to execute the steps of the two-dimensional code positioning frame identification method provided in the first aspect during execution.
第四方面,本申请实施例提供了一种存储介质,该存储介质上存储有程序,该程序被处理器运行时执行如第一方面提供的二维码定位框识别方法的步骤。In a fourth aspect, an embodiment of the present application provides a storage medium with a program stored on the storage medium, and the program executes the steps of the two-dimensional code positioning frame identification method provided in the first aspect when the program is run by a processor.
基于上述任一方面,本申请具有以下有益效果:Based on any of the above aspects, this application has the following beneficial effects:
本申请实施例中,通过获取二维码图像,根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域,将多个目标区域中符合预设要求的目标区域作为二维码定位框,能够使得在对二维码定位框进行识别过程中,可以识别多种不同形状的定位框并且识别准确性更高。In the embodiment of the present application, by acquiring the two-dimensional code image, according to the preset pixel scanning rules, multiple target areas in the two-dimensional code image meeting the preset color ratio requirements are identified, and the target areas that meet the preset requirements in the multiple target areas are identified The area is used as a two-dimensional code positioning frame, so that in the process of recognizing the two-dimensional code positioning frame, multiple positioning frames of different shapes can be identified and the recognition accuracy is higher.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore do not It should be regarded as a limitation of the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative work.
图1为本申请实施例提供的二维码定位框识别方法的流程示意图;FIG. 1 is a schematic flowchart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application;
图2为本申请实施例提供的二维码定位框的一种示意图;2 is a schematic diagram of a two-dimensional code positioning frame provided by an embodiment of this application;
图3为本申请实施例提供的二维码定位框的另一种示意图;FIG. 3 is another schematic diagram of a two-dimensional code positioning frame provided by an embodiment of the application;
图4为本申请实施例提供的二维码定位框识别方法的另一流程示意图;FIG. 4 is a schematic diagram of another flow chart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application;
图5为本申请实施例提供的二维码定位框识别方法的又一流程示意图;FIG. 5 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application;
图6为本申请实施例提供的二维码定位框识别方法的又一流程示意图;6 is a schematic diagram of another process of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application;
图7为本申请实施例提供的二维码定位框识别方法的又一流程示意图;FIG. 7 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application;
图8为本申请实施例提供的二维码定位框识别方法的又一流程示意图;FIG. 8 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application;
图9为本申请实施例提供的二维码定位框识别方法的又一流程示意图;FIG. 9 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application;
图10为本申请实施例提供的二维码定位框识别装置的结构示意图;10 is a schematic structural diagram of a two-dimensional code positioning frame recognition device provided by an embodiment of the application;
图11本申请实施例提供的二维码定位框识别装置的另一结构示意图;FIG. 11 is another schematic structural diagram of the two-dimensional code positioning frame identification device provided by the embodiment of the present application;
图12为本申请实施例提供的二维码定位框识别装置的又一结构示意图;12 is a schematic diagram of another structure of the two-dimensional code positioning frame identification device provided by an embodiment of the application;
图13为本申请实施例提供的电子设备的结构示意图。FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,应当理解,本申请中附图仅起到说明和描述的目的,并不用于限定本申请的保护范围。另外,应当理解,示意性的附图并未按实物比例绘制。本申请中使用的流程图示出了根据本申请的一些实施例实现的操作。应该理解,流程图的操作可以不按顺序实现,没有逻辑的上下文关系的步骤可以反转顺序或者同时实施。此外,本领域技术人员在本申请内容的指引下,可以向流程图添加一个或多个其他操作,也可以从流程图中移除一个或多个操作。In order to make the purpose, technical solutions and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described clearly and completely in conjunction with the drawings in the embodiments of this application. It should be understood that this application is attached The drawings are only for the purpose of illustration and description, and are not used to limit the protection scope of this application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowchart used in this application shows operations implemented according to some embodiments of this application. It should be understood that the operations of the flowchart may be implemented out of order, and steps without logical context may be reversed in order or implemented at the same time. In addition, under the guidance of the content of this application, those skilled in the art can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
另外,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various different configurations. Therefore, the following description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work shall fall within the protection scope of the present application.
还需要说明的是,本申请实施例中将会用到术语“包括”,用于指出其后所声明的特征的存在,但并不排除增加其它的特征。It should also be noted that the term "including" will be used in the embodiments of this application to indicate the existence of the features declared thereafter, but it does not exclude the addition of other features.
二维码(2-dimensional bar code)是在两个维度上编码信息的机器可读的图案,可以配置成存储信息,或表示数据类型。具体是通过某种特定的几何图形按一定规律在平面(二维方向上)分布的黑白相间的图形记录数据符号信息,在代码编制上巧妙地利用构成计算机内部逻辑基础的“0”和“1”比特流的概念,使用若干个与二进制相对应的几何形体来表示文字数值信息,通过图像输入设备或光电扫描设备等识别装置自动识读以实现信息自动处理。A two-dimensional bar code is a machine-readable pattern that encodes information in two dimensions, and can be configured to store information or indicate data types. Specifically, the data symbol information is recorded in black and white graphics distributed on a plane (two-dimensional direction) by a certain geometric figure according to a certain rule, and the code preparation skillfully uses the "0" and "1" that constitute the internal logic of the computer. "The concept of bit stream uses several geometric shapes corresponding to binary to represent text and numerical information, which can be automatically read by recognition devices such as image input equipment or photoelectric scanning equipment to realize automatic information processing.
随着科技的发展,二维码已成为信息传播的便捷载体,用户通过扫描二维码即可获得相关产品信息或链接到相关网页上浏览更多信息。故而二维码识别技术正在逐渐地被广泛应用于多种领域,例如,通过制作二维码名片实现身份识别(如:会议签到);物流行业中使用二维码进行物流跟踪;电子票务(如:机票和电影票等)中使用二维码除去了排队买票和验票等环节,实现无纸化绿色环保;电子商务领域中使用二维码完成提货以及采用二维码形式发放优惠券;移动支付中(如:微信支付和支付宝支付等)通过二维码完成付款或收款;以及其他娱乐应用中,将二维码用作一些广告或音乐视频等信息的链接等。With the development of science and technology, the QR code has become a convenient carrier for information dissemination. Users can scan the QR code to obtain relevant product information or link to relevant web pages to browse more information. Therefore, the two-dimensional code recognition technology is gradually being widely used in many fields, for example, the production of two-dimensional code business cards to achieve identity recognition (such as: conference sign-in); the use of two-dimensional code in the logistics industry for logistics tracking; electronic ticketing (such as : The use of QR codes in air tickets and movie tickets, etc.) eliminates the steps of queuing to buy tickets and ticket inspections, realizing paperless and green environmental protection; in the field of e-commerce, the use of QR codes to complete the delivery and the use of QR codes to issue coupons; In mobile payments (such as WeChat Pay and Alipay Payment, etc.) payment or collection is completed through QR codes; and in other entertainment applications, QR codes are used as links to information such as advertisements or music videos.
而在二维码识别过程中,通常需要先识别得到二维码的三个定位框的位置,然后根据三个定位框确定二维码的范围,进而对二维码进行识别。例如,目前常用的二维码定位框识别方法为:对图片进行平滑滤波,二值化,寻找轮廓,筛选轮廓中有两个子轮廓的特征,从筛选后的轮廓中找到面积最接近的3个即是二维码定位框。In the process of two-dimensional code recognition, it is usually necessary to first identify the positions of the three positioning frames of the two-dimensional code, and then determine the range of the two-dimensional code according to the three positioning frames, and then recognize the two-dimensional code. For example, the commonly used two-dimensional code positioning frame recognition methods are: smoothing and filtering the picture, binarizing, looking for contours, filtering the features of two sub-contours in the contour, and finding the 3 closest areas from the filtered contours It is the QR code positioning frame.
但是,上述现有对二维码定位框的识别方法中,仅仅通过轮廓进行识别,可识别的形状有限并且往往导致识别准确性不高。However, in the above-mentioned existing method for recognizing the positioning frame of a two-dimensional code, only the contour is used for recognition, the recognizable shape is limited and the recognition accuracy is often not high.
基于目前二维码定位框识别方法中存在的可识别的形状有限并且识别准确性不高的问题,本申请实施例提供一种二维码定位框识别方法,可以识别不同形状的定位框并且具有更高的识别准确性。Based on the problems of limited recognizable shapes and low recognition accuracy existing in the current two-dimensional code positioning frame recognition method, an embodiment of the present application provides a two-dimensional code positioning frame recognition method, which can recognize positioning frames of different shapes and has Higher recognition accuracy.
需要说明的是,本申请实施例中,该二维码定位框识别方法的执行主体可以是智能手机和平板电脑,也可以是外接有图像采集设备(如:摄像头和扫描仪等)的计算机和服务器等,本申请对此不作限制。It should be noted that, in the embodiment of the application, the execution subject of the method for identifying the positioning frame of the two-dimensional code can be a smart phone and a tablet computer, or a computer and an externally connected image acquisition device (such as a camera and a scanner, etc.) Server, etc., this application does not limit this.
图1为本申请实施例提供的二维码定位框识别方法的流程示意图。FIG. 1 is a schematic flowchart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
如图1所示,该二维码定位框识别方法包括:As shown in Figure 1, the two-dimensional code positioning frame identification method includes:
S101:获取二维码图像。S101: Obtain a two-dimensional code image.
可选地,可以通过扫摄像头和扫描仪等图像采集设备采集包含二维码信息的图像。例如,用户在使用手机上的滴滴、微信、QQ或其他应用程序(Application,APP)等扫描具有二维码的图案时,可通过手机摄像头获取到二维码图像,使得可以根据所获取的二维码图像,识别得到二维码定位框的位置,确定二维码的范围,以实现对二维码的识别,获取到二维码中所包含的信息。Optionally, the image containing the two-dimensional code information can be collected through image collection devices such as a scanning camera and a scanner. For example, when a user uses Didi, WeChat, QQ or other applications (Application, APP) on the mobile phone to scan a pattern with a two-dimensional code, the two-dimensional code image can be obtained through the camera of the mobile phone, so that the image can be obtained according to the obtained The two-dimensional code image is identified to obtain the position of the two-dimensional code positioning frame, and the range of the two-dimensional code is determined to realize the recognition of the two-dimensional code and obtain the information contained in the two-dimensional code.
可选地,可以获取到多帧二维码图像,以分别对每帧二维码图像进行识别,从而可有 效识别到二维码中包含的信息或提高二维码识别的精确度。Optionally, multiple frames of two-dimensional code images can be acquired to separately identify each frame of two-dimensional code images, so that the information contained in the two-dimensional code can be effectively recognized or the accuracy of the two-dimensional code recognition can be improved.
S102:根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域。S102: According to the preset pixel scanning rule, identify multiple target areas in the two-dimensional code image that meet the preset color ratio requirements.
可选地,在获取到二维码图像后,可以根据预设像素扫描规则对该二维码图像进行扫描。预设像素规则可以是指:将该二维码图像按照预设扫描单元的大小划分为多个扫描单元,依次对每个单元中的二维码图像进行扫描,其中,预设扫描单元的大小可以为预设数量个像素点的大小,预设数量可以是1个、5个、7个或8个等,在此不做限制,也可以根据实际情况灵活调整。Optionally, after acquiring the two-dimensional code image, the two-dimensional code image can be scanned according to a preset pixel scanning rule. The preset pixel rule may refer to: divide the QR code image into multiple scanning units according to the size of the preset scanning unit, and scan the QR code image in each unit in turn, where the size of the preset scanning unit It can be the size of a preset number of pixels, and the preset number can be 1, 5, 7, or 8, etc. There is no restriction here, and it can also be adjusted flexibly according to the actual situation.
进一步地,可以对每个扫描单元对应的二维码图像进行识别,判断该扫描单元对应的二维码图像是否满足预设颜色比例要求。预设颜色比例要求可以根据不同形状的定位框具体进行设定,例如,预设颜色比例要求可以包括圆形定位框颜色比例要求、去中心正方形定位框颜色比例要求或三角形定位框颜色比例要求中的一种或多种。Further, the two-dimensional code image corresponding to each scanning unit can be identified, and it is determined whether the two-dimensional code image corresponding to the scanning unit meets the preset color ratio requirement. The preset color ratio requirements can be set according to different shapes of positioning boxes. For example, the preset color ratio requirements can include circular positioning box color ratio requirements, decentered square positioning box color ratio requirements or triangular positioning box color ratio requirements. One or more of.
图2为本申请实施例提供的二维码定位框的一种示意图。FIG. 2 is a schematic diagram of a two-dimensional code positioning frame provided by an embodiment of this application.
请参考图2,对图2(a)所示的圆形定位框或图2(b)所示的正方形定位框而言,预设颜色比例要求可以设置为“黑:白:黑:白:黑=1:1:3:1:1”。可选地,若圆形定位框或正方形定位框为去中心后的定位框,则可以将预设颜色比例设置为“黑:白:黑=1:5:1”。Please refer to Figure 2. For the circular positioning frame shown in Figure 2(a) or the square positioning frame shown in Figure 2(b), the preset color ratio requirement can be set to "black: white: black: white: Black = 1:1:3:1:1". Optionally, if the circular positioning frame or the square positioning frame is a decentered positioning frame, the preset color ratio can be set to "black: white: black=1:5:1".
图3为本申请实施例提供的二维码定位框的另一种示意图。FIG. 3 is another schematic diagram of a two-dimensional code positioning frame provided by an embodiment of this application.
如图3所示,若二维码定位框为三角形,则预设颜色比例可以依次包括:“白:黑:白=2:3:2”、“白:黑:白=1:1:1”和“白:黑=1:1”。从而,在对扫描单元进行识别时,可以首先沿着图2中S1所示的位置判断该扫描单元颜色比例是否符合“白:黑:白=2:3:2”;若符合,则进一步沿着图2中S2所示的位置判断颜色比例是否符合“白:黑:白=1:1:1”;若符合,则继续沿着图2中S3所示的位置判断该扫描单元中颜色比例是否符合“白:黑=1:1”,若以上条件均符合,则可以确定该扫描单元为三角形二维码定位框。As shown in Figure 3, if the two-dimensional code positioning frame is a triangle, the preset color ratios can sequentially include: "White: Black: White = 2:3:2", "White: Black: White = 1:1:1" "And "White: Black = 1:1". Therefore, when identifying the scanning unit, it is possible to first determine whether the color ratio of the scanning unit conforms to "white: black: white = 2: 3: 2" along the position shown in S1 in FIG. 2; Follow the position shown in S2 in Figure 2 to determine whether the color ratio meets "white: black: white = 1: 1: 1"; if it does, continue to determine the color ratio in the scanning unit along the position shown in S3 in Figure 2 Whether it meets "white: black=1:1", if the above conditions are all met, it can be determined that the scanning unit is a triangular two-dimensional code positioning frame.
可选地,圆形定位框颜色比例要求、去中心正方形定位框颜色比例要求或三角形定位框颜色比例要求分别可以是以前述具体颜色比例数值为参考的预设比例范围,如,去中心正方形定位框颜色比例要求则可以为“黑:白:黑:白:黑符合0.8:4.8:0.8至1.2:5.2:1.2的比例范围”。Optionally, the color ratio requirement of the circular positioning frame, the color ratio requirement of the decentered square positioning frame, or the color ratio requirement of the triangular positioning frame may be preset ratio ranges based on the aforementioned specific color ratio values, for example, decentered square positioning The frame color ratio requirement can be "black: white: black: white: black meets the ratio range of 0.8:4.8:0.8 to 1.2:5.2:1.2".
若识别得到扫描单元对应的二维码图像满足预设颜色比例要求,则可将该扫描单元确定为目标区域,类似地,可以对二维码图像中的多个扫描单元进行识别,从而得到多个满足预设颜色比例要求的目标区域。If it is recognized that the two-dimensional code image corresponding to the scanning unit meets the preset color ratio requirement, the scanning unit can be determined as the target area. Similarly, multiple scanning units in the two-dimensional code image can be recognized to obtain multiple A target area that meets the preset color ratio requirements.
S103:将多个目标区域中符合预设要求的目标区域作为二维码定位框。S103: Use a target area that meets a preset requirement among the multiple target areas as a two-dimensional code positioning frame.
可选地,可以对多个目标区域进行筛选,确定其中三个符合预设要求的目标区域作为二维码定位框,其中,预设要求可以是指三个目标区域面积相等或相近的三个目标区域的面积误差小于预设误差值(如:0.1或0.2)等。Optionally, multiple target areas can be screened, and three of the target areas that meet the preset requirements can be determined as the two-dimensional code positioning frame, where the preset requirements can refer to three target areas with the same or similar area. The area error of the target area is less than a preset error value (such as 0.1 or 0.2).
例如,若步骤S102中识别得到的符合预设颜色比例要求的目标区域为7个,则可以分别计算每个目标区域的面积,然后根据计算结果选取其中面积最为接近的三个目标区域作为二维码定位框。For example, if there are 7 target areas identified in step S102 that meet the requirements of the preset color ratio, the area of each target area can be calculated separately, and then the three target areas with the closest areas are selected as the two-dimensional Code positioning box.
可选地,本申请实施例中,预设要求也可以是确定多个目标区域中轮廓形状最接近的三个目标区域即为二维码定位框。该二维码定位框识别方法中,可以是根据前述多种预设要求中的一种从多个目标区域中选取二维码定位框,也可以是根据多种预设要求的组合共同从多个目标区域中选取二维码定位框,本申请对此不作限定。Optionally, in the embodiment of the present application, the preset requirement may also be to determine that the three target regions with the closest contour shapes among the multiple target regions are the two-dimensional code positioning frames. In the method for identifying the two-dimensional code positioning frame, the two-dimensional code positioning frame may be selected from multiple target areas according to one of the foregoing multiple preset requirements, or it may be based on a combination of multiple preset requirements. Select the two-dimensional code positioning frame in each target area, which is not limited in this application.
由上所述,本申请实施例提供的该二维码定位框识别方法,通过获取二维码图像,根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域,将多个目标区域中符合预设要求的目标区域作为二维码定位框,能够使得在对二维码定位框进行识别过程中,可以识别多种不同形状的定位框并且识别准确性更高。As mentioned above, the method for identifying the positioning frame of the QR code provided by the embodiment of the present application recognizes multiple targets in the QR code image that meet the preset color ratio requirements by acquiring the QR code image and according to preset pixel scanning rules Area, the target area that meets the preset requirements among multiple target areas is used as the two-dimensional code positioning frame, so that in the process of recognizing the two-dimensional code positioning frame, multiple positioning frames of different shapes can be recognized and the recognition accuracy is more high.
图4为本申请实施例提供的二维码定位框识别方法的另一流程示意图。FIG. 4 is a schematic diagram of another flow chart of a method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
可选地,如图4所示,上述根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域,包括:Optionally, as shown in FIG. 4, the foregoing identification of multiple target areas in the two-dimensional code image that meets the preset color ratio requirement according to the preset pixel scanning rule includes:
S201:根据预设扫描单元,按照第一预设方向扫描二维码图像,获取二维码区域上对应各单元的颜色比例。S201: Scan the QR code image according to the first preset direction according to the preset scanning unit, and obtain the color ratio of each unit corresponding to the QR code area.
其中,预设扫描单元可以是n×m的像素阵列单元,n和m分别表示每一行和每一列中的像素点数量,如:n可以为5、7或9等,m可以为5、6、7或8等。可选地,在部分实施方式中,n和m的大小可以相等,即预设扫描单元中行和列的像素点数量可以相同。Among them, the preset scanning unit can be an n×m pixel array unit, n and m respectively represent the number of pixels in each row and each column, for example: n can be 5, 7 or 9, etc., m can be 5, 6. , 7 or 8, etc. Optionally, in some embodiments, the size of n and m may be equal, that is, the number of pixels in rows and columns in the preset scanning unit may be the same.
可选地,可以根据预设扫描单元的范围大小,沿着第一预设方向对二维码图像进行扫 描。其中,第一预设方向可以包括:沿着水平方向从左往右、沿着竖直方向从上往下或者沿着其他倾斜角度(如45度或135度)方向中的任一种。Optionally, the two-dimensional code image can be scanned along the first preset direction according to the size of the range of the preset scanning unit. Wherein, the first preset direction may include any one of: from left to right along the horizontal direction, from top to bottom along the vertical direction, or along other oblique angles (such as 45 degrees or 135 degrees).
举例说明,对于某一帧二维码图像而言,可以根据7×7的像素阵列单元,沿着水平方向从左往右依次对每个扫描单元中的二维码图像进行扫描,以获取每个扫描单元对应的二维码图像的颜色比例。For example, for a certain frame of two-dimensional code image, you can scan the two-dimensional code image in each scanning unit from left to right along the horizontal direction according to a 7×7 pixel array unit to obtain each The color ratio of the QR code image corresponding to each scanning unit.
S202:若满足预设颜色比例要求的目标区域个数小于预设阈值,则调整预设扫描单元的尺寸,获取更新的预设扫描单元,其中,预设扫描单元的尺寸为一个或多个像素点组合的尺寸。S202: If the number of target areas meeting the preset color ratio requirement is less than the preset threshold, adjust the size of the preset scan unit to obtain an updated preset scan unit, where the size of the preset scan unit is one or more pixels The size of the point combination.
可选地,在得到多个扫描单元对应的二维码图像的颜色比例后,可以分别判断每个扫描单元对应的二维码图像的颜色比例是否满足预设颜色比例要求,并统计能够满足预设颜色比例要求的目标区域的个数。进一步,可以判断满足预设颜色比例要求的目标区域的个数是否小于预设阈值,如,二维码图像的定位框一般为3个,则该预设阈值可以为3。若判断得到满足预设颜色比例要求的目标区域的个数小于3个,则可以调整预设扫描单元的尺寸,更新预设扫描单元,重新根据更新后的预设扫描单元对二维码图像进行扫描,以获取至少3个目标区域,从而实现对全部定位框的识别。Optionally, after the color ratios of the two-dimensional code images corresponding to multiple scanning units are obtained, it can be separately determined whether the color ratios of the two-dimensional code images corresponding to each scanning unit meet the preset color ratio requirements, and statistics can meet the expected Set the number of target areas required by the color ratio. Furthermore, it can be determined whether the number of target regions meeting the preset color ratio requirement is less than a preset threshold. For example, if the positioning frame of the two-dimensional code image is generally 3, the preset threshold may be 3. If it is determined that the number of target areas meeting the requirements of the preset color ratio is less than 3, the size of the preset scanning unit can be adjusted, the preset scanning unit can be updated, and the QR code image can be performed again according to the updated preset scanning unit. Scan to obtain at least 3 target areas to realize the identification of all positioning frames.
相反地,若判断得到满足预设颜色比例要求的目标区域的个数大于3个,则认为多个目标区域中可能已经包含了二维码的全部(3个)定位框。On the contrary, if it is determined that the number of target regions meeting the preset color ratio requirement is greater than 3, it is considered that all (3) positioning frames of the two-dimensional code may already be contained in the multiple target regions.
需要说明的是,若初始的预设扫描单元的尺寸为最小,如1个或2个,则在更新预设扫描单元时,可以将预设扫描单元调整为更大的尺寸;若初始的预设扫描单元的尺寸较大,如为9×9的像素阵列单元,则在更新预设扫描单元时,可以将预设扫描单元调整为更小的尺寸,以更精确地获取到可能存在定位框的目标区域。It should be noted that if the size of the initial preset scanning unit is the smallest, such as one or two, the preset scanning unit can be adjusted to a larger size when the preset scanning unit is updated; Assuming that the size of the scanning unit is larger, such as a 9×9 pixel array unit, when updating the preset scanning unit, the preset scanning unit can be adjusted to a smaller size to more accurately obtain the possible positioning frame Target area.
可选地,所述根据预设扫描单元,按照第一预设方向扫描二维码图像,获取二维码区域上对应各单元的颜色比例,包括:Optionally, the scanning the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area includes:
根据预设扫描单元,沿着水平方向,获取二维码区域上对应各单元的颜色比例;或,根据预设扫描单元,沿着竖直方向,获取二维码区域上对应各单元的颜色比例。According to the preset scanning unit, obtain the color ratio of each unit on the QR code area along the horizontal direction; or, according to the preset scanning unit, obtain the color ratio of each unit on the QR code area along the vertical direction .
如上所述,第一预设方向可以为水平方向或竖直方向,在获取二维码区域上对应各单元的颜色比例时,可以根据预设扫描单元,沿着水平方向或竖直方向进行扫描获取。As mentioned above, the first preset direction can be a horizontal direction or a vertical direction. When obtaining the color ratio of each unit corresponding to the QR code area, scanning can be performed along the horizontal or vertical direction according to the preset scanning unit. Obtain.
可选地,在部分实施方式中,若第一预设方向为水平方向,则还可以设置竖直方向为 第二预设方向,在沿着水平方向扫描获取二维码区域对应的各单元颜色比例后,还可以沿着竖直方向再次扫描获取二维码区域对应的各单元颜色比例,以辅助第一预设方向的扫描获取过程,使得扫描获取结果更加精确。Optionally, in some embodiments, if the first preset direction is the horizontal direction, the vertical direction can also be set as the second preset direction, and the color of each unit corresponding to the QR code area is obtained by scanning along the horizontal direction. After the proportions, the color proportions of each unit corresponding to the QR code area can be scanned again along the vertical direction to assist the scanning acquisition process in the first preset direction, so that the scanning acquisition results are more accurate.
类似地,在其他实施方式中,若第一预设方向为竖直方向,则可以设置水平方向作为第二预设方向,其效果与前述实施方式类似,在此不再赘述。Similarly, in other embodiments, if the first preset direction is the vertical direction, the horizontal direction can be set as the second preset direction, and the effect is similar to the foregoing embodiment, and will not be repeated here.
图5为本申请实施例提供的二维码定位框识别方法的又一流程示意图。FIG. 5 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of this application.
可选地,如图5所示,上述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, as shown in FIG. 5, the above-mentioned using a target area that meets preset requirements among multiple target areas as a two-dimensional code positioning frame includes:
S301:采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域。S301: Using a preset verification rule, delete the target area that does not meet the verification requirements, and obtain the remaining target area.
其中,预设验证规则配置成验证目标区域是否符合要求。例如,预设验证规则可以是筛除多个目标区域中的异常目标区域,即分别判断每个目标区域是否存在异常,若存在异常,则将该目标区域删除。Among them, the preset verification rule is configured to verify whether the target area meets the requirements. For example, the preset verification rule may be to filter out abnormal target areas among multiple target areas, that is, to determine whether each target area is abnormal, and if there is an abnormality, delete the target area.
举例说明,假设扫描获取到了下述7个目标区域:A、B、C、D、E、F和G,其中,A的面积远远大于其余目标区域,F的面积远远小于其余目标区域,则可以确定A和F为异常目标区域,即A和F为不满足验证要求的目标区域,可以进行删除。另外,还可以判断上述7个目标区域的位置,假设其中C相对于其他目标区域而言,偏离程度特别高,则C可能不在二维码范围之内,所以也可将C进行删除。For example, suppose that the following 7 target areas are acquired by scanning: A, B, C, D, E, F, and G. Among them, the area of A is much larger than the other target areas, and the area of F is much smaller than the other target areas. It can be determined that A and F are abnormal target areas, that is, A and F are target areas that do not meet the verification requirements and can be deleted. In addition, the positions of the above seven target areas can also be determined. Assuming that C has a particularly high degree of deviation from other target areas, C may not be within the range of the QR code, so C can also be deleted.
需要说明的是,除按照上述方法删除目标区域中的异常目标区域外,预设验证规则还可以包括:通过不同于第一预设方向的角度方向对目标区域进行再次扫描,判断颜色比例是否与第一预设方向的扫描结果一致等,本申请对此不作限定。It should be noted that, in addition to deleting the abnormal target area in the target area according to the above method, the preset verification rule may also include: scanning the target area again through an angle direction different from the first preset direction to determine whether the color ratio is the same as The scanning results in the first preset direction are consistent, etc., which is not limited in this application.
S302:将剩余目标区域中符合预设要求的目标区域作为二维码定位框。S302: Use a target area that meets the preset requirement in the remaining target area as a two-dimensional code positioning frame.
可选地,在删除不满足验证要求的目标区域后,可以继续判断剩余目标区域是否符合预设要求,如前述实施例中所述,预设要求可以是指三个目标区域面积相等或相近、三个目标区域的面积误差小于预设误差值(如:0.1或0.2)等,从而可以从剩余目标区域中选取能够满足预设要求的目标区域,得到二维码定位框。Optionally, after deleting the target area that does not meet the verification requirements, you can continue to determine whether the remaining target area meets the preset requirements. As described in the foregoing embodiment, the preset requirements may mean that the three target areas are equal or similar in area. The area error of the three target areas is smaller than a preset error value (such as 0.1 or 0.2), etc., so that a target area that can meet the preset requirements can be selected from the remaining target areas to obtain a two-dimensional code positioning frame.
或者,可选地,剩余目标区域就直接作为二维码定位框。Or, optionally, the remaining target area is directly used as a two-dimensional code positioning frame.
图6为本申请实施例提供的二维码定位框识别方法的又一流程示意图。FIG. 6 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
可选地,如图6所示,上述采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域,包括:Optionally, as shown in FIG. 6, the above-mentioned preset verification rules are used to delete target areas that do not meet the verification requirements to obtain the remaining target areas, including:
S401:按照第二预设方向扫描二维码图像,验证目标区域的颜色比例是否满足验证要求,第一预设方向与所述第二预设方向不同。S401: Scan the two-dimensional code image according to the second preset direction to verify whether the color ratio of the target area meets the verification requirement, and the first preset direction is different from the second preset direction.
可选地,第二预设方向与第一预设方向的夹角大于0度,如45度或90度等,验证要求可以是上述预设颜色比例要求。对于沿着第一预设方向扫描获取到的多个目标区域,可以再次沿着第二预设方向获取目标区域的颜色比例并且判断沿着第二预设方向扫描获取到的目标区域中颜色比例是否符合预设颜色比例要求,若符合,则确定该目标区域的颜色比例满足验证要求。Optionally, the included angle between the second preset direction and the first preset direction is greater than 0 degrees, such as 45 degrees or 90 degrees, and the verification requirement may be the aforementioned preset color ratio requirement. For the multiple target areas obtained by scanning along the first preset direction, the color ratio of the target area may be obtained again along the second preset direction and the color ratio in the target area obtained by scanning along the second preset direction can be determined Whether it meets the preset color ratio requirements, if so, it is determined that the color ratio of the target area meets the verification requirements.
S402:将不满足验证要求的目标区域删除,得到剩余目标区域。S402: Delete the target area that does not meet the verification requirements to obtain the remaining target area.
可选地,所述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, the step of using a target area meeting preset requirements among the multiple target areas as a two-dimensional code positioning frame includes:
将多个目标区域中黑白颜色比值与预设比值误差小于预设值并且黑白颜色间隔满足预设间隔顺序的目标区域作为二维码定位框。The target area in which the error between the ratio of black and white color and the preset ratio in the multiple target areas is less than the preset value and the interval between black and white colors meets the preset interval sequence is used as the two-dimensional code positioning frame.
具体地,对于任一个目标区域而言,可以计算获取该目标区域中黑白颜色比值与预设比值的误差并且判断误差是否小于预设值,若小于预设值,则判断该目标区域中黑白颜色间隔是否满足预设间隔顺序,若满足预设间隔顺序,则确定该目标区域为二维码定位框。Specifically, for any target area, the error between the ratio of black and white colors in the target area and the preset ratio can be calculated and determined whether the error is less than the preset value. If it is less than the preset value, then the black and white colors in the target area can be determined Whether the interval meets the preset interval sequence, and if the preset interval sequence is satisfied, the target area is determined to be the two-dimensional code positioning frame.
举例说明,假设黑白颜色的预设比值为1:1,误差的预设值为0.2,若计算得到某一个目标区域中黑白颜色比值为0.9:1,则可以得到该目标区域中黑白颜色比值与预设比值的误差为0.1,小于预设值0.2,则可以进一步判断该目标区域中黑白颜色间隔是否满足预设顺序。例如,若黑白颜色间隔的预设顺序为:“白-黑-白”并且该目标区域的黑白颜色间隔也符合“白-黑-白”,则可以确定该目标区域为二维码定位框。For example, suppose the preset ratio of black and white colors is 1:1, and the preset value of error is 0.2. If the ratio of black and white colors in a certain target area is calculated to be 0.9:1, then the ratio of black and white colors in the target area can be calculated as The error of the preset ratio is 0.1, which is less than the preset value of 0.2, and it can be further determined whether the black and white color interval in the target area meets the preset sequence. For example, if the preset sequence of black and white color intervals is: "white-black-white" and the black-and-white color interval of the target area also conforms to "white-black-white", it can be determined that the target area is a two-dimensional code positioning frame.
类似地,可以根据上述方法对每个目标区域进行判定,从而可以获取到多个目标区域中黑白颜色比值与预设比值误差小于预设值并且黑白颜色间隔满足预设间隔顺序的目标区域作为二维码定位框。Similarly, each target area can be judged according to the above method, so that the difference between the black and white color ratio and the preset ratio in the multiple target areas can be obtained as the second target area whose black and white color interval meets the preset interval sequence. Dimension code positioning box.
图7为本申请实施例提供的二维码定位框识别方法的又一流程示意图。FIG. 7 is a schematic diagram of another flow of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
可选地,如图7所示,上述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, as shown in FIG. 7, the above-mentioned using a target area that meets a preset requirement among multiple target areas as a two-dimensional code positioning frame includes:
S501:采用轮廓识别算法,识别各目标区域的轮廓。S501: Use a contour recognition algorithm to recognize the contour of each target area.
S502:将目标区域的轮廓满足预设轮廓要求的目标区域作为二维码定位框。S502: Use the target area whose contour of the target area meets the preset contour requirement as the two-dimensional code positioning frame.
可选地,可以采用轮廓识别算法,识别每个目标区域的轮廓,在得到多个目标区域对应的多个轮廓后,可以对多个轮廓进行对比,由于二维码中三个定位框的形状基本相同或完全相同,故而可以选取多个轮廓中形状最为接近的三个轮廓所对应的目标区域作为二维码定位框。Optionally, a contour recognition algorithm can be used to recognize the contour of each target area. After multiple contours corresponding to multiple target areas are obtained, multiple contours can be compared. Because of the shape of the three positioning frames in the QR code It is basically the same or completely the same, so the target areas corresponding to the three contours with the closest shapes among the contours can be selected as the two-dimensional code positioning frame.
图8为本申请实施例提供的二维码定位框识别方法的又一流程示意图。FIG. 8 is a schematic diagram of another process of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
可选地,如图8所示,上述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, as shown in FIG. 8, the above-mentioned using a target area that meets preset requirements among multiple target areas as a two-dimensional code positioning frame includes:
S601:任意选取三个目标区域。S601: Select three target areas arbitrarily.
S602:判断三个目标区域的位置关系是否符合预设要求。S602: Determine whether the positional relationship of the three target areas meets a preset requirement.
S603:若符合预设要求,则确定三个目标区域分别为二维码定位框。S603: If the preset requirements are met, determine that the three target areas are respectively two-dimensional code positioning frames.
可选地,可以从多个目标区域中任意选取三个目标区域并且确定三个目标区域的位置,判断三个目标区域的位置关系是否符合预设要求,如:可以判断三个目标区域是否构成等腰三角形并且三角形的其中一个角为直角,若所选取的三个目标区域符合预设要求,则可以确定三个目标区域为二维码的三个定位框。Optionally, three target areas can be arbitrarily selected from multiple target areas and the positions of the three target areas can be determined to determine whether the positional relationship of the three target areas meets the preset requirements, for example: it can be determined whether the three target areas constitute An isosceles triangle and one of the angles of the triangle is a right angle. If the selected three target areas meet the preset requirements, the three target areas can be determined to be the three positioning frames of the two-dimensional code.
若所选取的三个目标区域不符合预设要求,则可以重新任意选取三个目标区域进行判断;或者重新选取一个目标区域替换掉已经选取的三个目标区域中的任一个进行判断。例如,若初始选取的三个目标区域为P1、P2和P3并且判断得到P1、P2和P3的位置关系不符合预设要求,则可以重新选取P5、P6和P7进行判断;或者只选取P4并且用P4替换掉P1、P2和P3中的任一个进行判断,如:用P4替换掉P2,则可继续判断P1、P3和P4的位置关系是否符合预设要求。If the three selected target areas do not meet the preset requirements, three target areas can be selected again for judgment; or a new target area can be selected to replace any of the three selected target areas for judgment. For example, if the initially selected three target areas are P1, P2, and P3 and it is determined that the positional relationship of P1, P2, and P3 does not meet the preset requirements, you can reselect P5, P6, and P7 for judgment; or only select P4 and Use P4 to replace any of P1, P2, and P3 for judgment. For example, replace P2 with P4, and then continue to judge whether the positional relationship of P1, P3, and P4 meets the preset requirements.
从而,可以根据上述方法,从多个目标区域中确定得到二维码定位框。Therefore, the two-dimensional code positioning frame can be determined from multiple target areas according to the above method.
图9为本申请实施例提供的二维码定位框识别方法的又一流程示意图。FIG. 9 is a schematic diagram of another process of the method for identifying a positioning frame of a two-dimensional code provided by an embodiment of the application.
可选地,如图9所示,上述将多个目标区域中符合预设要求的目标区域作为二维码定位框,包括:Optionally, as shown in FIG. 9, the above-mentioned using a target area that meets preset requirements among multiple target areas as a two-dimensional code positioning frame includes:
S701:任意选取三个目标区域。S701: Choose three target areas arbitrarily.
S702:判断三个目标区域中任意两个目标区域的面积差是否小于预设差值。S702: Determine whether the area difference of any two target areas among the three target areas is smaller than a preset difference value.
S703:若小于预设差值,则确定三个目标区域为二维码定位框。S703: If it is less than the preset difference value, determine that the three target areas are the two-dimensional code positioning frames.
可选地,可以从多个目标区域中任意选取三个目标区域,计算三个目标区域的面积并且进一步计算得到任意两个目标区域的面积差,然后判断任意两个目标区域的面积差是否小于预设差值,若小于预设差值,则可确定所选取的三个目标区域为二维码定位框。Optionally, three target areas can be arbitrarily selected from multiple target areas, the areas of the three target areas are calculated and the area difference between any two target areas is further calculated, and then it is determined whether the area difference between any two target areas is less than If the preset difference is smaller than the preset difference, it can be determined that the three selected target areas are the two-dimensional code positioning frame.
以上述三个目标区域P1、P2和P3为例,若计算得到P1、P2和P3的面积依次为:m1、m2和m3,则可以计算得到任意两个目标区域之间的面积差,包括:(m1-m2)、(m2-m3)和(m1-m3),可以分别判断(m1-m2)、(m2-m3)或(m1-m3)是否小于预设差值,若上述三个面积差均小于预设差值,则可以确定所选取的三个目标区域为二维码定位框。需要说明的是,若计算得到面积差为负,则可以取面积差的绝对值与预设差值进行比较。若存在任一个面积差不小于预设差值,则可以重新任意选取三个目标区域进行判断;或者重新选取一个目标区域替换掉已经选取的三个目标区域中的任一个进行判断,以能够从多个目标区域中确定得到三个二维码定位框。Taking the above three target regions P1, P2, and P3 as an example, if the calculated areas of P1, P2, and P3 are: m1, m2, and m3, then the area difference between any two target regions can be calculated, including: (m1-m2), (m2-m3) and (m1-m3), it can be judged whether (m1-m2), (m2-m3) or (m1-m3) is smaller than the preset difference, if the above three areas If the differences are all smaller than the preset difference, it can be determined that the three selected target areas are the two-dimensional code positioning frames. It should be noted that if the calculated area difference is negative, the absolute value of the area difference can be compared with the preset difference value. If there is any area difference not less than the preset difference, you can re-select three target areas for judgment; or re-select a target area to replace any of the three selected target areas for judgment, so as to be able to judge from Three two-dimensional code positioning frames are determined in multiple target areas.
基于前述实施例中所述的二维码定位框识别方法,本申请实施例还提供一种二维码定位框识别装置。Based on the two-dimensional code positioning frame identification method described in the foregoing embodiment, an embodiment of the present application also provides a two-dimensional code positioning frame identification device.
图10为本申请实施例提供的二维码定位框识别装置的结构示意图。FIG. 10 is a schematic structural diagram of a two-dimensional code positioning frame identification device provided by an embodiment of the application.
如图10所示,该二维码定位框识别装置包括:As shown in Figure 10, the two-dimensional code positioning frame recognition device includes:
获取模块810,配置成获取二维码图像;识别模块820,配置成根据预设像素扫描规则,识别二维码图像中满足预设颜色比例要求的多个目标区域;选取模块830,配置成将多个目标区域中符合预设要求的目标区域作为二维码定位框。The obtaining module 810 is configured to obtain a two-dimensional code image; the recognition module 820 is configured to recognize multiple target areas in the two-dimensional code image that meet the preset color ratio requirements according to preset pixel scanning rules; the selecting module 830 is configured to The target area that meets the preset requirements among the multiple target areas is used as the two-dimensional code positioning frame.
图11为本申请实施例提供的二维码定位框识别装置的另一结构示意图。FIG. 11 is a schematic diagram of another structure of a two-dimensional code positioning frame identification device provided by an embodiment of the application.
可选地,如图11所示,识别模块820包括:Optionally, as shown in FIG. 11, the identification module 820 includes:
扫描子模块821,配置成根据预设扫描单元,按照第一预设方向扫描二维码图像,获取二维码区域上对应各单元的颜色比例;更新子模块822,配置成若满足预设颜色比例要求的目标区域个数小于预设阈值,则调整预设扫描单元的尺寸,获取更新的预设扫描单元,其中,预设扫描单元的尺寸为一个或多个像素点组合的尺寸。The scanning sub-module 821 is configured to scan the QR code image in the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the QR code area; the update sub-module 822 is configured to meet the preset color The number of target regions required by the ratio is less than the preset threshold, then the size of the preset scanning unit is adjusted to obtain an updated preset scanning unit, where the size of the preset scanning unit is the size of one or more pixel combinations.
可选地,扫描子模块821,具体配置成根据预设扫描单元,沿着水平方向,获取二维码区域上对应各单元的颜色比例;或,根据预设扫描单元,沿着竖直方向,获取二维码区域上对应各单元的颜色比例。Optionally, the scanning sub-module 821 is specifically configured to obtain the color ratio of each unit in the QR code area along the horizontal direction according to a preset scanning unit; or, according to the preset scanning unit, along the vertical direction, Get the color ratio of each unit corresponding to the QR code area.
图12为本申请实施例提供的二维码定位框识别装置的又一结构示意图。FIG. 12 is a schematic diagram of another structure of a two-dimensional code positioning frame identification device provided by an embodiment of the application.
可选地,如图12所示,选取模块830包括:Optionally, as shown in FIG. 12, the selection module 830 includes:
筛选子模块831,配置成采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域;确定子模块832,配置成将剩余目标区域中符合预设要求的目标区域作为二维码定位框。The screening sub-module 831 is configured to use preset verification rules to delete target areas that do not meet the verification requirements to obtain the remaining target areas; the determining sub-module 832 is configured to take the target areas that meet the preset requirements in the remaining target areas as two-dimensional Code positioning box.
可选地,筛选子模块831,具体配置成按照第二预设方向扫描二维码图像,验证目标区域的颜色比例是否满足验证要求,第一预设方向与第二预设方向不同;将不满足验证要求的目标区域删除,得到剩余目标区域。Optionally, the screening sub-module 831 is specifically configured to scan the QR code image according to the second preset direction to verify whether the color ratio of the target area meets the verification requirements. The first preset direction is different from the second preset direction; The target area that meets the verification requirements is deleted, and the remaining target area is obtained.
可选地,选取模块830,具体配置成将多个目标区域中黑白颜色比值与预设比值误差小于预设值并且黑白颜色间隔满足预设间隔顺序的目标区域作为二维码定位框。Optionally, the selection module 830 is specifically configured to use a target area in a plurality of target areas whose black-and-white color ratio to a preset ratio error is less than the preset value and the black-and-white color interval meets the preset interval sequence as the two-dimensional code positioning frame.
可选地,选取模块830,具体配置成采用轮廓识别算法,识别各目标区域的轮廓;将目标区域的轮廓满足预设轮廓要求的目标区域作为二维码定位框。Optionally, the selection module 830 is specifically configured to use a contour recognition algorithm to recognize the contour of each target area; use the target area whose contour meets the preset contour requirement as the two-dimensional code positioning frame.
可选地,选取模块830,具体配置成任意选取三个目标区域;判断三个目标区域的位置关系是否符合预设要求;若符合预设要求,则确定三个目标区域分别为二维码定位框。Optionally, the selection module 830 is specifically configured to select three target areas arbitrarily; determine whether the positional relationship of the three target areas meets preset requirements; if they meet the preset requirements, determine that the three target areas are respectively QR code positioning frame.
可选地,选取模块830,具体配置成任意选取三个目标区域;判断三个目标区域中任意两个目标区域的面积差是否小于预设差值;若小于预设差值,则确定三个目标区域为二维码定位框。Optionally, the selection module 830 is specifically configured to randomly select three target areas; determine whether the area difference between any two target areas in the three target areas is less than a preset difference; if it is less than the preset difference, determine three The target area is the QR code positioning frame.
如上所述,本申请实施例所提供的该二维码定位框识别装置,执行了前述方法实施例中所述的二维码定位框识别方法,因此具备前述方法实施例中所述的全部有益效果,本申请在此不再一一赘述。As described above, the two-dimensional code positioning frame recognition device provided in the embodiment of the present application executes the two-dimensional code positioning frame recognition method described in the foregoing method embodiment, and therefore has all the benefits described in the foregoing method embodiment. The effect is not repeated in this application.
另外,上述模块可以经由有线连接或无线连接彼此连接或通信。有线连接可以包括金属线缆、光缆和混合线缆等,或其任意组合。无线连接可以包括通过LAN、WAN、蓝牙、ZigBee、或NFC等形式的连接或其任意组合。两个或更多个模块可以组合为单个模块并且任何一个模块可以分成两个或更多个单元。In addition, the aforementioned modules may be connected or communicate with each other via a wired connection or a wireless connection. Wired connections may include metal cables, optical cables, hybrid cables, etc., or any combination thereof. The wireless connection may include a connection in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module and any one module can be divided into two or more units.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考方法实施例中的对应过程,本申请中不再赘述。在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个模块或组件可以结合或者可以集成到另一个系统,或者一些特征可以忽略或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device described above can refer to the corresponding process in the method embodiment, which will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other divisions in actual implementation. For example, multiple modules or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some communication interfaces, devices or modules, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
图13为本申请实施例提供的电子设备的结构示意图。FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
如图13所示,本申请实施例还提供一种电子设备,包括:处理器1101、存储介质1102和总线;存储介质1102存储有处理器1101可执行的机器可读指令,当电子设备运行时,处理器1101与存储介质1102之间通过总线通信,处理器1101执行机器可读指令,以执行时执行如前述方法实施例所提供的二维码定位框识别方法。As shown in FIG. 13, an embodiment of the present application also provides an electronic device, including: a processor 1101, a storage medium 1102, and a bus; the storage medium 1102 stores machine-readable instructions executable by the processor 1101, and when the electronic device is running The processor 1101 communicates with the storage medium 1102 through a bus, and the processor 1101 executes machine-readable instructions to execute the two-dimensional code positioning frame identification method provided in the foregoing method embodiment when executed.
具体地,存储介质1102中所存储的机器可读指令为本申请前述实施例所述的二维码定位框识别方法,处理器1101可执行该二维码定位框识别方法进行二维码识别,因此,该电子设备同样具备前述方法实施例中所述的全部有益效果,本申请亦不再重复描述。Specifically, the machine-readable instructions stored in the storage medium 1102 are the two-dimensional code positioning frame identification method described in the foregoing embodiment of the application, and the processor 1101 can execute the two-dimensional code positioning frame identification method for two-dimensional code identification, Therefore, the electronic device also has all the beneficial effects described in the foregoing method embodiments, and the description will not be repeated in this application.
需要说明的是,该电子设备可以是具有图像采集功能的手机或平板电脑,也可以是外接有图像采集设备的计算机或服务器等,本申请对电子设备的类型或结构不作限定。It should be noted that the electronic device may be a mobile phone or a tablet computer with an image capture function, or a computer or server with an external image capture device. The type or structure of the electronic device is not limited in this application.
另外,为了便于说明,本申请实施例在电子设备中仅描述了一个处理器。然而,应当注意,本申请中的电子设备还可以包括配置成执行程序指令的一个或多个处理器、通信总线和不同形式的存储介质,例如,磁盘、ROM、RAM或其任意组合。因此,本申请中描述的一个处理器执行的步骤也可以由多个处理器联合执行或单独执行。In addition, for ease of description, the embodiment of the present application only describes one processor in the electronic device. However, it should be noted that the electronic device in this application may also include one or more processors, a communication bus, and different forms of storage media configured to execute program instructions, such as a magnetic disk, ROM, RAM, or any combination thereof. Therefore, the steps executed by one processor described in this application may also be executed jointly or individually by multiple processors.
可选地,本申请实施例还提供一种程序产品,例如存储介质,存储介质上存储有程序, 该程序在被处理器执行时配置成执行上述方法实施例中所述的二维码定位框识别方法。Optionally, an embodiment of the present application further provides a program product, such as a storage medium, on which a program is stored. When the program is executed by a processor, the program is configured to execute the QR code positioning frame described in the above method embodiment. recognition methods.
具体地,本申请前述实施例中所描述的功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一台执行设备(可以是个人计算机,服务器,手机、平板电脑等)执行本申请各个实施例所述方法的全部或部分步骤。Specifically, if the functions described in the foregoing embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a nonvolatile readable storage medium executable by a processor . Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium, including several The instructions are used to make an execution device (which may be a personal computer, a server, a mobile phone, a tablet computer, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and they should all be covered Within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (20)

  1. 一种二维码定位框识别方法,其特征在于,所述方法包括:A method for recognizing a positioning frame of a two-dimensional code, characterized in that the method includes:
    获取二维码图像;Obtain a QR code image;
    根据预设像素扫描规则,识别所述二维码图像中满足预设颜色比例要求的多个目标区域;According to a preset pixel scanning rule, identify multiple target areas in the two-dimensional code image that meet the preset color ratio requirement;
    将多个所述目标区域中符合预设要求的目标区域作为二维码定位框。A target area that meets a preset requirement among the multiple target areas is used as a two-dimensional code positioning frame.
  2. 根据权利要求1所述的方法,其特征在于,所述根据预设像素扫描规则,识别所述二维码图像中满足预设颜色比例要求的多个目标区域,包括:The method according to claim 1, wherein the identifying a plurality of target regions in the two-dimensional code image that meet a preset color ratio requirement according to a preset pixel scanning rule comprises:
    根据预设扫描单元,按照第一预设方向扫描所述二维码图像,获取所述二维码区域上对应各单元的颜色比例;Scan the two-dimensional code image according to the first preset direction according to the preset scanning unit to obtain the color ratio of each unit corresponding to the two-dimensional code area;
    若满足预设颜色比例要求的目标区域个数小于预设阈值,则调整所述预设扫描单元的尺寸,获取更新的预设扫描单元,其中,所述预设扫描单元的尺寸为一个或多个像素点组合的尺寸。If the number of target areas meeting the requirements of the preset color ratio is less than the preset threshold, the size of the preset scanning unit is adjusted to obtain an updated preset scanning unit, wherein the size of the preset scanning unit is one or more The size of a combination of pixels.
  3. 根据权利要求2所述的方法,其特征在于,所述根据预设扫描单元,按照第一预设方向扫描所述二维码图像,获取所述二维码区域上对应各单元的颜色比例,包括:The method according to claim 2, wherein the scanning of the two-dimensional code image in a first preset direction according to a preset scanning unit, to obtain the color ratio of each unit corresponding to the two-dimensional code area, include:
    根据预设扫描单元,沿着水平方向,获取所述二维码区域上对应各单元的颜色比例;或,According to the preset scanning unit, obtain the color ratio of each unit corresponding to the two-dimensional code area along the horizontal direction; or,
    根据预设扫描单元,沿着竖直方向,获取所述二维码区域上对应各单元的颜色比例。According to the preset scanning unit, the color ratio of each unit corresponding to the two-dimensional code area is obtained along the vertical direction.
  4. 根据权利要求2或3所述的方法,其特征在于,所述将多个所述目标区域中符合预设要求的目标区域作为二维码定位框,包括:The method according to claim 2 or 3, wherein the step of using a target area meeting preset requirements among the plurality of target areas as a two-dimensional code positioning frame comprises:
    采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域;Use preset verification rules to delete target areas that do not meet the verification requirements to obtain the remaining target areas;
    将所述剩余目标区域中符合预设要求的目标区域作为二维码定位框。The target area that meets the preset requirement in the remaining target area is used as the two-dimensional code positioning frame.
  5. 根据权利要求4所述的方法,其特征在于,所述采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域,包括:The method according to claim 4, wherein the step of using a preset verification rule to delete the target area that does not meet the verification requirements to obtain the remaining target area comprises:
    按照第二预设方向扫描所述二维码图像,验证所述目标区域的颜色比例是否满足所述验证要求,所述第一预设方向与所述第二预设方向不同;Scanning the two-dimensional code image according to a second preset direction to verify whether the color ratio of the target area meets the verification requirement, and the first preset direction is different from the second preset direction;
    将不满足验证要求的目标区域删除,得到剩余目标区域。Delete the target area that does not meet the verification requirements to obtain the remaining target area.
  6. 根据权利要求2所述的方法,其特征在于,所述将多个所述目标区域中符合预设要求的目标区域作为二维码定位框,包括:The method according to claim 2, wherein the step of using a target area that meets a preset requirement among the plurality of target areas as a two-dimensional code positioning frame comprises:
    将多个所述目标区域中黑白颜色比值与预设比值误差小于预设值并且黑白颜色间隔满足预设间隔顺序的目标区域作为所述二维码定位框。A plurality of target areas in which the error between the ratio of black and white color and the preset ratio is less than the preset value and the black and white color interval meets the preset interval sequence is used as the two-dimensional code positioning frame.
  7. 根据权利要求2所述的方法,其特征在于,所述将多个所述目标区域中符合预设要求的目标区域作为二维码定位框,包括:The method according to claim 2, wherein the step of using a target area that meets a preset requirement among the plurality of target areas as a two-dimensional code positioning frame comprises:
    采用轮廓识别算法,识别各所述目标区域的轮廓;Use a contour recognition algorithm to recognize the contour of each target area;
    将所述目标区域的轮廓满足预设轮廓要求的目标区域作为二维码定位框。The target area whose contour of the target area meets the preset contour requirement is used as the two-dimensional code positioning frame.
  8. 根据权利要求2所述的方法,其特征在于,所述将多个所述目标区域中符合预设要求的目标区域作为二维码定位框,包括:The method according to claim 2, wherein the step of using a target area that meets a preset requirement among the plurality of target areas as a two-dimensional code positioning frame comprises:
    任意选取三个所述目标区域;Randomly select three of the target areas;
    判断三个所述目标区域的位置关系是否符合预设要求;Judging whether the positional relationship of the three target areas meets preset requirements;
    若符合预设要求,则确定三个所述目标区域分别为所述二维码定位框。If the preset requirements are met, the three target areas are determined to be the two-dimensional code positioning frames respectively.
  9. 根据权利要求2所述的方法,其特征在于,所述将多个所述目标区域中符合预设要求的目标区域作为二维码定位框,包括:The method according to claim 2, wherein the step of using a target area that meets a preset requirement among the plurality of target areas as a two-dimensional code positioning frame comprises:
    任意选取三个所述目标区域;Randomly select three of the target areas;
    判断三个所述目标区域中任意两个目标区域的面积差是否小于预设差值;Judging whether the area difference between any two of the three target areas is smaller than a preset difference;
    若小于预设差值,则确定三个所述目标区域为所述二维码定位框。If it is less than the preset difference value, determine that the three target areas are the two-dimensional code positioning frames.
  10. 一种二维码定位框识别装置,其特征在于,包括:A two-dimensional code positioning frame recognition device, characterized in that it comprises:
    获取模块,配置成获取二维码图像;The obtaining module is configured to obtain a QR code image;
    识别模块,配置成根据预设像素扫描规则,识别所述二维码图像中满足预设颜色比例要求的多个目标区域;An identification module configured to identify multiple target areas in the two-dimensional code image that meet the requirements of the preset color ratio according to the preset pixel scanning rule;
    选取模块,配置成将多个所述目标区域中符合预设要求的目标区域作为二维码定位框。The selection module is configured to use a target area that meets a preset requirement among the multiple target areas as a two-dimensional code positioning frame.
  11. 根据权利要求10所述的装置,其特征在于,所述识别模块,包括:The device according to claim 10, wherein the identification module comprises:
    扫描子模块,配置成根据预设扫描单元,按照第一预设方向扫描所述二维码图像,获取所述二维码区域上对应各单元的颜色比例;A scanning sub-module configured to scan the two-dimensional code image in a first preset direction according to a preset scanning unit to obtain the color ratio of each unit corresponding to the two-dimensional code area;
    更新子模块,配置成若满足预设颜色比例要求的目标区域个数小于预设阈值,则调整所述预设扫描单元的尺寸,获取更新的预设扫描单元,其中,所述预设扫描单元的尺寸为一个或多个像素点组合的尺寸。The update sub-module is configured to adjust the size of the preset scanning unit to obtain an updated preset scanning unit if the number of target regions meeting the requirements of the preset color ratio is less than a preset threshold, wherein the preset scanning unit The size of is the size of one or more pixel combinations.
  12. 根据权利要求11所述的装置,其特征在于,所述扫描子模块,具体配置成根据预设扫描单元,沿着水平方向,获取所述二维码区域上对应各单元的颜色比例;或,The device according to claim 11, wherein the scanning sub-module is specifically configured to obtain the color ratio of each unit corresponding to the two-dimensional code area in a horizontal direction according to a preset scanning unit; or,
    根据预设扫描单元,沿着竖直方向,获取所述二维码区域上对应各单元的颜色比例。According to the preset scanning unit, the color ratio of each unit corresponding to the two-dimensional code area is obtained along the vertical direction.
  13. 根据权利要求11或12所述的装置,其特征在于,所述选取模块,包括:The device according to claim 11 or 12, wherein the selection module comprises:
    筛选子模块,配置成采用预设验证规则,将不满足验证要求的目标区域删除,得到剩余目标区域;The screening sub-module is configured to use preset verification rules to delete target areas that do not meet the verification requirements to obtain the remaining target areas;
    确定子模块,配置成将所述剩余目标区域中符合预设要求的目标区域作为二维码定位框。The determining sub-module is configured to use a target area meeting a preset requirement in the remaining target area as a two-dimensional code positioning frame.
  14. 根据权利要求13所述的装置,其特征在于,所述筛选子模块,具体配置成按照第二预设方向扫描所述二维码图像,验证所述目标区域的颜色比例是否满足所述验证要求,所述第一预设方向与所述第二预设方向不同;将不满足验证要求的目标区域删除,得到剩余目标区域。The device according to claim 13, wherein the screening sub-module is specifically configured to scan the two-dimensional code image according to a second preset direction to verify whether the color ratio of the target area meets the verification requirement , The first preset direction is different from the second preset direction; the target area that does not meet the verification requirement is deleted to obtain the remaining target area.
  15. 根据权利要求11所述的装置,其特征在于,所述选取模块,具体配置成将多个所述目标区域中黑白颜色比值与预设比值误差小于预设值并且黑白颜色间隔满足预设间隔顺序的目标区域作为所述二维码定位框。The device according to claim 11, wherein the selection module is specifically configured to make the ratio of the black and white colors in the multiple target areas and the preset ratio error less than a preset value and the black and white color interval meets the preset interval sequence As the two-dimensional code positioning frame.
  16. 根据权利要求11所述的装置,其特征在于,所述选取模块,具体配置成采用轮廓识别算法,识别各所述目标区域的轮廓;将所述目标区域的轮廓满足预设轮廓要求的目标区域作为二维码定位框。The device according to claim 11, wherein the selection module is specifically configured to use a contour recognition algorithm to recognize the contour of each of the target regions; the contour of the target region meets a preset contour requirement. As a QR code positioning frame.
  17. 根据权利要求11所述的装置,其特征在于,所述选取模块,具体配置成任意选取三个所述目标区域;判断三个所述目标区域的位置关系是否符合预设要求;若符合预设要求,则确定三个所述目标区域分别为所述二维码定位框。The device according to claim 11, wherein the selection module is specifically configured to randomly select three of the target areas; determine whether the positional relationship of the three target areas meets a preset requirement; If required, it is determined that the three target areas are the two-dimensional code positioning frames respectively.
  18. 根据权利要求11所述的装置,其特征在于,所述选取模块,具体配置成任意选取 三个所述目标区域;判断三个所述目标区域中任意两个目标区域的面积差是否小于预设差值;若小于预设差值,则确定三个所述目标区域为所述二维码定位框。The device according to claim 11, wherein the selection module is specifically configured to select three of the target areas arbitrarily; determine whether the area difference between any two of the three target areas is smaller than a preset Difference; if it is less than the preset difference, determine the three target areas as the two-dimensional code positioning frame.
  19. 一种电子设备,其特征在于,包括:处理器、存储介质和总线,所述存储介质存储有所述处理器能执行的机器可读指令,当电子设备运行时,所述处理器与所述存储介质之间通过总线通信,所述处理器执行所述机器可读指令,以在执行时执行如权利要求1-9任一项所述的二维码定位框识别方法的步骤。An electronic device, characterized by comprising: a processor, a storage medium and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the bus The storage media communicate through a bus, and the processor executes the machine-readable instructions to execute the steps of the method for identifying a two-dimensional code positioning frame according to any one of claims 1-9 when executing.
  20. 一种存储介质,其特征在于,所述存储介质上存储有程序,所述程序被处理器运行时执行如权利要求1-9任一项所述的二维码定位框识别方法的步骤。A storage medium, characterized in that a program is stored on the storage medium, and when the program is run by a processor, the steps of the method for identifying a two-dimensional code positioning frame according to any one of claims 1-9 are executed.
PCT/CN2020/074168 2019-01-31 2020-02-02 Qr code positioning box identification method and apparatus, and electronic device and storage medium WO2020156553A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910100834.2A CN111507120A (en) 2019-01-31 2019-01-31 Two-dimensional code positioning frame identification method and device, electronic equipment and storage medium
CN201910100834.2 2019-01-31

Publications (1)

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

Family

ID=71841933

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/074168 WO2020156553A1 (en) 2019-01-31 2020-02-02 Qr code positioning box identification method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN111507120A (en)
WO (1) WO2020156553A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016339B (en) * 2020-08-18 2023-12-29 中移(杭州)信息技术有限公司 Two-dimensional code identification and defect repair method and device, electronic equipment and storage medium
CN114239631B (en) * 2021-11-19 2024-03-26 支付宝(杭州)信息技术有限公司 Two-dimensional code identification method and device, storage medium and electronic equipment
CN116167395B (en) * 2023-04-26 2023-09-22 荣耀终端有限公司 Code scanning method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654019A (en) * 2016-02-23 2016-06-08 海信集团有限公司 Fast decoding method and device for two-dimension code
CN106897758A (en) * 2016-12-26 2017-06-27 蒋涵民 A kind of QRL for plane consecutive tracking yards and its method for consecutive tracking
CN106951812A (en) * 2017-03-31 2017-07-14 腾讯科技(深圳)有限公司 Recognize method, device and the terminal of Quick Response Code
CN107451507A (en) * 2017-08-03 2017-12-08 青岛海信电器股份有限公司 A kind of two-dimensional code identification method being used in dynamic image and device

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2938338B2 (en) * 1994-03-14 1999-08-23 株式会社デンソー Two-dimensional code
JP4539701B2 (en) * 2007-09-26 2010-09-08 富士ゼロックス株式会社 Code reading apparatus and code reading program
CN104850835A (en) * 2015-05-13 2015-08-19 杭州朗和科技有限公司 Scanning method and scanning terminal
CN104951726B (en) * 2015-06-25 2017-12-08 福建联迪商用设备有限公司 Method and device for QR Quick Response Code position sensings
CN106127279A (en) * 2016-04-12 2016-11-16 立德高科(昆山)数码科技有限责任公司 The Quick Response Code of a kind of novel type, its generation method and two-dimension code label
CN106022203A (en) * 2016-05-19 2016-10-12 成都陌云科技有限公司 Mobile terminal image capture method
JP6908357B2 (en) * 2016-06-21 2021-07-28 株式会社ミツトヨ Position identification device and position identification method
CN107704793A (en) * 2016-07-07 2018-02-16 立德高科(昆山)数码科技有限责任公司 According to the size of Quick Response Code with automatically adjust recognition area size method and device
CN106156685A (en) * 2016-07-07 2016-11-23 立德高科(昆山)数码科技有限责任公司 The method of multiple Quick Response Codes, device and the terminal that recognition is in the same area
CN106874818B (en) * 2016-08-30 2019-11-22 阿里巴巴集团控股有限公司 A kind of Digital Object Unique Identifier DOI recognition methods and device
CN106570436B (en) * 2016-11-14 2019-01-25 三峡大学 A kind of substation equipment kilowatt meter reading-out system and its meter register method based on two dimensional code
CN107590522B (en) * 2017-08-23 2020-08-21 阿里巴巴集团控股有限公司 Identification code generation and identification method and device
CN107729790B (en) * 2017-09-27 2020-12-29 创新先进技术有限公司 Two-dimensional code positioning method and device
CN107908998B (en) * 2017-11-28 2020-11-03 百富计算机技术(深圳)有限公司 Two-dimensional code decoding method and device, terminal equipment and computer readable storage medium
CN108062781B (en) * 2018-01-31 2021-05-11 深圳市裕同包装科技股份有限公司 System and method for batch generation of visual codes
CN108388825B (en) * 2018-04-04 2021-06-08 厦门码灵半导体技术有限公司 Fast response code searching method and device
CN109102054A (en) * 2018-07-18 2018-12-28 北京进化者机器人科技有限公司 The generating means of frame code and the application method of frame code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654019A (en) * 2016-02-23 2016-06-08 海信集团有限公司 Fast decoding method and device for two-dimension code
CN106897758A (en) * 2016-12-26 2017-06-27 蒋涵民 A kind of QRL for plane consecutive tracking yards and its method for consecutive tracking
CN106951812A (en) * 2017-03-31 2017-07-14 腾讯科技(深圳)有限公司 Recognize method, device and the terminal of Quick Response Code
CN107451507A (en) * 2017-08-03 2017-12-08 青岛海信电器股份有限公司 A kind of two-dimensional code identification method being used in dynamic image and device

Also Published As

Publication number Publication date
CN111507120A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
US11087407B2 (en) Systems and methods for mobile image capture and processing
WO2020156553A1 (en) Qr code positioning box identification method and apparatus, and electronic device and storage medium
US9275281B2 (en) Mobile image capture, processing, and electronic form generation
WO2014160433A2 (en) Systems and methods for classifying objects in digital images captured using mobile devices
CN110852233A (en) Hand-off steering wheel detection and training method, terminal, device, medium, and system
Yang et al. Image mosaicking using SURF features of line segments
WO2024012463A1 (en) Positioning method and apparatus
CN111127480B (en) Image processing method and device, electronic equipment and storage medium
EP3410389A1 (en) Image processing method and device
US20220269396A1 (en) Dynamic targeting of preferred objects in video stream of smartphone camera
CN111062374A (en) Identification method, device, system, equipment and readable medium of identity card information
US20170161927A1 (en) Systems and Methods for Stitching Metallographic and Stereoscopic Images
AU2014277851A1 (en) Detecting a gap between text columns from text line fragments
CN114120016B (en) Character string extraction method, device, equipment and storage medium
WO2024018974A1 (en) Information processing method, information processing device, and information processing program
US20230342576A1 (en) Optical symbol, information processing device, and code reading method
Cha et al. Hole Concealment Algorithm Using Camera Parameters in Stereo 360 Virtual Reality System
CN117540762A (en) Bar code identification method, device, equipment and readable storage medium
CN117671217A (en) Equipment installation relocation method and device, server and computer readable storage medium
CN116109643A (en) Market layout data acquisition method, device and computer readable storage medium
CN115191008A (en) Object identification method, device, equipment and storage medium
CN117057996A (en) Photovoltaic panel image processing method, device, equipment and medium
JP2012238098A (en) Image processing device, image processing method, and program

Legal Events

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

Ref document number: 20748767

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20748767

Country of ref document: EP

Kind code of ref document: A1