Coding Mark with Variable Coding Capacity for Visual Positioning and Its Coding Method
By designing coding marks with variable encoding capacity, the problem of existing coding marks with insufficient pattern deformation and coding capacity at different angles is solved, and flexible changes in coding capacity and high-precision visual measurement are realized, which is suitable for diverse scenarios.
Patent Information
- Application Number
- CN202310372051.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-10
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-04-10
Smart Images

Figure CN116485881B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual measurement in computer vision, and specifically to an encoding mark with variable encoding capacity for visual positioning and an encoding method, which are applicable to fields such as camera calibration, target feature extraction, visual 3D measurement, and visual 3D positioning. Background Art
[0002] In the actual production applications of visual measurement, due to the combined effects of a series of complex production scenario problems such as field of view angle and field of view resolution, problems such as higher difficulty in matching and extracting feature points of the object to be measured have emerged, which further affects the results of visual measurement. Therefore, in the process of visual measurement, the matching and extraction of feature points of the object to be measured have become important research objects because they not only affect the measurement efficiency but also determine the measurement accuracy.
[0003] In addition to having relatively obvious feature points, encoding marks can also store information. Therefore, encoding marks are used in the field of visual measurement. Attaching the encoding marks to the surface of the object to be measured gradually solves a series of practical production problems such as higher difficulty in matching and extracting feature points. With the rapid development of visual measurement technology, encoding marks have gradually played a crucial role in the field of visual measurement. However, the existing encoding marks also have undeniable disadvantages: since the current encoding marks are mostly in shapes such as circular, round, and fan-shaped to meet the measurement requirements, these encoding marks will have problems such as pattern deformation at different shooting angles, which will further affect the measurement accuracy. In addition, their information-carrying capacity, that is, the encoding capacity, is small and cannot meet the measurement scenarios that require a large number of encoding marks. Summary of the Invention
[0004] The present invention aims to overcome the defects of existing encoding marks and proposes an encoding mark with variable encoding capacity for visual positioning and an encoding method, which helps to achieve rapid matching and high-precision extraction of feature points of the object to be measured in visual measurement. At the same time, the encoding mark proposed by the present invention has the characteristic of variable encoding capacity and has a large encoding capacity, which is applicable to various measurement scenarios.
[0005] To achieve the above effects, the technical solution adopted by the present invention is as follows:
[0006] There is provided an encoding mark with variable encoding capacity for visual positioning, including a background with a rectangular contour, on which an encoding unit, a positioning unit, and an encoding capacity change storage unit are respectively arranged;
[0007] The positioning unit is used to determine the specific position information of the coding unit, including a positioning circle located on the background and a positioning ring located outside the positioning circle and concentric with the positioning circle. A direction ring and three area dividing circles are arranged inside the positioning ring, and the line connecting the centers of the direction ring and the positioning circle is parallel to a certain side line of the background;
[0008] The coding unit is used to encode the coding mark and uniquely name the four vertices of the background of the coding mark, including an inner coding area and an outer coding area. The inner coding area includes an inner coding area closed ring located between the positioning circle and the positioning ring, and X coding feature circles with the same contour arranged inside the inner coding area closed ring. The outer coding area includes an outer coding area closed ring located outside the positioning ring, and Y coding feature circles with the same contour arranged inside the outer coding area closed ring, where X and Y are both positive integers;
[0009] The coding capacity change storage unit is used to implement the function of variable coding capacity of the coding mark, including K coding capacity change storage circles located outside the outer coding area closed ring. The centers of the respective coding capacity change storage circles are located on the same straight line, this straight line is perpendicular to the line connecting the centers of the direction ring and the positioning circle, and is located on the side of the positioning circle away from the direction ring, where K is a non-negative integer.
[0010] Further, the centers of the inner coding area coding feature circles are evenly distributed on the midline of the inner coding area closed ring, and there is no overlap or connection between the respective inner coding area coding feature circles.
[0011] Further, the centers of the outer coding area coding feature circles are evenly distributed on the midline of the outer coding area closed ring, and there is no overlap or connection between the respective outer coding area coding feature circles.
[0012] Further, the centers of the direction ring and the area dividing circles are evenly distributed on the midline of the positioning ring, and there is no overlap or connection between the direction ring and the area dividing circles, and between the area dividing circles.
[0013] Further, the adjacent two coding capacity change storage circles are equally spaced, and there is no overlap or connection between the respective coding capacity change storage circles.
[0014] Further, the color of the background is C1;
[0015] The color of the inner coding area closed ring is C2, and the color of the inner coding area coding feature circles is C3 or C9, and there are obvious color differences between C2, C3 and C9;
[0016] The color of the closed circle of the outer coding region is C4, and the color of the coding characteristic circle of the outer coding region is C5 or C 10 , C4, C5 and C 10 There are obvious color differences between them;
[0017] The color of the positioning ring is C6, and the color of the area dividing circle is C7. There is a clear color difference between C6 and C7;
[0018] The color of the positioning circle is C8, and there are obvious differences between C8 and C2, between C2 and C6, between C6 and C4, and between C1 and C4.
[0019] Furthermore, the center of the positioning circle is located at the center of the background, and the centers of the positioning circle, the inner coding region closed ring, the positioning ring and the outer coding region closed ring coincide with each other and are adjacent to each other from the inside to the outside.
[0020] A coding method based on the coding mark with variable coding capacity for visual positioning is also provided, comprising the following steps:
[0021] Step 1: Record the number of codes N of the code mark R with variable coding capacity R The initial value is 0, and the center of the positioning circle O is determined in the coding mark R d With the center of the direction circle O r , to locate the center of the circle O d Establish a plane rectangular coordinate system XO for the coordinate origin d -Y, where the direction of the circle is O r On the negative half axis of the Y axis, determine the direction vector The positive half axis of the X axis is in the direction vector 90° counterclockwise;
[0022] Step 2: Through the plane rectangular coordinate system XO d -Y divides the coding mark R into four areas, which are in the plane rectangular coordinate system XO d -Y The regions of the four quadrants are respectively recorded as coding region R_I, coding region R_II, coding region R_III and coding region R_IV;
[0023] Step 3: The four vertices of the rectangular outline of the coding mark R are recorded as D according to the corresponding coding area. R_I 、D R_II 、D R_III and D R_IV ;
[0024] Step 4: The center of the area segmentation circle with the center on the positive half axis of the X axis is recorded as point O. xz, denote the center of the circle that divides the region with the center on the negative x-axis as point O xf , denote the center of the circle that divides the region with the center on the positive y-axis as point O yz , determine the vector
[0025] Step 5: In the order of coding region R_I, coding region R_II, coding region R_III, and coding region R_IV, successively record the cumulative value of the number of inner coding region coding feature circles appearing in each coding region as t γ , t γ is a positive integer, γ = 1, 2, 3, 4;
[0026] Connect the center O of the positioning circle d with the centers of each inner coding region coding feature circle successively to form coding vectors where i = 1, 2, 3…t γ , ζ = I, II, III, IV;
[0027] Calculate the coding angle between each coding vector and the quadrant direction vector
[0028]
[0029] where, when ζ = I, γ = 1, and the quadrant direction vector takes the vector
[0030] when ζ = II, γ = 2, and the quadrant direction vector takes the vector
[0031] when ζ = III, γ = 3, and the quadrant direction vector takes the vector
[0032] when ζ = IV, γ = 4, and the quadrant direction vector takes the vector
[0033] Furthermore, re-record the centers of the inner coding region coding feature circles in coding region R_ζ in ascending order according to the calculated coding angle as Then define the coding units corresponding to each inner coding region coding feature circle reordered according to the coding angle in coding region R_ζ as Furthermore, according to the display status of the coding feature circles in the corresponding internal coding area, determine that the corresponding coding feature values are respectively wherein takes the value of 0 or 1, and i = 1, 2, 3... t γ ;
[0034] Then, perform counting according to the binary method, and the number of internal coding area encodings in the coding area R_ζ can be obtained as:
[0035]
[0036] wherein:
[0037] Step 6. On the basis of the cumulative value t γ of the number of coding feature circles in the internal coding area, in the order of coding area R_I, coding area R_II, coding area R_III, and coding area R_IV, successively record the number of coding feature circles in the external coding area and the cumulative value t τ of the number of coding feature circles in the internal coding area that appear in each coding area. t τ is a positive integer, τ = 5, 6, 7, 8;
[0038] Connect the center O d of the positioning circle with the centers of the coding feature circles in each internal coding area respectively, and successively form coding vectors wherein, j = t γ , t γ +1... t τ , ζ = I, II, III, IV;
[0039] Calculate the coding angle between each coding vector and the quadrant direction vector
[0040]
[0041] wherein, when ζ = I, τ = 5, and the quadrant direction vector takes the vector
[0042] When ζ = II, τ = 6, and the quadrant direction vector takes the vector
[0043] When ζ = III, τ = 7, and the quadrant direction vector takes the vector
[0044] When ζ = IV, τ = 8, and the quadrant direction vector Take the vector
[0045] Furthermore, the center of the outer coding region coding feature circle in the coding region R_ζ is reordered according to the calculated coding angle from small to large and recorded as After that, define the coding units corresponding to the inner coding region coding feature circles reordered according to the coding angle in the coding region R_ζ as 2 respectively tγ 、 Furthermore, determine the corresponding coding feature values as where takes the value of 0 or 1, j = t γ , t γ +1…t τ ;
[0046] Then, perform counting according to the binary method, and the number of outer coding regions in the coding region R_ζ can be obtained as:
[0047]
[0048] where:
[0049] Then, the number of inner and outer coding regions of the coding flag R can be obtained as:
[0050]
[0051] Step 7: When the coding feature values corresponding to all coding feature circles are 1, set all coding feature values to 0, and at the same time generate a coding capacity change storage circle. Determine that the number of coding capacity change storage circles in the coding capacity change storage unit is S, and S is a non-negative integer. Then the number of codes stored in the coding capacity change storage unit is:
[0052]
[0053] Step 8: Then, from the above steps, the code corresponding to the coding flag R can be obtained as:
[0054] N R = N'+N''
[0055] Step 9: Furthermore, record the coding numbers of the four vertices D R_I 、D R_II 、D R_III and D R_IV of the rectangular contour of the coding flag R as N R _1, N R _2, N R _3 and N RIf it is _4, the unique encoding number of the encoded flag R and the unique encoding numbers of the four vertices of the rectangular contour of the encoded flag R are obtained.
[0056] A computer-readable storage medium is also provided, including a computer program for use in conjunction with an electronic device having image processing capabilities, and the computer program can be executed by a processor to perform the encoding method described above.
[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0058] 1. In the variable encoding capacity encoded flag proposed by the present invention, through the combined action of the inner and outer encoding regions and the encoding capacity change storage unit, the encoded pattern realizes the function of variable encoding capacity, making the encoding method more flexible and also expanding the actual application scenarios.
[0059] 2. In the variable encoding capacity encoded flag proposed by the present invention, the encoded pattern and the positioning pattern are simple and are easy to be realized through the extraction of real-time digital images and the decoding algorithm of real-time encoded flags in computer vision measurement, reducing the complexity of vision measurement and maintaining a high accuracy at the same time.
[0060] 3. In the variable encoding capacity encoded flag proposed by the present invention, the positions of the inner and outer encoding regions, encoding feature circles, positioning circles, direction rings, and region division circles in the encoded pattern are all distinguished by the methods of graphic geometric relationships and vector products, so it has strong robustness and also has a high accuracy for the image processing of affine changes.
[0061] 4. The variable encoding capacity encoded flag and its encoding method proposed by the present invention can realize the unique encoding of the encoded flag and its four vertices, which helps to realize the rapid matching and high-precision extraction of the feature points of the object to be measured in vision measurement, making it easier to realize the matching of the same-name vertices in the vision measurement process and completing the vision measurement efficiently and with high quality. Description of the Drawings
[0062] Figure 1 An encoded flag with variable encoding capacity where all encoding feature circles are black and contains one encoding capacity change storage circle;
[0063] Figure 2 A schematic diagram of the physical position arrangement of each encoded combination pattern in the variable encoding capacity encoded flag of the present invention;
[0064] Figure 3 A schematic diagram of the region division and encoding method in the variable encoding capacity encoded flag of the present invention;
[0065] Figure 4Schematic diagram of the division and coding method of the coding flag area with variable coding capacity in the embodiment;
[0066] Figure 5 Final schematic diagram of the coding flag with variable coding capacity numbered 493 in the embodiment. Detailed implementation manners
[0067] The following elaborates on the preferred embodiments of the present invention in conjunction with the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making the protection scope of the present invention more clearly defined.
[0068] Please refer to Figure 1 and Figure 2 , a coding flag with variable coding capacity for visual positioning, including a background with a rectangular contour, on which a coding unit, a positioning unit, and a coding capacity change storage unit are respectively arranged. In this embodiment, the length and width of the background are both 40 mm.
[0069] The positioning unit is used to determine the specific position information of the coding unit, including a positioning circle located on the background and a positioning ring located outside the positioning circle and concentric with the positioning circle. A direction ring and three area division circles are arranged inside the positioning ring, and the connection line between the center of the direction ring and the center of the positioning circle is parallel to a certain side line of the background. Preferably, the centers of the direction ring and the area division circles are evenly distributed on the center line of the positioning ring, and there is no overlap or connection between the direction ring and the area division circles, and between the area division circles. As Figure 2 shown in
[0070] The coding unit is used to encode coding flags and uniquely name the four vertices of the background of the coding flags, including an inner coding area and an outer coding area. The inner coding area includes an inner coding area closed ring located between the positioning circle and the positioning ring, and X (X is a positive integer) coding feature circles with the same contour arranged in the inner coding area closed ring. Preferably, the centers of the inner coding area coding feature circles are evenly distributed on the center line of the inner coding area closed ring, and there is no overlap or connection between the inner coding area coding feature circles. In this embodiment, the inner coding area closed ring is also concentric with the positioning circle, and the inner circumference of the inner coding area closed ring coincides with the circumference of the positioning circle, and the outer circumference of the inner coding area closed ring coincides with the inner circumference of the positioning ring, that is, the closed area between the positioning circle and the positioning ring forms the inner coding area closed ring. Therefore, the diameter of the inner circumference of the inner coding area closed ring is 3mm, and the diameter of the outer circumference is 13mm, as Figure 2 shown. The number of inner coding area coding feature circles is 4 (i.e., X = 4), the diameter of the inner coding area coding feature circles is 2mm, and among the 4 inner coding area coding feature circles, the central angle formed by the connection lines of the centers of any two adjacent inner coding area coding feature circles and the center of the inner coding area closed ring is 360° / X = 90°.
[0071] The outer coding area includes an outer coding area closed ring located outside the positioning ring, and Y (Y is a positive integer) coding feature circles with the same contour arranged in the outer coding area closed ring. Preferably, the centers of the outer coding area coding feature circles are evenly distributed on the center line of the outer coding area closed ring, and there is no overlap or connection between the outer coding area coding feature circles. In this embodiment, the outer coding area closed ring is also concentric with the positioning circle, and the inner circumference of the outer coding area closed ring coincides with the outer circumference of the positioning ring, that is, the closed area between the inner coding area closed ring and the outer coding area closed ring forms the positioning ring. Therefore, the diameter of the inner circumference of the outer coding area closed ring is 23mm, and the diameter of the outer circumference is 33mm. It forms a coding flag in which the centers of the positioning circle, the inner coding area closed ring, the positioning ring, and the outer coding area closed ring coincide and are adjacent and connected in sequence from the inside to the outside as shown in Figure 1 and Figure 2 shown. The number of outer coding area coding feature circles is also 4 (i.e., Y = 4), the diameter of the outer coding area coding feature circles is 2mm, and among the 4 outer coding area coding feature circles, the central angle formed by the connection lines of the centers of any two adjacent outer coding area coding feature circles and the center of the outer coding area closed ring is 360° / Y = 90°.
[0072] The encoding capacity variable storage unit is used to implement the function of variable encoding capacity for the encoding flag, including K (K is a non-negative integer) encoding capacity variable storage circles located outside the closed circular ring in the outer encoding area. Denote the centers of each encoding capacity variable storage circle as E i (i = 1, 2, 3...K); the first vertex of the encoding flag rectangle contour pointed to by rotating the vector from the center of the direction circular ring to the center of the positioning circular ring clockwise is recorded as the initial point P (such as Figure 3 the vertex corresponding to the upper right corner in the figure), and the first vertex of the encoding flag rectangle contour pointed to by rotating counterclockwise is recorded as the end point Q (such as Figure 3 the vertex corresponding to the upper left corner in the figure). The centers of each encoding capacity variable storage circle are evenly distributed and located on the same straight line. The starting encoding capacity variable storage circle on the straight line starts from near point P and arranges towards point Q. This straight line is perpendicular to the line connecting the center of the direction circular ring and the center of the positioning circular ring, parallel to the line formed by connecting the initial point P and the end point Q, and is located on the side of the positioning circle far from the direction circular ring (the direction circular ring is located below the positioning circle, so each encoding capacity variable storage circle is located above the positioning circle), and is located between the outer circumference of the closed circular ring in the outer encoding area and the boundary of the encoding flag rectangle contour. The adjacent two encoding capacity variable storage circles are equally spaced, and there is no overlap or connection between each encoding capacity variable storage circle. In this embodiment, the diameter of the encoding capacity variable storage circle is 1.5 mm, and the distance from the center to the two nearest sides of the encoding flag rectangle contour is 2 mm each.
[0073] Such as Figure 1 and Figure 2 shown, in this embodiment, the color of the background is black, the color of the positioning circle is black, the color of the closed circular ring in the inner encoding area is white, the color of the positioning circular ring is black, the color of the closed circular ring in the outer encoding area is white. Therefore, a continuous nested ring structure with black and white alternating and distinct boundaries can be formed from the inside out, and obvious color differences are formed in the adjacent areas. The colors of the area dividing circle and the direction circular ring are both white, so obvious color differences can be formed with the black color of the positioning circular ring. The encoding capacity variable storage circle is white, so obvious color differences can be formed with the black color of the background. The encoding feature circles in the inner encoding area and the outer encoding area can be black or white according to whether they are displayed on the corresponding numbered encoding flag, that is, when the encoding feature circle in the inner encoding area is white, it appears as a non-display state because its color is the same as the color of the closed circular ring in the inner encoding area. When the encoding feature circle in the inner encoding area is black, it appears as a display state because its color has an obvious difference from the color of the closed circular ring in the inner encoding area; the display state of the encoding feature circle in the outer encoding area is similar to that of the encoding feature circle in the inner encoding area. Therefore, different encoding flags can be formed through the combination of different display states of the encoding feature circles in the outer encoding area and the inner encoding area, and the different numbers of encoding capacity variable storage circles.
[0074] Please refer to Figure 5 , which shows the design of the variable coding capacity coding flag R with a coding number of 493. Taking this coding flag as an example, the coding method of the variable coding capacity coding flag for visual positioning of the present invention will be described below. This method includes the following steps:
[0075] Step 1: Denote the coding number N of the variable coding capacity coding flag R R with an initial value of 0, and determine the center O of the positioning circle in the coding flag R d and the center O of the direction ring r . Taking the center O of the positioning circle d as the origin of coordinates, establish a plane rectangular coordinate system X - O d -Y, where the center O of the direction ring r is on the negative half-axis of the Y-axis, and determine the direction vector such that the positive half-axis of the X-axis is at 90° counterclockwise from the direction vector , as shown in Figure 3 ;
[0076] Step 2: Divide the coding flag R into four regions through the plane rectangular coordinate system X - O d -Y. The regions in the four quadrants of the plane rectangular coordinate system X - O d -Y are respectively denoted as coding region R_I, coding region R_II, coding region R_III, and coding region R_IV; as shown in Figure 3 , in this embodiment, each of the coding region R_I, coding region R_II, coding region R_III, and coding region R_IV contains 1 inner coding region coding feature circle and 1 outer coding region coding feature circle. Therefore, the total number of coding feature circles is 8.
[0077] Step 3: Denote the four vertices of the rectangular contour of the coding flag R as D R_I , D R_II , D R_III , and D R_IV according to the corresponding coding regions they are in;
[0078] Step 4: Denote the center of the region dividing circle with its center on the positive half-axis of the X-axis as point O xz , denote the center of the region dividing circle with its center on the negative half-axis of the X-axis as point O xf , denote the center of the region dividing circle with its center on the positive half-axis of the Y-axis as point O yz , and determine the vector
[0079] Step 5. In the coding region R_I, record the number of inner coding region coding feature circles appearing in this coding region as t1, where t1 is a positive integer. In this embodiment, there is only 1 inner coding region coding feature circle in the coding region R_I. Therefore, t1 = 1, and the quadrant direction vector Take the vector That is, the positive direction of the X-axis.
[0080] Connect the center O of the positioning circle d to the center of the inner coding region coding feature circle in this coding region respectively to form a coding direction Then the coding angle The calculation result is:
[0081]
[0082] Since there is only 1 inner coding region coding feature circle in the coding region R_I, there is no need to reorder the inner coding region coding feature circles in this coding region according to the size of the calculated coding angle. Define the coding units corresponding to the inner coding region coding feature circles in the coding region R_I as As Figure 5 shown, the inner coding region coding feature circle is black, with an obvious color difference from the white of the inner coding region closed ring, which is the display state. Therefore, determine the corresponding coding feature value as
[0083] Then, according to the binary method for counting, the inner coding region coding number in the coding region R_I can be obtained as:
[0084]
[0085] Where:
[0086] Similarly, in the coding region R_II, the coding region R_III, and the coding region R_IV, record the cumulative values of the number of inner coding region coding feature circles appearing in each coding region as t2, t3, and t4 in sequence. t2, t3, and t4 are all positive integers. In this embodiment, since the number of inner coding region coding feature circles in the coding region R_II, the coding region R_III, and the coding region R_IV is 1 each, there is no need to reorder the inner coding region coding feature circles in the corresponding coding regions according to the size of the calculated coding angle, and t2 = t1 + 1 = 2, t3 = t2 + 1 = 3, t4 = t3 + 1 = 4.
[0087] Define the coding units corresponding to the inner coding region coding feature circles in the coding region R_II, the coding region R_III, and the coding region R_IV as and AsFigure 5 As shown, the inner coding region coding feature circles in coding region R_II, coding region R_III, and coding region R_IV are white, black, and black respectively. Therefore, the inner coding region coding feature circle in coding region R_II is in a non-display state, and the inner coding region coding feature circles in R_III and coding region R_IV are both in a display state. Thus, the corresponding coding feature value is determined to be
[0088] Similarly, by counting according to the binary method, the inner coding region coding numbers in coding region R_II, coding region R_III, and coding region R_IV can be obtained as follows:
[0089]
[0090] Where:
[0091] Step 6. Based on the cumulative value t γ = 4 of the number of inner coding region coding feature circles, in the order of coding region R_I, coding region R_II, coding region R_III, and coding region R_IV, record the number of outer coding region coding feature circles and the cumulative value t5, t6, t7, t8 of the number of inner coding region coding feature circles that appear in each coding region in sequence. t5, t6, t7, t8 are all positive integers. In this embodiment, since the number of outer coding region coding feature circles in coding region R_I, coding region R_II, coding region R_III, and coding region R_IV is 1 each, there is no need to reorder the outer coding region coding feature circles in the corresponding coding region according to the calculated coding angle size, and t5 = t4 + 1 = 5, t6 = t5 + 1 = 6, t7 = t6 + 1 = 7, t8 = t7 + 1 = 8.
[0092] Define the coding units corresponding to the outer coding region coding feature circles in coding region R_I, coding region R_II, coding region R_III, and coding region R_IV as and As Figure 5 shown, the outer coding region coding feature circles in coding region R_I, coding region R_II, coding region R_III, and coding region R_IV are white, black, black, and black respectively. Therefore, the outer coding region coding feature circle in coding region R_I is in a non-display state, and the outer coding region coding feature circles in coding region R_II, R_III, and coding region R_IV are all in a display state. Thus, the corresponding coding feature value is determined to be
[0093] Similarly, when counting according to the binary method, the number of outer coding region codes in coding region R_I, coding region R_II, coding region R_III, and coding region R_IV can be obtained as follows:
[0094]
[0095]
[0096] Among them:
[0097]
[0098] Then all coding units of coding flag R can be obtained as (2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 ), and all coding eigenvalue of coding flag R is (1 0 1 1 0 1 1 1) T , and the number of inner and outer coding region codes of coding flag R is:
[0099]
[0100] Step 7: When all coding eigenvalue corresponding to coding eigenvalue circles are 1, set all coding eigenvalue to 0, and at the same time generate a coding capacity change storage circle. In this embodiment, it is determined that the number of coding capacity change storage circles in the coding capacity change storage unit is 1, then the number of codes stored in the coding capacity change storage unit is:
[0101]
[0102] Step 8: Then from the above steps, the number of codes corresponding to coding flag R can be obtained as:
[0103] N R = N'+N'' = 493
[0104] Step 9: Further, the coding numbers of the four vertices D R_I , D R_II , D R_III and D R_IV of the rectangular contour of coding flag R are respectively recorded as 493_1, 493_2, 493_3, and 493_4, then the coding flag R with the number of codes 493 and the unique coding numbers of the four vertices of the rectangular contour of coding flag R are obtained, as shown in Figure 4 .
[0105] In addition, for the encoding method of the encoding mark with variable encoding capacity for visual positioning provided by the present invention, a corresponding computer program needs to be compiled and the program needs to be executed on a computer to implement the corresponding arithmetic processing and logical control functions. Therefore, the present invention also provides a computer-readable storage medium, including a computer program for use in combination with an electronic device having an image processing function, and the computer program can be executed by a processor to perform the encoding method described above.
[0106] The above are only embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be included in the patent protection scope of the present invention by the same token.
Claims
1. A coding mark with variable coding capacity for visual positioning, characterized in that: It includes a background with a rectangular outline, on which an encoding unit, a positioning unit, and an encoding capacity change storage unit are respectively arranged; The positioning unit is used to determine the specific position information of the encoding unit, including a positioning circle located on the background and a positioning ring located outside the positioning circle and concentric with the positioning circle. A direction ring and three area dividing circles are arranged inside the positioning ring, and the connection line between the center of the direction ring and the center of the positioning circle is parallel to a certain side line of the background; The encoding unit is used to encode the encoding mark and uniquely name the four vertices of the background of the encoding mark, including an inner encoding area and an outer encoding area. The inner encoding area includes an inner encoding area closed ring located between the positioning circle and the positioning ring, and X encoding feature circles with the same outline arranged inside the inner encoding area closed ring. The outer encoding area includes an outer encoding area closed ring located outside the positioning ring, and Y encoding feature circles with the same outline arranged inside the outer encoding area closed ring, where X and Y are both positive integers; The encoding capacity change storage unit is used to realize the function of variable encoding capacity of the encoding mark, including K encoding capacity change storage circles located outside the outer encoding area closed ring. The centers of the encoding capacity change storage circles are located on the same straight line, and this straight line is perpendicular to the connection line between the center of the direction ring and the center of the positioning circle, and is located on the side of the positioning circle far from the direction ring, where K is a non-negative integer.
2. The coding mark with variable coding capacity for visual positioning according to claim 1, characterized in that: The centers of the inner encoding area encoding feature circles are evenly distributed on the midline of the inner encoding area closed ring, and there is no overlap or connection between the inner encoding area encoding feature circles; 3. The coded mark with variable coding capacity for visual positioning according to claim 1, wherein: The centers of the outer encoding area encoding feature circles are evenly distributed on the midline of the outer encoding area closed ring, and there is no overlap or connection between the outer encoding area encoding feature circles; 4. A coding mark with variable coding capacity for visual positioning according to claim 1, characterized in that: The centers of the direction ring and the area dividing circles are evenly distributed on the midline of the positioning ring, and there is no overlap or connection between the direction ring and the area dividing circles, and between the area dividing circles; 5. A coding mark with variable coding capacity for visual positioning according to claim 1, characterized in that: The adjacent two encoding capacity change storage circles are equally spaced, and there is no overlap or connection between the encoding capacity change storage circles; 6. A coding flag with variable coding capacity for visual positioning according to claim 1, characterized in that: The color of the background is C1; The color of the inner encoding area closed ring is C2, and the color of the inner encoding area encoding feature circles is C3 or C9, and there are obvious color differences between C2, C3, and C9; The color of the closed ring of the outer coding region is C4, and the color of the coding feature circle of the outer coding region is C5 or C 10 , C4, C5 and C 10 have obvious color differences from each other; The color of the positioning ring is C6, and the color of the area dividing circles is C7, and there is an obvious color difference between C6 and C7; The color of the positioning circle is C8, and there are obvious differences between C8 and C2, C2 and C6, C6 and C4, and C1 and C4; 7. A coding mark with variable coding capacity for visual positioning according to any one of claims 1 to 6, characterized in that: The center of the positioning circle is located at the center of the background. The centers of the positioning circle, the inner encoding area closed ring, the positioning ring, and the outer encoding area closed ring coincide and are adjacent and connected in sequence from the inside out; 8. A coding method for a coding mark with variable coding capacity for visual positioning according to any one of claims 1 to 7, characterized in that: It includes the following steps: Step 1. Record the number of encodings N of the encoding flag R with variable encoding capacity R The initial value is 0. Determine the center O of the positioning circle in the encoding flag R d and the center O of the direction ring r . With the center O of the positioning circle d as the origin of coordinates, establish a plane rectangular coordinate system X - O d -Y, where the center O of the direction ring r is on the negative half-axis of the Y-axis. Determine the direction vector The positive half-axis of the X-axis is at 90° counterclockwise from the direction vector ; Step 2: Divide the coding flag R into four regions through the rectangular coordinate system X - O d -Y. The regions in the four quadrants of the rectangular coordinate system X - O d -Y are respectively denoted as coding region R_I, coding region R_II, coding region R_III, and coding region R_IV; Step 3: Denote the four vertices of the rectangular contour of the coding flag R as D R_I , D R_II , D R_III and D R_IV ; Step 4: Denote the center of the circle that divides the region with the center on the positive x-axis as point O xz , denote the center of the circle that divides the region with the center on the negative x-axis as point O xf , denote the center of the circle that divides the region with the center on the positive y-axis as point O yz , and determine the vector Step 5: In the order of coding region R_I, coding region R_II, coding region R_III, and coding region R_IV, record the cumulative value of the number of coded feature circles in the inner coding region that appear in each coding region as t γ , t γ is a positive integer, γ = 1, 2, 3, 4; The center O of the positioning circle d is respectively connected to the centers of the coding feature circles of each inner coding region to successively form coding directions where i = 1, 2, 3... t γ , ζ = I, II, III, IV; Calculate each encoded vector according to the following formula and the quadrant direction vector of the encoded angle Among them, when ζ = I, γ = 1, the quadrant direction vector Take the vector When ζ = II, γ = 2, quadrant direction vector Take the vector When ζ = III, γ = 3, quadrant direction vector Take the vector When ζ = IV, γ = 4, quadrant direction vector Take the vector Furthermore, the center of the encoding feature circle of the inner encoding region in the encoding region R_ζ is reordered from smallest to largest according to the calculated encoding angle and is re - denoted as After that, it is defined that the encoding units corresponding to the encoding feature circles of each inner encoding region reordered according to the encoding angle in the encoding region R_ζ are respectively 2 0 , 2 1 , 2 2 … Furthermore, the corresponding encoding feature values are determined according to the display status of the encoding feature circles of the corresponding inner encoding regions, which are respectively wherein takes values of 0 or 1, and i = 1, 2, 3…t γ ; Then, by counting according to the binary method, the number of inner encoding area encodings in the encoding area R_ζ can be obtained as: Wherein: Step 6. Accumulate the number t of characteristic circles encoded in the inner encoding region γ On the basis of γ , in the order of encoding region R_I, encoding region R_II, encoding region R_III, and encoding region R_IV, sequentially record the number of outer encoding region characteristic circles and the accumulated value t of the number of inner encoding region characteristic circles that appear in each encoding region τ , t τ where t is a positive integer, and τ = 5, 6, 7, 8; The center O of the positioning circle d is respectively connected to the centers of the coding feature circles of each inner coding region to successively form coding vectors where j = t γ , t γ +1…t τ , ζ = I, II, III, IV; Calculate each coding vector according to the following formula and the quadrant direction vector of the coding angle Among them, when ζ = I, τ = 5, and the quadrant direction vector Take the vector When ζ = II, τ = 6, quadrant direction vector Take the vector When ζ = III, τ = 7, quadrant direction vector Take the vector When ζ = IV, τ = 8, quadrant direction vector Take the vector Furthermore, the centers of the outer coding region coding feature circles in the coding region R_ζ are reordered from smallest to largest according to the calculated coding angle and are re - denoted as After that, define that the coding units corresponding to the respective inner coding region coding feature circles reordered according to the coding angle in the coding region R_ζ are respectively Furthermore, determine that the corresponding coding feature values are respectively according to the display status of the corresponding outer coding region coding feature circles wherein takes a value of 0 or 1, j = t γ , t γ +1…t τ ; Then, by counting according to the binary method, the number of outer encoding area encodings in the encoding area R_ζ can be obtained as: Wherein: Then, the number of encodings in the inner and outer encoding regions of the encoding flag R can be obtained as follows: Step 7: When the encoding feature values corresponding to all encoding feature circles are 1, set all encoding feature values to 0. Meanwhile, generate an encoding capacity change storage circle, and determine that the number of encoding capacity change storage circles in the encoding capacity change storage unit is S, where S is a non-negative integer. Then, the number of encodings stored in the encoding capacity change storage unit is: Step 8: Then, from the above steps, the number of encodings corresponding to the encoding flag R can be obtained as: N R = N'+ N'' Step 9. Further, the encoding numbers of the four vertices D R_I , D R_II , D R_III and D R_IV of the rectangular contour of the encoding mark R are respectively denoted as N R _1, N R _2, N R _3 and N R _4, thus obtaining the unique encoding number of the encoding mark R and the unique encoding numbers of the four vertices of the rectangular contour of the encoding mark R.
9. A computer-readable storage medium, including a computer program for use in conjunction with an electronic device having image processing capabilities, the computer program being executable by a processor to perform the encoding method as claimed in claim 8.
Citation Information
Patent Citations
Parallelogram coded mark based on graphic geometrical relationship and coding method thereof
CN113188524A
Capacitive sensor for absolute angular displacement measurement
WO2018120335A1