AprilTag code arrangement and identification method suitable for different camera view angles

文档序号:1954811 发布日期:2021-12-10 浏览:22次 中文

阅读说明:本技术 一种适合不同相机视角的AprilTag码的布置和识别方法 (AprilTag code arrangement and identification method suitable for different camera view angles ) 是由 蔡鹏� 朱莉凯 李笑瑜 马义超 赵吉庆 杨文杰 于 2021-09-15 设计创作,主要内容包括:本发明公开了一种适合不同相机视角的AprilTag码的布置和识别方法,该适合不同相机视角的AprilTag码的布置方法,具体包括原始AprilTag码编码、获得缩小AprilTag码、重组AprilTag码和复合AprilTag码。本发明中,在AprilTag码中间部分设置更小的AprilTag码,原来AprilTag码中间部分的码元被移到四个角落,中间左上角的码元和原来AprilTag码形成八边形,中间和外部区域共增加5个面积更小的AprilTag码;当视角远时,识别八边形区域所对应的AprilTag码,当视角近时,识别原来AprilTag码中间和外部四周的5个区域中某个AprilTag码,适应远近不同相机视角的AprilTag码识别任务,便于识别和使用。(The invention discloses an April Tag code arrangement and identification method suitable for different camera view angles, and the April Tag code arrangement method suitable for different camera view angles specifically comprises the steps of encoding an original April Tag code, obtaining a reduced April Tag code, recombining the April Tag code and a composite April Tag code. In the invention, a smaller April tag code is arranged in the middle part of the April tag code, the code element of the middle part of the original April tag code is moved to four corners, the code element of the middle upper left corner and the original April tag code form an octagon, and 5 April tag codes with smaller areas are added in the middle and the outer area; when the visual angle is far, certain April Tag codes in 5 areas in the middle and the periphery outside the original April Tag codes are identified, so that the April Tag code identification task is adapted to April Tag code identification tasks of different camera visual angles at far and near positions, and the April Tag codes are convenient to identify and use.)

1. An arrangement method of AprilTag codes suitable for different camera view angles is characterized by specifically comprising the following steps of:

s11, encoding the original April Tag code to obtain an original April Tag code, marking four vertexes of the original April Tag code, and numbering code elements in the original April Tag code in sequence from left to right and from top to bottom;

s12, obtaining a reduced April tag code, obtaining five original April tag codes of different coding types, reducing the sizes of the original April tag codes of the five different coding types in equal proportion, and obtaining the reduced April tag codes of the five different coding types;

s13, recombining April Tag codes, wherein in the original April Tag codes, four code elements positioned in the middlemost part are respectively moved to four vertex parts of the original April Tag codes according to the corresponding positions, one moved code element is kept to be connected with the vertex of the original April Tag codes to form an octagon, and a reduced April Tag code is filled in the four code element parts in the middlemost part to obtain the recombined April Tag codes;

s14, and filling another four reduced April Tag codes with different coding types in the upper, lower, left and right directions of the obtained recombined original April Tag code to obtain the composite April Tag code.

2. The method of claim 1, wherein the AprilTag codes for different camera views are arranged in a manner that: in the steps S11 and S12, the original aprilat codes are respectively set to aprilat codes of Tag36h 11.

3. The method of claim 1, wherein the AprilTag codes for different camera views are arranged in a manner that: in step S11, the specific encoding manner of the original aprilat code is as follows: the top left, bottom right and top right vertices of the original aprilat code are labeled O, B, C, D, all the symbols are numbered from 1 to 36 in the order from left to right and from top to bottom, the symbols at the top left, top right, bottom left and bottom right corners are numbered 1, 6, 31, 36, respectively, and the symbols at the top left, top right, bottom left and bottom right corners of the four symbols at the middle are numbered 15, 16, 21, 22, respectively.

4. The method of claim 3, wherein the AprilTag codes for different camera views are arranged in a way that: in step S13, the specific manner of reconstructing aprilat codes is as follows: the code element 15 at the upper left corner of the middle area of the original AprilTag code is moved to the upper left of the vertex O, the original area of the code element 15 is white, the lower right vertex of the code element 15 is superposed with the upper left vertex O of the original AprilTag code, points A and E are respectively taken on line segments OB and OD, a point G, H, F is taken outside a quadrilateral OBCD, a point G, H, A, O, E, F is sequentially the vertex of a polygon GHAOEF, a new area of the code element 15 is inside the polygon GHAOEF, line segments GH, EF and FG are shorter than line segments AB and ED, and a point G, H, A, B, C, D, E, F is sequentially the vertex of the octagon GHABCDEF; the symbols 21, 22, 16 of the original aprilat code are shifted to the lower left, lower right, and upper right of the vertex B, C, D of the octagon GHABCDEF, respectively, the original areas of the middle four symbols 15, 21, 22, 16 are all white, the octagon GHABCDEF includes 33 symbols other than the symbols 21, 22, 16, and one reduced aprilat code is filled in the original positions of the four symbols 15, 21, 22, 16.

5. The method of claim 1, wherein the AprilTag codes for different camera views are arranged in a manner that: in step S14, the composite aprilat code includes an original aprilat code and five reduced aprilat codes of different encoding types, and the composite aprilat code includes six aprilat codes in total.

6. An aprilat code recognition method suitable for different camera view angles is characterized by comprising the following steps:

s21, detecting the octagon, judging the concavity and convexity of eight vertexes of the octagon according to the rule that the white pixels in the neighborhood of the convex vertex are more and the black pixels in the neighborhood of the concave vertex are more, if the concavity and convexity of the eight vertexes are convex, concave, convex, concave and convex in sequence, entering the next step, and if the concavity and convexity of the eight vertexes are convex, concave, convex, concave and convex in sequence, continuing to check the next octagon, and if all the octagons are detected completely, and the concavity and convexity in sequence of convex, concave, convex, concave and convex are not found, switching to the near-viewing-angle detection mode of the camera;

s22, taking the connecting line of two concave vertexes of the octagon in the step S21 as a boundary line, enabling the sum of the lengths of the sides formed by the three convex vertexes and the two concave vertexes on one side to be l1, enabling the sum of the lengths of the sides formed by the three convex vertexes and the two concave vertexes on the other side to be l2, entering the next step if the ratio of the minimum value of l1 and l2 to the maximum value of l1 and l2 is less than 0.5, otherwise, continuously checking the next octagon, finishing detection of all octagons, and switching to a camera view angle near detection mode if the ratio of the minimum value of l1 and l2 to the maximum value of l1 and l2 is not found to be less than 0.5;

s23, taking the length of the side and the three convex vertexes at the large side in the step S22 as three vertexes of an April Tag code to be detected, selecting two nonadjacent convex vertexes of an octagon, connecting a concave vertex adjacent to one convex vertex to obtain a first line segment, connecting another concave vertex adjacent to another convex vertex to obtain a second line segment, obtaining another vertex of the April Tag code by the intersection point of the extension lines of the first line segment and the second line segment, replacing the values of the original four code elements in the middle of the April Tag code by the code element values of the vertexes in the corresponding direction, calculating the other 32 code elements of the April Tag code according to the original method, and finally calculating to obtain the code value of the April Tag code corresponding to the octagon;

s24, in the camera view angle close detection mode, a quadrangle is detected, and the code value of AprilTag code of any one of the 5 areas in the middle and the periphery of the octagon of step S22 is determined according to AprilTag code detection and calculation.

7. The method of claim 6, wherein the AprilTag code is adapted to different camera views: in the step 23, the specific detection method is that the length of the side and the three large convex vertices on one side in the step S22 are used as three vertices B, C, D of the aprilat code to be detected, B and D are two nonadjacent convex vertices of the octagon, the concave vertex a is adjacent to the convex vertex B, the concave vertex E is adjacent to the convex vertex D, another vertex O of the aprilat code is obtained from the intersection of the line segments AB and ED, the values of the original four symbols in the aprilat code are replaced by the symbol values of the upper left vertex O, the lower left vertex B, the lower right vertex C, and the upper right vertex D in the corresponding direction, the other 32 symbols of the aprilat code are calculated according to the original method, and finally, the code value of the aprilat code corresponding to the octagon is obtained by calculation.

8. The method of claim 6, wherein the AprilTag code is adapted to different camera views: in step S24, the aprilat code detection and calculation specifically includes: the aprilat code is detected and calculated in an encoding manner of Tag36h 11.

Technical Field

The invention relates to the technical field of computer vision positioning, in particular to an arrangement and identification method of AprilTag codes suitable for different camera view angles.

Background

Aprilat is a visual reference library and is widely used in the fields of AR, robots and camera calibration. By means of specific markers (similar to two-dimensional codes, but with reduced complexity to meet real-time requirements), it is possible to detect the markers quickly and calculate the relative position.

Aprilatag content consists essentially of three parts: the first part is how to detect various edges in the image from the gradients; the second part is how to find out the needed quadrilateral pattern in the edge image and screen the quadrilateral pattern, AprilTag detects the detected edge as much as possible, firstly eliminates the non-linear edge, searches the adjacent edge on the linear edge, and finally detects a quadrilateral if a closed loop is formed; the third part is how to perform two-dimensional code encoding and two-dimensional code decoding, the encoding modes are generally divided into three types, namely Tag36h11, Tag25h9 and Tag16h5, one encoded code element corresponds to one color block, the lengths of the color blocks on the outermost black edge of the three encoding modes are respectively 8, 7 and 6 color block lengths, and the total numbers of the color blocks corresponding to all the code elements of the three encoding modes are respectively 66, 55 and 44; for decoding content, generating a point array in a detected quadrangle for calculating the value of each color block, constructing a simple classifier according to a Local Binary pattern (Local Binary Patterns) to classify the color blocks in the quadrangle, coding a positive color block into 1, coding a negative color block into 0, obtaining the code of the two-dimensional code, matching the obtained code with the code in a known library, and determining whether the decoded two-dimensional code is correct.

However, the conventional aprilat code technology is difficult to adapt to aprilat code recognition tasks of different camera viewing angles, and influences recognition and use.

Disclosure of Invention

Technical problem to be solved

The invention can solve the problem that the conventional AprilTag code technology is difficult to adapt to AprilTag code identification tasks of different camera view angles, and influences identification and use.

(II) technical scheme

In order to achieve the above object, in a first aspect, the present invention adopts the following technical solutions, and an arrangement method of aprilatag codes suitable for different camera view angles specifically includes the following steps:

s11, encoding the original April Tag code to obtain an original April Tag code, marking four vertexes of the original April Tag code, and numbering code elements in the original April Tag code in sequence from left to right and from top to bottom;

s12, obtaining a reduced April tag code, obtaining five original April tag codes of different coding types, reducing the sizes of the original April tag codes of the five different coding types in equal proportion, and obtaining the reduced April tag codes of the five different coding types;

s13, recombining April Tag codes, wherein in the original April Tag codes, four code elements positioned in the middlemost part are respectively moved to four vertex parts of the original April Tag codes according to the corresponding positions, one moved code element is kept to be connected with the vertex of the original April Tag codes to form an octagon, and a reduced April Tag code is filled in the four code element parts in the middlemost part to obtain the recombined April Tag codes;

s14, and filling another four reduced April Tag codes with different coding types in the upper, lower, left and right directions of the obtained recombined original April Tag code to obtain the composite April Tag code.

As a preferred embodiment of the present invention, in the steps S11 and S12, the original aprilat codes are respectively set as aprilat codes of Tag36h 11.

As a preferred technical solution of the present invention, in step S11, the specific manner of encoding the original AprilTag code is as follows: the top left, bottom right and top right vertices of the original aprilat code are labeled O, B, C, D, all the symbols are numbered from 1 to 36 in the order from left to right and from top to bottom, the symbols at the top left, top right, bottom left and bottom right corners are numbered 1, 6, 31, 36, respectively, and the symbols at the top left, top right, bottom left and bottom right corners of the four symbols at the middle are numbered 15, 16, 21, 22, respectively.

As a preferred technical solution of the present invention, in the step S13, the AprilTag code is recombined in a specific manner: the code element 15 at the upper left corner of the middle area of the original AprilTag code is moved to the upper left of the vertex O, the original area of the code element 15 is white, the lower right vertex of the code element 15 is superposed with the upper left vertex O of the original AprilTag code, points A and E are respectively taken on line segments OB and OD, a point G, H, F is taken outside a quadrilateral OBCD, a point G, H, A, O, E, F is sequentially the vertex of a polygon GHAOEF, a new area of the code element 15 is inside the polygon GHAOEF, line segments GH, EF and FG are shorter than line segments AB and ED, and a point G, H, A, B, C, D, E, F is sequentially the vertex of the octagon GHABCDEF; the symbols 21, 22, 16 of the original aprilat code are shifted to the lower left, lower right, and upper right of the vertex B, C, D of the octagon GHABCDEF, respectively, the original areas of the middle four symbols 15, 21, 22, 16 are all white, the octagon GHABCDEF includes 33 symbols other than the symbols 21, 22, 16, and one reduced aprilat code is filled in the original positions of the four symbols 15, 21, 22, 16.

As a preferred embodiment of the present invention, in step S14, the composite aprilat code includes an original aprilat code and five reduced aprilat codes of different encoding types, and the total aprilat code includes six aprilat codes.

In a second aspect, the present invention further provides a method for identifying aprilat codes suitable for different camera views, which specifically includes the following steps:

s21, detecting the octagon, judging the concavity and convexity of eight vertexes of the octagon according to the rule that the white pixels in the neighborhood of the convex vertex are more and the black pixels in the neighborhood of the concave vertex are more, if the concavity and convexity of the eight vertexes are convex, concave, convex, concave and convex in sequence, entering the next step, and if the concavity and convexity of the eight vertexes are convex, concave, convex, concave and convex in sequence, continuing to check the next octagon, and if all the octagons are detected completely, and the concavity and convexity in sequence of convex, concave, convex, concave and convex are not found, switching to the near-viewing-angle detection mode of the camera;

s22, taking the connecting line of two concave vertexes of the octagon in the step S21 as a boundary line, enabling the sum of the lengths of the sides formed by the three convex vertexes and the two concave vertexes on one side to be l1, enabling the sum of the lengths of the sides formed by the three convex vertexes and the two concave vertexes on the other side to be l2, entering the next step if the ratio of the minimum value of l1 and l2 to the maximum value of l1 and l2 is less than 0.5, otherwise, continuously checking the next octagon, finishing detection of all octagons, and switching to a camera view angle near detection mode if the ratio of the minimum value of l1 and l2 to the maximum value of l1 and l2 is not found to be less than 0.5;

s23, taking the length of the side and the three convex vertexes at the large side in the step S22 as three vertexes of an April Tag code to be detected, selecting two nonadjacent convex vertexes of an octagon, connecting a concave vertex adjacent to one convex vertex to obtain a first line segment, connecting another concave vertex adjacent to another convex vertex to obtain a second line segment, obtaining another vertex of the April Tag code by the intersection point of the extension lines of the first line segment and the second line segment, replacing the values of the original four code elements in the middle of the April Tag code by the code element values of the vertexes in the corresponding direction, calculating the other 32 code elements of the April Tag code according to the original method, and finally calculating to obtain the code value of the April Tag code corresponding to the octagon;

s24, in the camera view angle close detection mode, a quadrangle is detected, and the code value of AprilTag code of any one of the 5 areas in the middle and the periphery of the octagon of step S22 is determined according to AprilTag code detection and calculation.

As a preferred embodiment of the present invention, in the step 23, the specific detection method is that three convex vertexes with a large side length and a large side in the step S22 are three vertexes B, C, D of the aprilat code to be detected, B and D are two non-adjacent convex vertexes of an octagon, a concave vertex a is adjacent to the convex vertex B, a concave vertex E is adjacent to the convex vertex D, another vertex O of the aprilat code is obtained from an intersection of the line segments AB and ED, values of the original four symbols in the aprilat code are replaced by symbol values of the upper left vertex O, the lower left vertex B, the lower right vertex C, and the upper right vertex D in the corresponding direction, the other 32 symbols of the aprilat code are calculated according to the original method, and finally, the code value of the aprilat code corresponding to the octagon is obtained by calculation.

As a preferred technical solution of the present invention, in step S24, the aprilat code detection and calculation specifically include: the aprilat code is detected and calculated in an encoding manner of Tag36h 11.

(III) advantageous effects

1. The invention is suitable for the disposition method of April Tag of different camera visual angles, include the original April Tag code encoding, obtain and reduce April Tag, recombinate April Tag and compound April Tag and step such as the code, set up the smaller April Tag in the middle part of April Tag, the code element of the middle part of the original April Tag is moved to four corners, the code element of the upper left corner of the middle and original April Tag form the octagon, the middle and outside area increase 5 April Tag codes with smaller area altogether, facilitate subsequent discernment;

2. the April Tag code identification method suitable for different camera view angles, provided by the invention, has the advantages that the April Tag code corresponding to the octagonal area is identified when the view angle is far, and a certain April Tag code in 5 areas in the middle and the periphery of the outer part of the original April Tag code is identified when the view angle is near, so that the camera can be more conveniently identified and used.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.

FIG. 1 is a schematic diagram of an AprilTag code arrangement (numbered) suitable for different viewing angles;

FIG. 2 is a schematic diagram of an AprilTag code arrangement (unnumbered) suitable for different viewing angles;

FIG. 3 is a schematic diagram of an AprilTag code encoded in Tag36h 11;

FIG. 4 is a schematic diagram of the AprilTag code with symbol 15 shifted to the upper left corner to form an octagon;

FIG. 5 is an outer schematic diagram of the AprilTag code with symbols 21, 22, 16 shifted to octagons;

FIG. 6 is a diagram of 5 April Tag codes with a smaller area added to the middle and outer 5 regions around the April Tag code;

fig. 7 is a schematic diagram (without numbering) of AprilTag code arrangements suitable for different viewing angles.

The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.

Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

In the description of the present invention, it is to be understood that the terms "longitudinal", "upper", "lower", "left", "right", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention.

Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.

Example 1

As shown in fig. 1 to 7, in a first aspect, the present invention adopts the following technical solutions, and an arrangement method of aprilatag codes suitable for different camera view angles specifically includes the following steps:

s11, encoding the original April Tag code to obtain an original April Tag code, marking four vertexes of the original April Tag code, and numbering code elements in the original April Tag code in sequence from left to right and from top to bottom;

s12, obtaining a reduced April tag code, obtaining five original April tag codes of different coding types, reducing the sizes of the original April tag codes of the five different coding types in equal proportion, and obtaining the reduced April tag codes of the five different coding types;

s13, recombining April Tag codes, wherein in the original April Tag codes, four code elements positioned in the middlemost part are respectively moved to four vertex parts of the original April Tag codes according to the corresponding positions, one moved code element is kept to be connected with the vertex of the original April Tag codes to form an octagon, and a reduced April Tag code is filled in the four code element parts in the middlemost part to obtain the recombined April Tag codes;

s14, and filling another four reduced April Tag codes with different coding types in the upper, lower, left and right directions of the obtained recombined original April Tag code to obtain the composite April Tag code.

As a preferred embodiment of the present invention, in the steps S11 and S12, the original aprilat codes are respectively set as aprilat codes of Tag36h 11.

As a preferred technical solution of the present invention, in step S11, the specific manner of encoding the original AprilTag code is as follows: the top left, bottom right and top right vertices of the original aprilat code are labeled O, B, C, D, all the symbols are numbered from 1 to 36 in the order from left to right and from top to bottom, the symbols at the top left, top right, bottom left and bottom right corners are numbered 1, 6, 31, 36, respectively, and the symbols at the top left, top right, bottom left and bottom right corners of the four symbols at the middle are numbered 15, 16, 21, 22, respectively.

As a preferred technical solution of the present invention, in the step S13, the AprilTag code is recombined in a specific manner: the code element 15 at the upper left corner of the middle area of the original AprilTag code is moved to the upper left of the vertex O, the original area of the code element 15 is white, the lower right vertex of the code element 15 is superposed with the upper left vertex O of the original AprilTag code, points A and E are respectively taken on line segments OB and OD, a point G, H, F is taken outside a quadrilateral OBCD, a point G, H, A, O, E, F is sequentially the vertex of a polygon GHAOEF, a new area of the code element 15 is inside the polygon GHAOEF, line segments GH, EF and FG are shorter than line segments AB and ED, and a point G, H, A, B, C, D, E, F is sequentially the vertex of the octagon GHABCDEF; the symbols 21, 22, 16 of the original aprilat code are shifted to the lower left, lower right, and upper right of the vertex B, C, D of the octagon GHABCDEF, respectively, the original areas of the middle four symbols 15, 21, 22, 16 are all white, the octagon GHABCDEF includes 33 symbols other than the symbols 21, 22, 16, and one reduced aprilat code is filled in the original positions of the four symbols 15, 21, 22, 16.

As a preferred embodiment of the present invention, in step S14, the composite aprilat code includes an original aprilat code and five reduced aprilat codes of different encoding types, and the total aprilat code includes six aprilat codes.

In a second aspect, the present invention further provides a method for identifying aprilat codes suitable for different camera views, which specifically includes the following steps:

s21, detecting the octagon, judging the concavity and convexity of eight vertexes of the octagon according to the rule that the white pixels in the neighborhood of the convex vertex are more and the black pixels in the neighborhood of the concave vertex are more, if the concavity and convexity of the eight vertexes are convex, concave, convex, concave and convex in sequence, entering the next step, and if the concavity and convexity of the eight vertexes are convex, concave, convex, concave and convex in sequence, continuing to check the next octagon, and if all the octagons are detected completely, and the concavity and convexity in sequence of convex, concave, convex, concave and convex are not found, switching to the near-viewing-angle detection mode of the camera;

s22, taking the connecting line of two concave vertexes of the octagon in the step S21 as a boundary line, enabling the sum of the lengths of the sides formed by the three convex vertexes and the two concave vertexes on one side to be l1, enabling the sum of the lengths of the sides formed by the three convex vertexes and the two concave vertexes on the other side to be l2, entering the next step if the ratio of the minimum value of l1 and l2 to the maximum value of l1 and l2 is less than 0.5, otherwise, continuously checking the next octagon, finishing detection of all octagons, and switching to a camera view angle near detection mode if the ratio of the minimum value of l1 and l2 to the maximum value of l1 and l2 is not found to be less than 0.5;

s23, taking the length of the side and the three convex vertexes at the large side in the step S22 as three vertexes of an April Tag code to be detected, selecting two nonadjacent convex vertexes of an octagon, connecting a concave vertex adjacent to one convex vertex to obtain a first line segment, connecting another concave vertex adjacent to another convex vertex to obtain a second line segment, obtaining another vertex of the April Tag code by the intersection point of the extension lines of the first line segment and the second line segment, replacing the values of the original four code elements in the middle of the April Tag code by the code element values of the vertexes in the corresponding direction, calculating the other 32 code elements of the April Tag code according to the original method, and finally calculating to obtain the code value of the April Tag code corresponding to the octagon;

s24, in the camera view angle close detection mode, a quadrangle is detected, and the code value of AprilTag code of any one of the 5 areas in the middle and the periphery of the octagon of step S22 is determined according to AprilTag code detection and calculation.

As a preferred embodiment of the present invention, in the step 23, the specific detection method is that three convex vertexes with a large side length and a large side in the step S22 are three vertexes B, C, D of the aprilat code to be detected, B and D are two non-adjacent convex vertexes of an octagon, a concave vertex a is adjacent to the convex vertex B, a concave vertex E is adjacent to the convex vertex D, another vertex O of the aprilat code is obtained from an intersection of the line segments AB and ED, values of the original four symbols in the aprilat code are replaced by symbol values of the upper left vertex O, the lower left vertex B, the lower right vertex C, and the upper right vertex D in the corresponding direction, the other 32 symbols of the aprilat code are calculated according to the original method, and finally, the code value of the aprilat code corresponding to the octagon is obtained by calculation.

As a preferred technical solution of the present invention, in step S24, the aprilat code detection and calculation specifically include: the aprilat code is detected and calculated in an encoding manner of Tag36h 11.

Aprilatag codes of other encoding schemes are similar.

In summary, the method for arranging aprilat codes suitable for different camera views specifically includes the steps of encoding an original aprilat code, obtaining a reduced aprilat code, recombining the aprilat code and a composite aprilat code, etc., wherein a smaller aprilat code is arranged in the middle of the aprilat code, the code element in the middle of the original aprilat code is moved to four corners, the code element in the upper left corner in the middle and the original aprilat code form an octagon, and 5 aprilat codes with smaller areas are added in the middle and the outer area, so as to facilitate subsequent identification; the April tag code identification method suitable for different camera view angles is characterized in that April tag codes corresponding to octagonal regions are identified when the view angle is far, and certain April tag codes in 5 regions in the middle of the original April tag codes and around the outside are identified when the view angle is near, so that the camera can be identified more conveniently and used conveniently.

The code elements in the middle part of the original April tag code are moved to the periphery, so that the area of a single code element of the original April tag code is ensured to be unchanged to be suitable for the identification of a far visual angle on the premise of keeping the total number of the code elements unchanged and adding a small number of additional areas, and the April tag code with smaller area is placed in the middle part to be suitable for the identification of a near visual angle; the April Tag codes with 4 areas smaller are added around the outer part of the original April Tag code, the edge area of the octagon is fully utilized, and meanwhile, the April Tag code identification area when the visual angle is closer is enlarged.

The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图像生成方法、装置、电子设备和计算机可读介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!