A reference mark, a reference mark detection method and a device

By detecting multiple connection units and its grayscale level in the image, determine whether it meets the preset rules, solve the problem of failure to detect the benchmark detection due to uneven surface or boundary cover in existing technologies, and achieve higher testing. reliability.

CN111507121BActive Publication Date: 2025-01-28SHENZHEN DILI HLDG ENTERPRISE (LLP)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010077693.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-01-21
Filing Date
2020-01-31
Publication Date
2025-01-28
Estimated Expiration
2040-01-31

AI Technical Summary

Technical Problem

In the prior art, when the two-dimensional barcode reference mark warps, bent or wrinkles on the surface of the object, the black boundary is distorted and cannot be detected; if the boundary is partially blocked or the encoded area is blocked, the detection failure will also occur.

Method used

Put forward a benchmark mark detection method. By obtaining multiple connection units and grayscale levels to be tested in a frame of images, it is determined whether these units meet the preset detection rules, including the number of units and angle unit grayscale levels. Consistency, different gray levels of adjacent units and types of gray levels.

Benefits of technology

Even if the benchmark marker surface is uneven or the unit shape is distorted, the existence of the benchmark marker can still be effectively detected, which improves the reliability of the benchmark mark detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111507121B_ABST
    Figure CN111507121B_ABST
Patent Text Reader

Abstract

The present invention provides a reference mark, a reference mark detection method and a device, the method comprising: obtaining multiple connection units of the reference mark to be detected and the grayscale level of each unit in the multiple connection units in a frame image; if it is determined that the multiple connection units of the reference mark to be detected meet the detection rules, then determining that the reference mark exists; wherein the detection rules include: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different and the grayscale levels of all units in the multiple connection units include a first grayscale level, a second grayscale level and a third grayscale level. The device is used to execute the above method. The reference mark, the reference mark detection method and the device provided by the embodiments of the present invention improve the reliability of reference mark detection.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to U.S. Provisional Patent Application No. 62 / 799,163, filed on January 31, 2019, the contents of which are incorporated herein by reference. Technical Field

[0002] The present invention relates to the field of data processing technology, and in particular to a reference mark, a reference mark detection method and a device. Background Art

[0003] As a carrier of information, two-dimensional barcodes can be used in warehousing and logistics, retail, medical care, factories, office automation, augmented reality and computer vision to quickly obtain relevant information.

[0004] The fiducial marker including the two-dimensional barcode is usually composed of a two-dimensional grid, and the information is encoded by the cells in the two-dimensional grid to store information. When used, the above-mentioned fiducial marker is usually attached or printed on the surface of the object. In the prior art, fiducial markers with black borders and two-dimensional barcodes in black and white are usually used, and the detection of the fiducial marker is achieved by detecting the square black border of the above-mentioned fiducial marker in the image. Figure 1A It is a schematic diagram of the structure of the reference mark of the prior art, such as Figure 1A As shown, the reference mark includes an 8x8 grid, a total of 64 grids, each grid is a square, and the color of each grid is black or white. Figure 1A The shaded portion shown in FIG. 1 is the boundary portion 101. Each grid of the boundary portion 101 is black. Figure 1A If the entire border portion 101 is not detected when a fiducial marker is shown, then the fiducial marker cannot be detected. Figure 1A The portion of the reference mark shown surrounded by the boundary portion 101 is a coding area 102, which is used for encoding and decoding. Part of the grid of the coding area 102 can be configured in black or white to form a two-dimensional bar code.

[0005] However, various problems have arisen in the actual use of fiducial markers, including two-dimensional barcodes. First, since the fiducial marker is attached or printed on the surface of an object, if the surface of the object is warped, bent, or wrinkled, the black border of the fiducial marker will be distorted in the image and lose its square shape, causing the fiducial marker to fail to be detected. Figure 1B It is a standard structural diagram of a reference mark in the prior art. Figure 1C It is a schematic diagram of a structure in which a reference mark in the prior art is deformed, such as Figure 1B and Figure 1C As shown, due to the warping, distortion or wrinkling of the surface of the object on which the fiducial mark is printed or attached, Figure 1BThe fiducial marks shown are actually displayed as Figure 1C In the case shown, the square black border of the reference mark captured in the image no longer appears square, causing the detection device to be unable to detect the existence of the reference mark. Second, if the black border of the reference mark is partially blocked during use, for example, a part of the square black border of the reference mark is blocked or covered, so that the square black border of the reference mark becomes an open loop shape, the detection of the reference mark will fail. Figure 1D is a schematic diagram of a structure in which a reference mark is blocked in the prior art, such as Figure 1B and Figure 1D As shown, Figure 1B The fiducial markers shown occur Figure 1D In the case of partial occlusion shown in the figure, due to the existence of the occluder, the square black border portion of the reference mark is partially blocked, and no closed loop is formed, and the detection device will not be able to detect the existence of the reference mark. Third, if the coding area of ​​the reference mark is partially blocked, then even if the reference mark is detected, the coding area of ​​the reference mark is blocked, which will result in the inability to decode the reference mark. Summary of the invention

[0006] In view of the problems in the prior art, the embodiments of the present invention provide a reference mark, a reference mark detection method and an apparatus, which can at least partially solve the problems in the prior art.

[0007] In one aspect, the present invention provides a method for detecting a reference mark, comprising:

[0008] Obtaining a plurality of connected units of a reference mark to be detected and a gray level of each unit in the plurality of connected units in a frame of image;

[0009] If it is determined that the multiple connection units of the reference mark to be detected meet the detection rules, it is determined that the reference mark exists; wherein the detection rules include: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different and the grayscale levels of all units of the multiple connection units include a first grayscale level, a second grayscale level and a third grayscale level.

[0010] On the other hand, the present invention provides a reference mark, comprising a plurality of units, the plurality of units comprising four corner units, each unit having a grayscale level, the plurality of units comprising a plurality of connected units, the grayscale levels of two adjacent units in the plurality of connected units being different and the grayscale levels of all units in the plurality of connected units comprising a first grayscale level, a second grayscale level and a third grayscale level, the plurality of connected units comprising four corner units and the grayscale levels of the four corner units being the same.

[0011] The reference mark further includes: the grayscale level of each row unit includes a first grayscale level, a second grayscale level and a third grayscale level, or the grayscale level of each column unit includes a first grayscale level, a second grayscale level and a third grayscale level.

[0012] Wherein, the reference mark further includes: the gray levels of the four units having a common corner point include a first gray level, a second gray level and a third gray level.

[0013] Wherein, the shape of the unit is square or rectangular.

[0014] In another aspect, the present invention provides a reference mark detection device, comprising:

[0015] A detection unit, used to obtain a plurality of connection units of a reference mark to be detected and a gray level of each unit in the plurality of connection units in a frame of image;

[0016] A judgment unit is used to determine the existence of a reference mark after it is determined that the multiple connection units of the reference mark to be detected meet the detection rules; wherein the detection rules include: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different and the grayscale levels of all units of the multiple connection units include a first grayscale level, a second grayscale level and a third grayscale level.

[0017] On the other hand, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the reference mark detection method described in any of the above embodiments when executing the program.

[0018] In yet another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the reference mark detection method described in any of the above embodiments.

[0019] The reference mark, reference mark detection method and device provided by the embodiments of the present invention obtain multiple connection units of the reference mark to be detected and the grayscale level of each unit in the multiple connection units in one frame image, and after judging that the multiple connection units of the reference mark to be detected satisfy the detection rules, determine that the reference mark exists. Even if the surface of the reference mark is uneven and the shape of the unit is distorted, the reference mark can still be detected, which can improve the reliability of the reference mark detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0021] Figure 1A It is a schematic diagram of the structure of the reference mark in the prior art.

[0022] Figure 1B It is a standard structural diagram of a reference mark in the prior art.

[0023] Figure 1C The present invention is a structural schematic diagram of a reference mark in the prior art that undergoes deformation.

[0024] Figure 1D It is a schematic diagram of a structure in which a reference mark is blocked in the prior art.

[0025] Figure 2 It is a schematic diagram of the structure of a reference mark provided by an embodiment of the present invention.

[0026] Figure 3 It is a flowchart of a reference mark detection method provided in one embodiment of the present invention.

[0027] Figure 4 It is a schematic diagram of displaying a reference mark provided by an embodiment of the present invention.

[0028] Figure 5 Schematic diagram of grid points of reference marks provided in one embodiment of the present invention.

[0029] Figure 6 Schematic diagram of grid points of reference marks provided in another embodiment of the present invention.

[0030] Figure 7 It is a schematic diagram of displaying an obstructed reference mark provided by an embodiment of the present invention.

[0031] Figure 8 It is a schematic diagram of an estimation result of an obscured reference marker provided by an embodiment of the present invention.

[0032] Fig. 9 It is another schematic diagram of estimation results of an obscured reference marker provided by an embodiment of the present invention.

[0033] Fig.10 Schematic diagram of grid points of obscured reference marks provided in one embodiment of the present invention.

[0034] Fig.11It is a flowchart of a reference mark detection method provided by another embodiment of the present invention.

[0035] Fig.12 It is a flowchart of a reference mark detection method provided in yet another embodiment of the present invention.

[0036] Fig.13 It is a schematic diagram of the structure of a reference mark detection device provided in one embodiment of the present invention.

[0037] Fig.14 It is a schematic structural diagram of a reference mark detection device provided in another embodiment of the present invention.

[0038] Fig.15 It is a schematic structural diagram of a reference mark detection device provided in yet another embodiment of the present invention.

[0039] Fig.16 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily.

[0041] Figure 2 is a schematic diagram of the structure of a reference mark provided by an embodiment of the present invention, such as Figure 2 As shown, the reference mark provided by the embodiment of the present invention includes a plurality of units 1 arranged in a grid, the plurality of units 1 include four corner units 2, each unit 1 has a gray level, the reference mark includes a plurality of connected units, if a unit and another unit have a common border, or a unit and at least one unit in a group of connected units including another unit have a common border, then the two units are connected units. The gray levels of two adjacent units in the plurality of connected units are different, and the gray levels of all units in the plurality of connected units include a first gray level, a second gray level, and a third gray level, the plurality of connected units include four corner units 2, and the gray levels of the four corner units 2 are the same, for example, the gray levels of the four corner units 2 are all the first gray level or the second gray level. Among them, two adjacent units refer to two units with a common border. The first gray level is black gray, the second gray level is gray gray, and the third gray level is white gray. The shape of each unit can be rectangular or square, which is set according to actual needs, and the embodiment of the present invention does not limit it.

[0042] The four corner units 2 of the plurality of connection units have the same gray level to facilitate identification of the reference mark. The units other than the four corner units 2 of the plurality of connection units constitute a coding area for creating a two-dimensional barcode.

[0043] For example, Figure 2 The fiducial mark shown is a 5x6 rectangular grid, and the fiducial mark includes 30 units 1, among which there are 4 corner units 2, each unit 1 has a grayscale level, and two adjacent units 1 have different grayscale levels, that is, if two units have the same border, then the grayscale levels of the two units are different, and the grayscale levels of the 30 units 1 include three types: black grayscale, gray grayscale and white grayscale, and the 4 corner units 2 have the same black grayscale. Any two of the 30 units 1 can constitute a connecting unit, and the fiducial mark includes a plurality of connecting units. Among them, except for the four corner units 2, the remaining 26 units 1 form a coding area, which can be used to create a two-dimensional barcode. The ratio of the number of units in the coding area to the total number of units in the fiducial mark is 13:15, which is about 86%, which is consistent with Figure 1A For comparison, Figure 1A The reference mark shown has a total of 64 units, of which only 36 units can be used for encoding. The ratio of the number of encoded units to the total number of reference mark units is 9:16, which is about 56%. Figure 2 The coding region of the fiducial markers shown accounts for 86% of the Figure 1A The coding area of ​​the reference mark shown accounts for 56%. The reference mark provided by the embodiment of the present invention can increase the proportion of the coding area, which is conducive to reducing the reference mark and making the reference mark more robust when facing a limited object surface.

[0044] The reference mark provided by the embodiment of the present invention includes a plurality of units, the plurality of units include four corner units, the unit information of each unit includes a grayscale level, the plurality of units include a plurality of connection units, the grayscale levels of two adjacent units in the plurality of connection units are different, and the grayscale levels of all units in the plurality of connection units include a first grayscale level, a second grayscale level, and a third grayscale level, the plurality of connection units include four corner units, and the grayscale levels of the four corner units are the same, which can increase the proportion of the coding area and improve the utilization rate of the reference mark. In addition, the reference mark provided by the embodiment of the present invention is easy to detect and can improve the reliability of the reference mark detection.

[0045] The reference markers provided by the embodiments of the present invention can be applied to fields such as augmented reality and computer vision, robotic systems, Simultaneous Localization and Mapping (SLAM), packaging and personnel detection and tracking, and factory and warehouse management.

[0046] On the basis of the above embodiments, further, the reference mark provided by the embodiment of the present invention also includes:

[0047] The grayscale levels of each row of cells include a first grayscale level, a second grayscale level, and a third grayscale level, or the grayscale levels of each column of cells include a first grayscale level, a second grayscale level, and a third grayscale level.

[0048] Specifically, the gray levels of all cells in the same row include the first gray level, the second gray level and the third gray level. Alternatively, the gray levels of all cells in the same column include the first gray level, the second gray level and the third gray level.

[0049] like Figure 2 As shown, based on the above embodiments, further, the reference mark provided by the embodiment of the present invention also includes:

[0050] Gray levels of four cells having a common corner point include a first gray level, a second gray level, and a third gray level.

[0051] Specifically, except for the grid points located on the benchmark mark outline, each grid point is shared by four units, and the grid point shared by four units is the common corner point of the four units. The grayscale levels of the four units with the common corner point include a first grayscale level, a second grayscale level and a third grayscale level.

[0052] On the basis of the above embodiments, further, the shape of the unit 1 is a square or a rectangle.

[0053] Figure 3 FIG. 1 is a flow chart of a method for detecting a reference mark according to an embodiment of the present invention. Figure 3 As shown, the reference mark detection method provided by the embodiment of the present invention is used to detect the reference mark described in any of the above embodiments, including:

[0054] S301, obtaining a plurality of connection units of a reference mark to be detected and a gray level of each unit in the plurality of connection units in a frame of image;

[0055] Specifically, the reference mark detection device can capture a frame image of the reference mark to be detected through a camera, and then detect the unit of the reference mark to be detected in the above frame image, so as to obtain multiple connection units and the grayscale level of each unit in the multiple connection units.

[0056] S302. If it is determined that the multiple connection units of the reference mark to be detected meet the detection rules, it is determined that the reference mark exists; wherein the detection rules include: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different and the grayscale levels of all units of the multiple connection units include a first grayscale level, a second grayscale level and a third grayscale level.

[0057] Specifically, after obtaining the multiple connection units of the reference mark to be detected, the reference mark detection device will determine whether the multiple connection units meet the detection rules. If the multiple connection units meet the detection rules, the reference mark detection device can determine that the reference mark exists. If the multiple connection units do not meet the detection rules, the reference mark detection device cannot detect the existence of the reference mark. After detecting the reference mark, the reference mark detection device can decode the reference mark based on the grayscale level of each unit of the multiple connection units. The detection rules are preset.

[0058] Wherein, the detection rule includes: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different, and the grayscale levels of all units in the multiple connection units include a first grayscale level, a second grayscale level, and a third grayscale level. The reference mark detection device will count the number of units included in the multiple connection units, compare the number of units included in the multiple connection units with the preset value, and determine whether the number of units included in the multiple connection units is greater than the preset value. The reference mark detection device will determine whether the multiple connection units include four corner units, and determine whether the grayscale levels of the four corner units are the same according to the grayscale levels of the four corner units. The reference mark detection device will determine whether the grayscale levels of two adjacent units in the multiple connection units are different. The detection device will also determine whether the grayscale levels of all units in the multiple connection units include a first grayscale level, a second grayscale level, and a third grayscale level. If the reference mark detection device determines that the number of units included in the multiple connection units is greater than the preset value, the multiple connection units include four corner units and the gray levels of the four corner units are the same, the gray levels of two adjacent units in the multiple connection units are different, and the gray levels of all units in the multiple connection units include a first gray level, a second gray level, and a third gray level, then the reference mark detection device determines that the multiple connection units of the reference mark to be detected meet the detection rule. Otherwise, the multiple connection units do not meet the detection rule.

[0059] The decoding algorithm of the reference mark is set according to actual needs, which is not limited in the embodiment of the present invention. The preset value is set according to actual needs, which is not limited in the embodiment of the present invention.

[0060] For example, Figure 4 is a schematic diagram of displaying a reference mark provided by an embodiment of the present invention, such as Figure 4 As shown in the figure, after the fiducial mark is attached or printed on the surface of the object, the surface of the object is deformed due to warping and other reasons, resulting in the fiducial mark appearing Figure 4 Normally, the surface of the fiducial mark is flat and the fiducial mark should be Figure 2 As shown in the figure, each unit is rectangular in shape, and due to the deformation of the object surface, the rectangular shape of the reference mark becomes Figure 4 In this case, the detection method of the prior art cannot detect the existence of the reference mark because the boundary of the reference mark is no longer regular. Since adjacent cells have different gray levels, the reference mark detection device can identify Figure 4In each unit of the fiducial mark shown, the fiducial mark detection device detects Figure 4 Each unit in the reference mark image shown obtains multiple connected units, and the grayscale level of each unit in the above multiple connected units: black grayscale, white grayscale or gray grayscale. Then it is determined whether the above multiple connected units meet the detection rules. If the above multiple connected units meet the detection rules, the existence of the reference mark is detected. Changes in the shape of the unit will not respond to the detection of the reference mark, and whether the unit has a square or irregular shape does not change the detection result. Among them, the grayscale levels of the detected four corner units can be used to calculate the orientation state of the reference mark.

[0061] The reference mark detection method provided by the embodiment of the present invention obtains multiple connection units of the reference mark to be detected and the grayscale level of each unit in the multiple connection units in a frame image, and after judging that the multiple connection units of the reference mark to be detected satisfy the detection rules, it is determined that the reference mark exists. Even if the surface of the reference mark is uneven and the shape of the unit is distorted, the reference mark can still be detected, which can improve the reliability of the reference mark detection.

[0062] On the basis of the above embodiments, further, the detection rule also includes:

[0063] Among the gray levels of all the cells of the plurality of connection cells, a percentage of the number of cells of each gray level to the total number of all the cells of the plurality of connection cells is greater than a corresponding threshold.

[0064] Specifically, the detection rule also includes that among the gray levels of all the units of the multiple connection units, the percentage of the number of units of each gray level to the total number of all the units of the multiple connection units is greater than the corresponding threshold. When the reference mark detection device determines whether the multiple connection units meet the detection rule, it is necessary to determine, based on the detection rule of step S302, whether among the gray levels of all the units of the multiple connection units, the percentage of the number of units of each gray level to the total number of all the units of the multiple connection units is greater than the corresponding threshold. The threshold corresponding to each gray level is set according to actual experience, and the embodiment of the present invention does not limit it.

[0065] For example, the grayscale levels of all the cells of the plurality of connection cells include a first grayscale level, a second grayscale level, and a third grayscale level, the threshold corresponding to the first grayscale level is 10%, the threshold corresponding to the second grayscale level is 10%, and the threshold corresponding to the third grayscale level is 10%. The reference mark detection device counts the number a of cells of the first grayscale level, the number b of cells of the second grayscale level, the number c of cells of the third grayscale level, and the total number Q of all the cells of the plurality of connection cells, and then calculates a / Q to obtain a percentage A, calculates b / Q to obtain a percentage B, and calculates c / Q to obtain a percentage C. If A is greater than 10%, B is greater than 10%, and C is greater than 10%, then the reference mark detection device can determine that the reference mark exists after determining that the number of cells included in the plurality of connection cells is greater than a preset value, the plurality of connection cells include four corner cells and the grayscale levels of the four corner cells are the same, the grayscale levels of two adjacent cells in the plurality of connection cells are different, and the grayscale levels of all the cells of the plurality of connection cells include the first grayscale level, the second grayscale level, and the third grayscale level.

[0066] On the basis of the above embodiments, further, the detection rule also includes:

[0067] The grayscale levels of each row unit of the plurality of connection units include a first grayscale level, a second grayscale level, and a third grayscale level, or the grayscale levels of each column unit of the plurality of connection units include a first grayscale level, a second grayscale level, and a third grayscale level.

[0068] Specifically, the detection rule also includes that the grayscale level of each row unit of the plurality of connection units includes a first grayscale level, a second grayscale level and a third grayscale level, or the grayscale level of each column unit of the plurality of connection units includes a first grayscale level, a second grayscale level and a third grayscale level. When judging whether the multiple connection units satisfy the detection rules, the reference mark detection device needs to judge whether the grayscale levels of each row of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, or whether the grayscale levels of each column of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, based on the detection rules of step S302. If the grayscale levels of each row of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, or the grayscale levels of each column of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, then it is determined that the reference mark exists; otherwise, the grayscale levels of each row of the multiple connection units do not include the first grayscale level, the second grayscale level and the third grayscale level, and the grayscale levels of each column of the multiple connection units do not include the first grayscale level, the second grayscale level and the third grayscale level, and the reference mark cannot be detected.

[0069] On the basis of the above embodiments, further, the detection rule also includes:

[0070] Gray levels of four cells having a common corner point included in the plurality of connection cells include a first gray level, a second gray level, and a third gray level.

[0071] Specifically, the detection rule also includes that the grayscale levels of the four units with a common corner point included in the multiple connection units include a first grayscale level, a second grayscale level, and a third grayscale level. When judging whether the multiple connection units meet the detection rule, the reference mark detection device needs to judge whether the grayscale levels of the four units with a common corner point included in the multiple connection units include the first grayscale level, the second grayscale level, and the third grayscale level on the basis of the detection rule of step S302. If the grayscale levels of the four units with a common corner point included in the multiple connection units include the first grayscale level, the second grayscale level, and the third grayscale level, then it is determined that the reference mark exists, otherwise the reference mark is not detected.

[0072] It should be noted that whether the detection rule includes the grayscale levels of all units, the percentage of the number of units of each grayscale level to the total number of all units of the multiple connected units is greater than the corresponding threshold, the grayscale levels of each row of the multiple connected units include the first grayscale level, the second grayscale level and the third grayscale level, or the grayscale levels of each column of the multiple connected units include the first grayscale level, the second grayscale level and the third grayscale level, and the grayscale levels of four units with a common corner point included in the multiple connected units include one or more of the first grayscale level, the second grayscale level and the third grayscale level. This condition depends on the actual application needs and is not limited in the embodiments of the present invention.

[0073] Figure 5 is a schematic diagram of a grid point of a reference mark provided by an embodiment of the present invention, such as Figure 5 As shown, the corner points of the unit are used as grid points, and Figure 2 The fiducial markers shown can be obtained Figure 5 The grid configuration shown. Except for the corner points located on the fiducial marker outline, each of the remaining corner points is shared by four cells. Each cell initially has Figure 2 The rectangular shape shown, but may also appear in different shapes under perspective or rough surface conditions, which reflects the state of the fiducial marker including the orientation condition. For example, when the fiducial marker surface is warped, the cells may appear in irregular shapes. Since adjacent cells have different gray levels, each cell of the fiducial marker can be identified, and as long as the cells are distinguishable, the corner points shared by four cells can be considered as grid points. For an unknown grid configuration of a fiducial marker, the grid points within the outline of the fiducial marker can be first identified, because the grid points within the outline of the fiducial marker are shared by four cells. Then, the grid points on the outline shared by two cells can be identified. Finally, the grid points at the four corners of the fiducial marker can be determined. The grid configuration of the fiducial marker can be detected even when the fiducial marker surface is deformed and the cells are distorted. The orientation and surface state of the fiducial marker can be determined by the grid configuration of the fiducial marker, especially when the surface of the fiducial marker is uneven or flat.

[0074] Figure 6 is a schematic diagram of grid points of reference marks provided by another embodiment of the present invention, such as Figure 6 As shown, the corner points of the unit are used as grid points, and Figure 4 The fiducial markers shown can be obtained Figure 6 Mesh configuration shown. Each grid point is shared by four cells, except for those located on the fiducial marker outline. When cells are distorted, e.g. Figure 4 In the case shown, if the cells are detectable, then the corner points shared by four cells are detectable and the grid configuration can be used to determine the orientation state of the fiducial marker.

[0075] When information about the four corner elements of a fiducial marker is known, the four corner elements can be used to calculate information about the orientation state of the fiducial marker. If one or more corner elements may not be visible or recognizable due to some reasons, such as warping of the fiducial marker surface or partial obstruction of the fiducial marker surface, then the orientation state may not be calculated using the corner elements. However, if the grid configuration of the fiducial marker is known, the orientation or attitude of the fiducial marker can be calculated or estimated. Therefore, the orientation or attitude state can still be obtained without directly detecting one or more corner elements. For example, the position of the missing corner element of the fiducial marker can be estimated using the grid points around the missing element. Then, the attitude of the fiducial marker can be calculated using the estimated corner elements and the grid information by a preset algorithm. Therefore, when one or more corner elements are not directly detected, the attitude of the fiducial marker can be calculated based on the algorithm of the grid configuration.

[0076] On the basis of the above embodiments, further, the reference mark detection method provided by the embodiment of the present invention also includes:

[0077] If it is determined that there is a missing unit in the reference mark to be detected, the gray level of the missing unit is estimated according to the gray levels of the adjacent units of the missing unit and the gray levels of any adjacent units.

[0078] Specifically, since the reference mark to be detected is blocked, the reference mark detection device cannot detect all the units of the reference mark to be detected when detecting the reference mark to be detected, and will detect the existence of missing units of the reference mark to be detected. The reference mark detection device can estimate the grayscale level of the missing unit based on the grayscale levels of the units adjacent to the missing unit and the different grayscale levels of any adjacent units.

[0079] For example, Figure 7 is a schematic diagram of displaying an obstructed reference mark provided by an embodiment of the present invention, such as Figure 7As shown, the fiducial marker is blocked by object 401, and the fiducial marker detection device can detect that the blocked fiducial marker has multiple connection units, the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units, and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different, and the grayscale levels of all units in the multiple connection units include black grayscale, white grayscale and gray grayscale, so that the existence of the fiducial marker is detected, and the four corner units can be used to obtain the posture information of the blocked fiducial marker. However, due to the blockage of object 401, there are missing units. Although the fiducial marker is detected, the coding area is incomplete, resulting in the inability to decode the fiducial marker. Assume that the fiducial marker detection device detects that there are three missing units blocked by object 401, and these three missing units cause the two-dimensional barcode to appear damaged, making it impossible to decode the fiducial marker. Since the grayscale levels of any two adjacent units in the blocked fiducial marker are different, and there are only three grayscale levels of black grayscale, white grayscale and gray grayscale, the grayscale levels of the above three missing units can be estimated. Figure 8 is a schematic diagram of an estimation result of an obscured reference marker provided by an embodiment of the present invention, Fig. 9 FIG. 1 is another schematic diagram of an estimation result of an obscured reference mark provided by an embodiment of the present invention. Figure 8 and Fig. 9 The fiducial marks shown are Figure 7 There are only two possibilities for the existence of an occluded fiducial marker in . Figure 8 and Fig. 9 In , dotted line 402 represents the outline of object 401. The grayscale levels of cells 403, 404, and 405 are unknown. The neighboring cells of cell 405 have black grayscale and white grayscale, so the grayscale level of cell 405 can only be gray grayscale to satisfy that any two cells with a common boundary line have different grayscales. When cell 405 is gray grayscale, it can be determined that the grayscale level of cell 404 must be black grayscale, because it is determined that cell 404 already has neighboring cells with white grayscale and gray grayscale. Cell 404 has black grayscale, then cell 403 has three neighboring cells with black grayscale, so there are two possibilities for the grayscale level of cell 403: white grayscale or gray grayscale. Figure 8 Display unit 403 is white grayscale, Fig. 9 Cell 403 is shown as a grey grayscale.

[0080] The reference mark detection method provided by the embodiment of the present invention can estimate the gray level of the missing unit and further improve the reliability of the reference mark detection.

[0081] Fig.10is a schematic diagram of grid points of obscured reference marks provided by an embodiment of the present invention, such as Fig.10 As shown, it is possible to Figure 7 The grid configuration obtained by detecting the occluded fiducial marker shown can be used to obtain the posture information of the occluded fiducial marker.

[0082] Fig.11 is a flow chart of a reference mark detection method provided by another embodiment of the present invention, such as Fig.11 As shown, the reference mark detection method provided by the embodiment of the present invention also includes:

[0083] S1101, if it is determined that there are multiple reference marks to be determined corresponding to the reference mark to be detected, then the Hamming distance between each reference mark to be determined corresponding to the reference mark to be detected and each reference mark in a preset reference mark database is calculated;

[0084] Specifically, when the reference mark detection device estimates the gray level of the missing unit, if there are multiple possibilities for the gray level of the missing unit, the reference mark to be detected in each possible case of the missing unit can be used as a reference mark to be determined corresponding to the reference mark to be detected, and then the Hamming distance between each reference mark to be determined and each reference mark in the preset reference mark database is calculated. Each reference mark in the preset reference mark database is a possible case of the reference mark to be detected. The preset reference mark database is set according to actual needs, and the embodiment of the present invention does not limit it.

[0085] S1102, obtaining the minimum Hamming distance of the Hamming distances corresponding to the reference marks to be determined;

[0086] Specifically, after obtaining the Hamming distance between each reference mark to be determined and each reference mark in the preset reference mark database, the reference mark detection device can compare the various Hamming distances to obtain the minimum Hamming distance and the reference mark to be determined corresponding to the minimum Hamming distance.

[0087] S1103: If it is determined that the minimum Hamming distance is less than a set value, the to-be-determined reference mark corresponding to the minimum Hamming distance is used as the to-be-detected reference mark.

[0088] Specifically, the reference mark detection device compares the minimum Hamming distance with a set value. If the minimum Hamming distance is less than the set value, the reference mark to be determined corresponding to the minimum Hamming distance is used as the reference mark to be detected, thereby obtaining a complete reference mark to be detected, and then determining whether the reference mark to be detected exists, and then decoding the existing reference mark to be detected. The set value is set according to actual experience and is not limited in the embodiment of the present invention.

[0089] For example, for Figure 8 and Fig. 9 The two cases of the obscured fiducial markers shown are calculated separately. Figure 8 The Hamming distance between the benchmark shown and each benchmark in the benchmark database X and Fig. 9 The Hamming distance between the fiducial mark shown and each fiducial mark in the fiducial mark database X is then obtained, and the minimum Hamming distance among the above-mentioned Hamming distances is then compared with a set value. If the minimum Hamming distance is less than the set value, the fiducial mark corresponding to the minimum Hamming distance is used as the complete fiducial mark of the obscured fiducial mark. The fiducial mark database X is preset.

[0090] On the basis of the above embodiments, further, the first grayscale level is black grayscale, the second grayscale level is gray grayscale, and the third grayscale level is white grayscale.

[0091] Fig.12 FIG. 1 is a flow chart of a method for detecting a reference mark according to another embodiment of the present invention. Fig.12 As shown, the reference mark detection method provided by the embodiment of the present invention includes:

[0092] The first step is to obtain an image of the reference mark to be detected. A frame of image of the reference mark to be detected can be captured by a camera.

[0093] The second step is to detect the unit of the reference mark to be detected in the above-mentioned one frame of image, and obtain multiple connected units and the gray level of each connected unit in the multiple connected units.

[0094] Step 3: Determine whether the reference mark exists. Determine whether the number of units included in the multiple connection units is greater than the preset value, determine whether the grayscale levels of two adjacent units in the multiple connection units are different, determine whether the grayscale levels of all units in the multiple connection units include black grayscale, gray grayscale and white grayscale, and determine whether the multiple connection units include four corner units and the grayscale levels of the four corner units are the same. If the number of units included in the multiple connection units is greater than the preset value, the grayscale levels of two adjacent units in the multiple connection units are different, the grayscale levels of all units in the multiple connection units include black grayscale, gray grayscale and white grayscale, and the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, then the reference mark exists and the fourth step is entered. Otherwise, the reference mark does not exist, and the first step is returned to detect the next reference mark to be detected. Among them, if the number of corner units detected is less than 4, it means that one or more corner units cannot be detected due to surface warping or partial occlusion.

[0095] Step 4: Determine whether the reference mark is missing a unit. If the reference mark is not missing a unit, then proceed directly to step 6 for decoding. If the reference mark is missing a unit, it means that there are units that are not detected due to reasons such as warping or occlusion of the reference mark surface, then proceed to step 5 to estimate the missing units.

[0096] Step 5: Estimate the missing unit. Estimate the gray level of the missing unit based on the gray levels of the adjacent units of the missing unit and the gray levels of any adjacent units. If there are multiple possibilities for the gray level of the missing unit, then calculate the Hamming distances between each benchmark mark to be determined corresponding to the benchmark mark to be detected and each benchmark mark in the preset benchmark mark database, and obtain the minimum Hamming distance of the Hamming distances corresponding to each benchmark mark to be determined. If it is determined that the minimum Hamming distance is less than the set value, the benchmark mark to be determined corresponding to the minimum Hamming distance is used as the benchmark mark to be detected.

[0097] Step 6: Decode the reference mark: Decode the two-dimensional barcode of the reference mark according to a pre-set decoding algorithm.

[0098] Fig.13 FIG. 1 is a schematic diagram of the structure of a reference mark detection device provided by an embodiment of the present invention. Fig.13 As shown, the reference mark detection device provided by the embodiment of the present invention includes a detection unit 1301 and a judgment unit 1302, wherein:

[0099] The detection unit 1301 is used to obtain multiple connection units of the reference mark to be detected and the grayscale level of each unit in the multiple connection units in a frame image; the judgment unit 1302 is used to determine the existence of the reference mark after judging that the multiple connection units of the reference mark to be detected meet the detection rules; wherein the detection rules include: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different and the grayscale levels of all units of the multiple connection units include a first grayscale level, a second grayscale level and a third grayscale level.

[0100] Specifically, the detection unit 1301 can capture a frame image of the reference mark to be detected through a camera, and then detect each unit of the reference mark to be detected in the above frame image, so as to obtain multiple connection units and the grayscale level of each unit in the multiple connection units.

[0101] Specifically, after obtaining the multiple connection units of the reference mark to be detected, the judgment unit 1302 will judge whether the multiple connection units meet the detection rules. If the multiple connection units meet the detection rules, the reference mark detection device can determine that the reference mark exists. If the multiple connection units do not meet the detection rules, the reference mark detection device cannot detect the existence of the reference mark. After detecting the reference mark, the judgment unit 1302 can decode the reference mark based on the grayscale level of each unit of the multiple connection units. The detection rules are preset.

[0102] The detection rule includes: the number of cells included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent cells in the multiple connection units are different, and the grayscale levels of all cells in the multiple connection units include a first grayscale level, a second grayscale level, and a third grayscale level. The judgment unit 1302 counts the number of cells included in the multiple connection units, compares the number of cells included in the multiple connection units with the preset value, and determines whether the number of cells included in the multiple connection units is greater than the preset value. The judgment unit 1302 determines whether the multiple connection units include four corner units, and determines whether the grayscale levels of the four corner units are the same according to the grayscale levels of the four corner units. The judgment unit 1302 determines whether the grayscale levels of two adjacent cells in the multiple connection units are different. The judgment unit 1302 also determines whether the grayscale levels of all cells in the multiple connection units include the first grayscale level, the second grayscale level, and the third grayscale level. If the reference mark detection device determines that the number of units included in the multiple connection units is greater than the preset value, the multiple connection units include four corner units and the gray levels of the four corner units are the same, the gray levels of two adjacent units in the multiple connection units are different, and the gray levels of all units in the multiple connection units include a first gray level, a second gray level, and a third gray level, then the reference mark detection device determines that the multiple connection units of the reference mark to be detected meet the detection rule. Otherwise, the multiple connection units do not meet the detection rule.

[0103] The decoding algorithm of the reference mark is set according to actual needs, which is not limited in the embodiment of the present invention. The preset value is set according to actual needs, which is not limited in the embodiment of the present invention.

[0104] The reference mark detection device provided by the embodiment of the present invention obtains multiple connection units of the reference mark to be detected and the grayscale level of each unit in the multiple connection units in one frame image, and determines that the reference mark exists after judging that the multiple connection units of the reference mark to be detected meet the detection rules. Even if the surface of the reference mark is uneven and the shape of the unit is distorted, the reference mark can still be detected, which can improve the reliability of the reference mark detection.

[0105] On the basis of the above embodiments, further, the detection rule also includes:

[0106] Among the gray levels of all the cells of the plurality of connection cells, a percentage of the number of cells of each gray level to the total number of all the cells of the plurality of connection cells is greater than a corresponding threshold.

[0107] Specifically, the detection rule also includes that the percentage of the number of units of each gray level in the gray levels of all units of the multiple connection units to the total number of all units of the multiple connection units is greater than the corresponding threshold. When judging whether the multiple connection units meet the detection rule, the judgment unit 1302 needs to judge whether the percentage of the number of units of each gray level in the gray levels of all units of the multiple connection units to the total number of all units of the multiple connection units is greater than the corresponding threshold based on the execution of the detection rule of step S302. Among them, the threshold corresponding to each gray level is set according to actual experience, and the embodiment of the present invention does not limit it.

[0108] On the basis of the above embodiments, further, the detection rule also includes:

[0109] The grayscale levels of each row unit of the plurality of connection units include a first grayscale level, a second grayscale level, and a third grayscale level, or the grayscale levels of each column unit of the plurality of connection units include a first grayscale level, a second grayscale level, and a third grayscale level.

[0110] Specifically, the detection rule also includes that the grayscale level of each row unit of the plurality of connection units includes a first grayscale level, a second grayscale level and a third grayscale level, or the grayscale level of each column unit of the plurality of connection units includes a first grayscale level, a second grayscale level and a third grayscale level. When judging whether the multiple connection units satisfy the detection rules, the judging unit 1302 needs to judge whether the grayscale levels of each row of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, or whether the grayscale levels of each column of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, based on the detection rules of step S302. If the grayscale levels of each row of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, or the grayscale levels of each column of the multiple connection units include the first grayscale level, the second grayscale level and the third grayscale level, then it is determined that the reference mark exists; otherwise, the grayscale levels of each row of the multiple connection units do not include the first grayscale level, the second grayscale level and the third grayscale level, and the grayscale levels of each column of the multiple connection units do not include the first grayscale level, the second grayscale level and the third grayscale level, and the reference mark cannot be detected.

[0111] On the basis of the above embodiments, further, the detection rule also includes:

[0112] Gray levels of four cells having a common corner point included in the plurality of connection cells include a first gray level, a second gray level, and a third gray level.

[0113] Specifically, the detection rule also includes that the grayscale levels of the four units with a common corner point included in the multiple connection units include a first grayscale level, a second grayscale level, and a third grayscale level. When judging whether the multiple connection units meet the detection rule, the judgment unit 1302 needs to judge whether the grayscale levels of the four units with a common corner point included in the multiple connection units include the first grayscale level, the second grayscale level, and the third grayscale level on the basis of executing the detection rule of step S302. If the grayscale levels of the four units with a common corner point included in the multiple connection units include the first grayscale level, the second grayscale level, and the third grayscale level, then it is determined that the reference mark exists, otherwise the reference mark is not detected.

[0114] Fig.14 1 is a schematic diagram of the structure of a reference mark detection device provided by another embodiment of the present invention. On the basis of the above embodiments, the reference mark detection device provided by the embodiment of the present invention further includes an estimation unit 1303, wherein:

[0115] The estimation unit 1303 is used to estimate the gray level of the missing unit according to the gray levels of the units adjacent to the missing unit and the gray levels of any adjacent units after determining that there is a missing unit of the reference mark to be detected.

[0116] Specifically, since the reference mark to be detected is blocked, the reference mark detection device cannot detect all the units of the reference mark to be detected when detecting the reference mark to be detected, and will detect the existence of missing units of the reference mark to be detected. The estimation unit 1303 can estimate the grayscale level of the missing unit based on the grayscale levels of the units adjacent to the missing unit and the grayscale levels of any adjacent units.

[0117] Fig.15 FIG. 1 is a schematic diagram of the structure of a reference mark detection device provided by another embodiment of the present invention. Fig.15 As shown, based on the above embodiments, further, the reference mark detection device provided by the embodiment of the present invention also includes:

[0118] The calculation unit 1304 is used to calculate the Hamming distances between each to-be-determined reference mark corresponding to the to-be-detected reference mark and each reference mark in a preset reference mark database; the acquisition unit 1305 is used to obtain the minimum Hamming distance of the Hamming distances corresponding to each to-be-determined reference mark; the determination unit 1306 is used to use the to-be-determined reference mark corresponding to the minimum Hamming distance as the to-be-detected reference mark after determining that the minimum Hamming distance is less than a set value.

[0119] Specifically, when the calculation unit 1304 estimates the gray level of the missing unit, if there are multiple possibilities for the gray level of the missing unit, the reference mark to be detected in each possible case of the missing unit can be used as a reference mark to be determined corresponding to the reference mark to be detected, and then the Hamming distance between each reference mark to be determined and each reference mark in the preset reference mark database is calculated. Each reference mark in the preset reference mark database is a possible case of the reference mark to be detected. The preset reference mark database is set according to actual needs, and the embodiment of the present invention does not limit it.

[0120] After obtaining the Hamming distance between each reference mark to be determined and each reference mark in the preset reference mark database, the acquisition unit 1305 can compare the various Hamming distances to obtain the minimum Hamming distance and the reference mark to be determined corresponding to the minimum Hamming distance.

[0121] The determination unit 1306 compares the minimum Hamming distance with a set value. If the minimum Hamming distance is less than the set value, the reference mark to be determined corresponding to the minimum Hamming distance is used as the reference mark to be detected, thereby obtaining a complete reference mark to be detected, and then determining whether the reference mark to be detected exists, and decoding the existing reference mark to be detected. The set value is set according to actual experience and is not limited in the embodiment of the present invention.

[0122] On the basis of the above embodiments, further, the first grayscale level is black grayscale, the second grayscale level is gray grayscale, and the third grayscale level is white grayscale.

[0123] The embodiment of the reference mark detection device provided by the embodiment of the present invention can be specifically used to execute the processing flow of the above-mentioned method embodiments. Its functions will not be repeated here, and reference can be made to the detailed description of the above-mentioned method embodiments.

[0124] Fig.16 is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention, such as Fig.16 As shown, the electronic device may include: a processor 1601, a communication interface 1602, a memory 1603 and a communication bus 1604, wherein the processor 1601, the communication interface 1602 and the memory 1603 communicate with each other through the communication bus 1604. The processor 1601 may call the logic instructions in the memory 1603 to execute the following method: obtaining multiple connection units of a reference mark to be detected and the gray level of each unit in the multiple connection units in a frame image; if it is determined that the multiple connection units of the reference mark to be detected meet the detection rule, then determining that the reference mark exists; wherein the detection rule includes: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the gray levels of the four corner units are the same, the gray levels of two adjacent units in the multiple connection units are different and the gray levels of all units of the multiple connection units include a first gray level, a second gray level and a third gray level.

[0125] In addition, the logic instructions in the above-mentioned memory 1603 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0126] The present embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining multiple connection units of a reference mark to be detected and the grayscale level of each unit in the multiple connection units in a frame image; if it is determined that the multiple connection units of the reference mark to be detected meet the detection rule, it is determined that the reference mark exists; wherein the detection rule includes: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different and the grayscale levels of all units of the multiple connection units include a first grayscale level, a second grayscale level and a third grayscale level.

[0127] The present embodiment provides a computer-readable storage medium, which stores a computer program, and the computer program enables the computer to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining multiple connection units of a reference mark to be detected and the grayscale level of each unit in the multiple connection units in a frame image; if it is determined that the multiple connection units of the reference mark to be detected meet the detection rules, it is determined that the reference mark exists; wherein the detection rules include: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the grayscale levels of the four corner units are the same, the grayscale levels of two adjacent units in the multiple connection units are different and the grayscale levels of all units of the multiple connection units include a first grayscale level, a second grayscale level and a third grayscale level.

[0128] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] The present invention is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0130] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0132] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0133] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting a reference mark, characterized in that: include: Obtaining a plurality of connected units of a reference mark to be detected in a frame of image and a gray level of each unit in the plurality of connected units; the connected units include a unit having a common boundary with another unit or a unit having a common boundary with at least one unit in a group of connected units including another unit; If it is determined that the multiple connected units of the reference mark to be detected meet the detection rules, it is determined that the reference mark exists; wherein the detection rules include: the number of units included in the multiple connected units is greater than a preset value, the multiple connected units include four corner units and the gray levels of the four corner units are the same, the gray levels of two adjacent units in the multiple connected units are different and the gray levels of all units in the multiple connected units include a first gray level, a second gray level and a third gray level; the two adjacent units refer to two units having a common boundary; If it is determined that there is a missing unit in the reference mark to be detected, the gray level of the missing unit is estimated according to the gray levels of two adjacent units of the missing unit and the gray levels of any two adjacent units are different.

2. The method according to claim 1, characterized in that The detection rules also include: Among the gray levels of all the cells of the plurality of connection cells, a percentage of the number of cells of each gray level to the total number of all the cells of the plurality of connection cells is greater than a corresponding threshold.

3. The method according to claim 1, characterized in that The detection rules also include: The grayscale levels of each row unit of the plurality of connection units include a first grayscale level, a second grayscale level, and a third grayscale level, or the grayscale levels of each column unit of the plurality of connection units include a first grayscale level, a second grayscale level, and a third grayscale level.

4. The method according to claim 1, characterized in that: The detection rules also include: Gray levels of four cells having a common corner point included in the plurality of connection cells include a first gray level, a second gray level, and a third gray level.

5. The method according to claim 1, characterized in that Also includes: If it is determined that there are multiple reference marks to be determined corresponding to the reference mark to be detected, then the Hamming distance between each reference mark to be determined corresponding to the reference mark to be detected and each reference mark in the preset reference mark database is calculated; Obtaining the minimum Hamming distance of the Hamming distances corresponding to the reference marks to be determined; If it is determined that the minimum Hamming distance is less than a set value, the to-be-determined reference mark corresponding to the minimum Hamming distance is used as the to-be-detected reference mark.

6. The method according to any one of claims 1 to 5, characterized in that: The first gray level is a black gray level, the second gray level is a gray gray level, and the third gray level is a white gray level.

7. A reference mark, characterized in that: The invention comprises a plurality of units, each unit having a grayscale level, the plurality of units comprising a plurality of connected units, the grayscale levels of two adjacent units in the plurality of connected units are different and the grayscale levels of all units in the plurality of connected units include a first grayscale level, a second grayscale level and a third grayscale level, the plurality of connected units comprising four corner units and the grayscale levels of the four corner units are the same; the connected units comprise a unit having a common border with another unit or a unit having a common border with at least one unit in a group of connected units including another unit; the two adjacent units refer to two units having a common border.

8. The reference mark according to claim 7, characterized in that Also includes: The grayscale levels of each row of cells include a first grayscale level, a second grayscale level, and a third grayscale level, or the grayscale levels of each column of cells include a first grayscale level, a second grayscale level, and a third grayscale level.

9. The reference mark according to claim 7, characterized in that: Also includes: Gray levels of four cells having a common corner point include a first gray level, a second gray level, and a third gray level.

10. The reference marker according to claim 7, characterized in that The unit is in the shape of a square or a rectangle.

11. A reference mark detection device, characterized in that: include: A detection unit, used to obtain a plurality of connected units of a reference mark to be detected in a frame of image and a gray level of each unit in the plurality of connected units; the connected units include a unit having a common boundary with another unit or a unit having a common boundary with at least one unit in a group of connected units including another unit; A judgment unit, configured to determine that the reference mark exists after judging that the multiple connection units of the reference mark to be detected meet the detection rules; wherein the detection rules include: the number of units included in the multiple connection units is greater than a preset value, the multiple connection units include four corner units and the gray levels of the four corner units are the same, the gray levels of two adjacent units in the multiple connection units are different and the gray levels of all units in the multiple connection units include a first gray level, a second gray level and a third gray level; the two adjacent units are two units having a common boundary; The estimation unit is used to estimate the gray level of the missing unit according to the gray levels of two adjacent units of the missing unit and the gray levels of any two adjacent units after determining that the missing unit exists in the reference mark to be detected.

12. The device according to claim 11, characterized in that The detection rules also include: Among the gray levels of all the cells of the plurality of connection cells, a percentage of the number of cells of each gray level to the total number of all the cells of the plurality of connection cells is greater than a corresponding threshold.

13. The device according to claim 11, characterized in that The detection rules also include: The grayscale level of each row unit of the plurality of connection units includes a first grayscale level, a second grayscale level, and a third grayscale level, or the grayscale level of each column unit of the plurality of connection units includes a first grayscale level, a second grayscale level, and a third grayscale level.

14. The device according to claim 11, characterized in that The detection rules also include: Gray levels of four cells having a common corner point included in the plurality of connection cells include a first gray level, a second gray level, and a third gray level.

15. The device according to claim 11, characterized in that Also includes: a calculating unit, configured to calculate the Hamming distance between each to-be-determined reference mark corresponding to the to-be-detected reference mark and each reference mark in a preset reference mark database after determining that there are multiple to-be-determined reference marks corresponding to the to-be-detected reference mark; An acquiring unit, used for acquiring the minimum Hamming distance of the Hamming distances corresponding to the reference marks to be determined; A determination unit is used to, after determining that the minimum Hamming distance is less than a set value, use the to-be-determined reference mark corresponding to the minimum Hamming distance as the to-be-detected reference mark.

16. The device according to any one of claims 11 to 15, characterized in that The first gray level is a black gray level, the second gray level is a gray gray level, and the third gray level is a white gray level.

17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Machine-readable label

    CN1179752A