Target combining two-dimensional code and circular coding disc and identification method thereof

文档序号:904004 发布日期:2021-02-26 浏览:18次 中文

阅读说明:本技术 一种二维码和圆形编码盘相结合的靶标及其识别方法 (Target combining two-dimensional code and circular coding disc and identification method thereof ) 是由 武泰安 张新远 程志伟 邰洋 刘嘉倬 张波 于 2020-11-13 设计创作,主要内容包括:本发明涉及一种二维码和圆形编码盘相结合的靶标及其识别方法,其特点是:该靶标整体为黑底填充的正方形,靶标内含一个白色荧光粗正方形边框,正方形边框内部四个顶角中的左上、右上、左下三个顶角分别设有一个定位标志,正方形边框内部正中间为圆形编码盘。该识别方法从含有复杂背景图片中找出靶标,根据定位标志得到靶标不同视角的方向、旋转度和扭曲度,对圆形编码盘进行矫正后米字型划分解码出对应的二进制数,结合视角方向和解码出的二进制数准确地确定出二进制字符串。本发明不仅能够准确地从复杂环境中提取出靶标区域,而且能从靶标区域中提取出定位标志和圆形编码盘,最终能够准确的识别出编码值,适用于复杂环境,简单易用,准确度高。(The invention relates to a target combining a two-dimensional code and a circular coding disc and an identification method thereof, which are characterized in that: the whole target is a square filled with black matrixes, a white fluorescent thick square frame is contained in the target, three vertex angles of the upper left vertex angle, the upper right vertex angle and the lower left vertex angle in four vertex angles in the square frame are respectively provided with a positioning mark, and a circular coding disc is arranged in the middle of the inside of the square frame. The identification method finds out a target from a picture containing a complex background, obtains the directions, the rotation degrees and the torsion degrees of different visual angles of the target according to a positioning mark, divides the round coding disc into Chinese characters after correcting to decode corresponding binary numbers, and accurately determines a binary character string by combining the visual angle direction and the decoded binary numbers. The method can accurately extract the target area from the complex environment, can extract the positioning mark and the circular coding disc from the target area, can accurately identify the coding value finally, is suitable for the complex environment, is simple and easy to use, and has high accuracy.)

1. The utility model provides a target that two-dimensional code and circular code dish combined together which characterized in that: comprises a bottom plate, a frame, a positioning mark and a circular coding disc; the bottom plate is a square bottom plate filled with black matrixes; the frame is a white fluorescent thick square frame; the positioning marks are positioned on concentric homomorphic polygonal rings at three vertex angles inside the frame; the circular coding disc is formed by cutting concentric circular rings in a shape of Chinese character mi, a certain gap is formed between each cutting block, the gap is communicated with the black bottom plate, each cutting block consists of a white fluorescent thick frame and an internal area, each cutting block represents binary 0 or binary 1, the internal area of each cutting block is black to represent binary 1, and the internal area of each cutting block is white to represent binary 0; the bottom plate, the frame and the circular coding disc are concentric, the bottom plate, the frame and the positioning marks are in the same direction, and the positioning marks are centrosymmetric relative to the center of the target.

2. The target of claim 1, wherein the two-dimensional code and the circular code disc are combined together, and the two-dimensional code and the circular code disc are as follows: the outermost circle of the concentric homomorphic polygonal ring is a white fluorescent thick line type polygonal frame, the middle circle is a black thick line type polygonal frame, and the inside of the concentric homomorphic polygonal ring is a white fluorescent filled polygonal area.

3. The target of claim 1 or 2, wherein the two-dimensional code and the circular code disc are combined together, and the two-dimensional code and the circular code disc are as follows: the polygons in the concentric homomorphic polygonal rings are triangles, quadrangles or pentagons.

4. The target of claim 1 or 2, wherein the two-dimensional code and the circular code disc are combined together, and the two-dimensional code and the circular code disc are as follows: the positioning marks are positioned at the upper left vertex angle, the upper right vertex angle and the lower left vertex angle inside the frame.

5. The target of claim 1 or 2, wherein the two-dimensional code and the circular code disc are combined together, and the two-dimensional code and the circular code disc are as follows: the concentric rings in the circular coding disc are concentric rings of any layer.

6. A method for identifying a target combined by a two-dimensional code and a circular code disc according to any one of claims 1 to 5, wherein: the method comprises the following steps:

step 1, obtaining a picture containing a target combining a two-dimensional code and a circular coding disc;

step 2, carrying out graying processing on the picture containing the target;

step 3, self-adaptive threshold value binarization is carried out on the gray level picture by utilizing the difference between the background and the foreground of the picture;

step 4, performing closing operation on the binary image to eliminate small black points in the image;

step 5, carrying out contour extraction operation on the closed picture to find out all contours;

step 6, finding out the outline positioned at the outermost layer from all the outlines;

step 7, traversing all the outlines of the outermost layers, and finding out all the square outlines of the topmost layers;

step 8, traversing all the top-level square outlines, and finding out a target outline with target pattern characteristics;

step 9, traversing all sub-outlines of the target outline, and finding out all positioning marks and a circular coding disc;

step 10, calculating the directions, the rotation degrees and the torsion degrees of the target at different visual angles according to the positions of the positioning marks in the picture;

and step 11, calculating the binary coding value of the target through the view angle direction, the rotation degree and the torsion degree of the circular coding disc and the target.

7. The method for identifying the target combined by the two-dimensional code and the circular code disc as claimed in claim 6, wherein: the method for finding the target contour in the step 8 is as follows: a target profile if the square profile has eleven sub-profiles, and three of these sub-profiles are in a shape of a Chinese character 'hui'; the method for judging that one contour is a Chinese character hui-shaped contour comprises the following steps: the profile is itself square with and only one square sub-profile and with and only one square sub-profile.

8. The method for identifying the target combined by the two-dimensional code and the circular code disc as claimed in claim 6, wherein: the specific implementation method of the step 9 is as follows: processing the target contour, finding out three zigzag-shaped positioning marks contained in the target contour and eight coding blocks in a circular coding disc, and simultaneously obtaining coordinates of the three positioning marks and the eight coding blocks in a picture and binary values respectively represented by the eight coding blocks, wherein the coding blocks are black to represent binary '1', and the coding blocks are white fluorescence to represent binary '0'.

9. The method for identifying the target combined by the two-dimensional code and the circular code disc as claimed in claim 6, wherein: the specific implementation method of the step 10 is as follows: the method comprises the steps of obtaining the coordinates of a center point of a target and the angle value of a vertex angle of the target through the contour of the target, calculating the angle values formed by all vertex combination modes of three positioning marks, comparing the angle values with the vertex angle value of the target, finding out the correct vertex combination mode of the three positioning marks, and simultaneously calculating the coordinates of eight points, namely the upper point, the lower point, the left point, the upper right point, the lower right point and the lower left point of a target frame.

10. The method for identifying the target combined by the two-dimensional code and the circular code disc as claimed in claim 6, wherein: the specific implementation method of the step 11 is as follows: calculating each coding block respectively, calculating an angle value formed by a central point of the coding block, a central point of the target and eight points of an outer frame of the target, judging that the angle value is close to zero, indicating that the coding block and the outer frame of the target are in the same direction, and determining the position of the coding block in a final target coding binary string; and obtaining the target code after obtaining the positions of all the coding blocks in the final target code binary character string, thereby identifying the code value of the target.

Technical Field

The invention belongs to the technical field of artificial intelligence, and particularly relates to a target combining a two-dimensional code and a circular coding disc and an identification method thereof.

Background

With the development of society, the operation under the adverse circumstances such as mine, tunnel, rail, sea and the like is developing towards the direction of no humanization and intellectualization, wherein the operation comprises the regular or real-time monitoring work of mine coal machine, mine hydraulic support baffle, tunnel road section identification, rail road section identification, sea buoy, sea identification and the like, and the environment comprises more targets to be monitored.

In order to realize unmanned and intelligent monitoring of multiple targets, each target needs to be identified from the multiple targets, and then each target is monitored by combining with other equipment. For object recognition, many techniques such as machine learning, image recognition, etc. are now available. Machine learning is complex, a large number of samples need to be prepared in advance, and actual operation is difficult to realize. The target and the recognition algorithm based on image recognition are more, but in actual work, the existing target and the image recognition algorithm cannot be well realized under the condition that the photographing angle and the simple background cannot be guaranteed in a complex environment. Therefore, how to provide targets and their recognition algorithms suitable for complex environments is a problem that needs to be solved urgently at present.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provides a two-dimensional code and circular code disc combined target which is reasonable in design, high in accuracy, convenient to use and applicable to complex environments and an identification method thereof.

The technical problem to be solved by the invention is realized by adopting the following technical scheme:

a target combining a two-dimensional code and a circular coding disc comprises a bottom plate, a frame, a positioning mark and the circular coding disc; the bottom plate is a square bottom plate filled with black matrixes; the frame is a white fluorescent thick square frame; the positioning marks are positioned on concentric homomorphic polygonal rings at three vertex angles inside the frame; the circular coding disc is formed by cutting concentric circular rings in a shape of Chinese character mi, a certain gap is formed between each cutting block, the gap is communicated with the black bottom plate, each cutting block consists of a white fluorescent thick frame and an internal area, each cutting block represents binary 0 or binary 1, the internal area of each cutting block is black to represent binary 1, and the internal area of each cutting block is white to represent binary 0; the bottom plate, the frame and the circular coding disc are concentric, the bottom plate, the frame and the positioning marks are in the same direction, and the positioning marks are centrosymmetric relative to the center of the target.

Furthermore, the outermost circle of the concentric homomorphic polygonal ring is a white fluorescent thick line type polygonal frame, the middle circle is a black thick line type polygonal frame, and the inside is a white fluorescent filled polygonal area.

Further, the polygons in the concentric homomorphic polygonal rings are triangles, quadrilaterals or pentagons.

Furthermore, the positioning marks are positioned at the upper left vertex angle, the upper right vertex angle and the lower left vertex angle inside the frame.

Furthermore, the concentric rings in the circular code disc are concentric rings of any layer.

A method for identifying a target combined by a two-dimensional code and a circular code disc comprises the following steps:

step 1, obtaining a picture containing a target combining a two-dimensional code and a circular coding disc;

step 2, carrying out graying processing on the picture containing the target;

step 3, self-adaptive threshold value binarization is carried out on the gray level picture by utilizing the difference between the background and the foreground of the picture;

step 4, performing closing operation on the binary image to eliminate small black points in the image;

step 5, carrying out contour extraction operation on the closed picture to find out all contours;

step 6, finding out the outline positioned at the outermost layer from all the outlines;

step 7, traversing all the outlines of the outermost layers, and finding out all the square outlines of the topmost layers;

step 8, traversing all the top-level square outlines, and finding out a target outline with target pattern characteristics;

step 9, traversing all sub-outlines of the target outline, and finding out all positioning marks and a circular coding disc;

step 10, calculating the directions, the rotation degrees and the torsion degrees of the target at different visual angles according to the positions of the positioning marks in the picture;

and step 11, calculating the binary coding value of the target through the view angle direction, the rotation degree and the torsion degree of the circular coding disc and the target.

Further, the method for finding the target contour in the step 8 is as follows: a target profile if the square profile has eleven sub-profiles, and three of these sub-profiles are in a shape of a Chinese character 'hui'; the method for judging that one contour is a Chinese character hui-shaped contour comprises the following steps: the profile is itself square with and only one square sub-profile and with and only one square sub-profile.

Further, the specific implementation method of step 9 is as follows: processing the target contour, finding out three zigzag-shaped positioning marks contained in the target contour and eight coding blocks in a circular coding disc, and simultaneously obtaining coordinates of the three positioning marks and the eight coding blocks in a picture and binary values respectively represented by the eight coding blocks, wherein the coding blocks are black to represent binary '1', and the coding blocks are white fluorescence to represent binary '0'.

Further, the specific implementation method of step 10 is as follows: the method comprises the steps of obtaining the coordinates of a center point of a target and the angle value of a vertex angle of the target through the contour of the target, calculating the angle values formed by all vertex combination modes of three positioning marks, comparing the angle values with the vertex angle value of the target, finding out the correct vertex combination mode of the three positioning marks, and simultaneously calculating the coordinates of eight points, namely the upper point, the lower point, the left point, the upper right point, the lower right point and the lower left point of a target frame.

Further, the specific implementation method of step 11 is as follows: calculating each coding block respectively, calculating an angle value formed by a central point of the coding block, a central point of the target and eight points of an outer frame of the target, judging that the angle value is close to zero, indicating that the coding block and the outer frame of the target are in the same direction, and determining the position of the coding block in a final target coding binary string; and obtaining the target code after obtaining the positions of all the coding blocks in the final target code binary character string, thereby identifying the code value of the target.

The invention has the advantages and positive effects that:

1. the target provided by the invention combines the two-dimensional code and the circular coding disc together, is easy to identify from a complex environment, and can judge the view angle direction, the rotation degree and the torsion degree, and finally can accurately obtain the coding value.

2. In the invention, all the contours are found by carrying out contour extraction operation on the closed picture; finding the outline positioned at the outermost layer from all the outlines; traversing all the outmost layer contours, and finding out all the topmost layer square contours; traversing all the top-most square outlines, and finding out a target outline with target pattern characteristics; traversing all sub-outlines of the target outline, and finding out all positioning marks and a circular coding disc; calculating the directions, the rotation degrees and the torsion degrees of the target at different visual angles according to the positions of the positioning marks in the picture; and calculating the binary coding value of the target through the view angle direction, the rotation degree and the torsion degree of the circular coding disc and the target. The target region can be accurately extracted from the complex environment, the positioning mark and the circular coding disc can be extracted from the target region, and finally the coding value can be accurately identified.

Drawings

FIG. 1a is a schematic diagram of a target pattern of a two-dimensional code and a circular code disc according to the present invention;

FIG. 1b is a schematic diagram of the recognition method of FIG. 1 a;

FIG. 2 is a flow chart of an identification method of the present invention;

FIG. 3a is a first aspect of a target pattern provided by the present invention; FIG. 3b is a schematic diagram of the recognition method of FIG. 3 a;

FIG. 4a is a second aspect of the target pattern provided by the present invention; FIG. 4b is a schematic diagram of the recognition method of FIG. 4 a;

FIG. 5a is a third aspect of the target pattern provided by the present invention; FIG. 5b is a schematic diagram of the recognition method of FIG. 5 a;

FIG. 6a is a fourth aspect of the target pattern provided by the present invention; FIG. 6b is a schematic diagram of the recognition method of FIG. 6 a;

FIG. 7a shows a fifth aspect of the target pattern provided by the present invention; FIG. 7b is a schematic diagram of the recognition method of FIG. 7 a;

FIG. 8a shows a sixth aspect of a target pattern provided by the present invention; FIG. 8b is a schematic diagram of the recognition method of FIG. 8 a;

FIG. 9a is a seventh aspect of the target pattern provided by the present invention; FIG. 9b is a schematic diagram of the recognition method of FIG. 9 a;

FIG. 10a is an eighth aspect of the target pattern provided by the present invention; FIG. 10b is a schematic diagram of the recognition method of FIG. 10 a;

FIG. 11a shows a ninth aspect of the target pattern provided by the present invention; FIG. 11b is a schematic diagram of the recognition method of FIG. 11 a;

FIG. 12a shows a tenth aspect of a target pattern provided by the present invention; FIG. 12b is a schematic diagram of the recognition method of FIG. 12 a;

FIG. 13a is an eleventh aspect of the target pattern provided by the present invention; FIG. 13b is a schematic diagram of the recognition method of FIG. 13 a;

FIG. 14a shows a twelfth aspect of a target pattern provided by the present invention; FIG. 14b is a schematic diagram of the recognition method of FIG. 14 a;

FIG. 15a shows a thirteenth aspect of the target pattern provided by the present invention; FIG. 15b is a schematic view of the recognition method of FIG. 15 a;

FIG. 16a shows a fourteenth aspect of a target pattern provided by the present invention; FIG. 16b is a schematic diagram of the recognition method of FIG. 16 a;

FIG. 17a is a fifteenth aspect of a target pattern provided by the present invention; FIG. 17b is a schematic diagram of the recognition method of FIG. 17 a;

FIG. 18a shows a sixteenth aspect of a target pattern provided by the present invention; FIG. 18b is a schematic diagram of the recognition method of FIG. 18 a.

Detailed Description

The embodiments of the present invention will be described in detail with reference to the accompanying drawings.

A target combining a two-dimensional code and a circular code disc, as shown in fig. 1a and fig. 3a to fig. 18a, includes a bottom plate, a frame, a positioning mark, and a circular code disc; the bottom plate is a square bottom plate filled with black matrixes; the frame is a white fluorescent thick square frame; the positioning marks are concentric homomorphic polygonal rings positioned at the top left corner, the top right corner and the bottom left corner in the frame; the outermost ring of the concentric isomorphic polygonal rings is a white fluorescent thick line type polygonal frame, the middle ring of the concentric isomorphic polygonal rings is a black thick line type polygonal frame, and the inside of the concentric isomorphic polygonal rings is a white fluorescent filled polygonal area; polygons in the concentric homomorphic polygonal ring include all triangles, quadrangles, pentagons and the like, and are not limited to one; the circular coding disc is formed by cutting concentric circular rings in a shape of Chinese character mi, a certain gap is formed between each cutting block, the gap is communicated with the black bottom plate, each cutting block consists of a white fluorescent thick frame and an internal area, each cutting block represents binary 0 or binary 1, the internal area of each cutting block is black to represent binary 1, and the internal area of each cutting block is white to represent binary 0; the concentric rings in the circular coding disc can be concentric rings of any layer and are not limited to one layer; the bottom plate, the frame and the circular coding disc are concentric, the bottom plate, the frame and the positioning marks are in the same direction, the positioning marks are in central symmetry relative to the center of the target, and the frame, the positioning marks and the circular coding disc are not overlapped.

The target combined by the two-dimensional code and the circular coding disc is easy to identify from a complex environment, and the target is found from a picture containing a complex background according to the characteristics of a bottom plate, a frame, a positioning mark and the circular coding disc of a target pattern. The direction, the rotation degree and the torsion degree of different visual angles of the target are determined according to the positions of the three positioning marks in the picture. Which gets the binary string of the correct coding order, i.e. the coded value, from the circular code wheel.

The method accurately extracts the target area from the complex environment through pattern recognition of the target, further extracts the positioning mark and the circular coding disc from the target area, then judges the visual angle direction, the rotation degree and the torsion degree of the target from the position of the positioning mark in the picture, and finally accurately recognizes the coding value from the circular coding disc.

Based on the target combined by the two-dimensional code and the circular code disc, the present invention further provides a method for identifying a target combined by a two-dimensional code and a circular code disc, as illustrated in the flowchart given in fig. 2 and the examples in fig. 3b to 18b, including the following steps:

s1: and photographing the target from any direction and angle by using photographing equipment to obtain a picture of the target containing the combination of the two-dimensional code and the circular code disc.

S2: and calling an interface function of the OpenCV to perform graying processing on the target picture.

S3: and calling an interface function of the OpenCV to perform adaptive threshold binarization on the gray level picture by using the difference between the background and the foreground of the picture.

S4: and calling an interface function of the OpenCV to carry out closed operation on the binary image, and eliminating small black spots in the image.

S5: and calling an interface function of the OpenCV to perform contour extraction operation on the closed-operation picture, and finding all contours in the target picture.

S6: sequentially finding out the outline positioned at the outermost layer from all the outlines;

s7: traversing all the outmost layer contours, and finding out all the topmost layer square contours;

the method for judging that one contour is square is characterized in that the shape after the contour is fitted is characterized by four sides and four vertexes.

S8: traversing all the top-most square outlines, and finding out a target outline with target pattern characteristics;

in this step, all the outermost squares and their sub-outlines are traversed to find out the square outline with the target pattern feature, i.e. the target outline. The method for judging a square contour as the target contour is that the square contour has eleven sub-contours (not limited to eleven, determined according to the number of concentric rings in the circular code disc), and three of the eleven sub-contours are square contours (not limited to square contours, determined according to the polygon shape in the concentric homomorphic polygon ring). The method for judging whether the outline is the font-returning outline is that the outline is a square, and the outline has one and only one square sub-outline, and the square sub-outline has one and only one square sub-outline.

S9: traversing all sub-outlines of the target outline, and finding out all positioning marks and a circular coding disc;

in this step, the target contour is processed to find out three zigzag positioning marks (not limited to the zigzag positioning marks, determined according to the polygon shape in the concentric homomorphic polygonal rings) and eight coding blocks in the circular coding disc (not limited to the eight coding blocks, determined according to the number of concentric rings in the circular coding disc, each layer of concentric rings including eight coding blocks). And coordinates of the three positioning marks and the eight coding blocks in the picture and binary values respectively represented by the eight coding blocks can be obtained, wherein the coding blocks are black to represent binary '1' and the coding blocks are white fluorescence to represent binary '0'.

S10: calculating the directions, the rotation degrees and the torsion degrees of the target at different visual angles according to the positions of the positioning marks in the picture;

in this step, the calculation of the direction, degree of rotation and degree of torsion of the target is started. The method comprises the steps of obtaining the coordinates of a center point of a target and the angle value of a vertex angle of the target through the contour of the target, calculating the angle values formed by all vertex combination modes of three positioning marks, comparing the angle values with the vertex angle value of the target, finding out the correct vertex combination mode of the three positioning marks, and simultaneously calculating the coordinates of eight points, namely the upper point, the lower point, the left point, the upper right point, the lower right point and the lower left point of a target frame.

S11: and calculating the binary coding value of the target through the view angle direction, the rotation degree and the torsion degree of the circular coding disc and the target.

In the step, each coding block is respectively calculated, an angle value formed by the center point of the coding block, the center point of the target and eight points of the outer frame of the target is calculated, and when the angle value is judged to be close to zero, the coding block and the outer frame point of the target are in the same direction, so that the position of the coding block in the final target coding binary string can be known. And obtaining the positions of all the coding blocks in the final target coding binary character string to obtain the target coding. By this, the encoded value of the target is accurately identified.

In the embodiment, the target pattern is identified through the steps, so that not only can the target region be accurately extracted from the complex environment, but also the positioning mark and the circular coding disc can be extracted from the target region, and finally the coding value can be accurately identified.

It should be emphasized that the embodiments described herein are illustrative rather than restrictive, and thus the present invention is not limited to the embodiments described in the detailed description, but also includes other embodiments that can be derived from the technical solutions of the present invention by those skilled in the art.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种带旋转装置的烟花

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!