CN112184803A - Calibration plate and calibration method - Google Patents

Calibration plate and calibration method Download PDF

Info

Publication number
CN112184803A
CN112184803A CN201910606545.XA CN201910606545A CN112184803A CN 112184803 A CN112184803 A CN 112184803A CN 201910606545 A CN201910606545 A CN 201910606545A CN 112184803 A CN112184803 A CN 112184803A
Authority
CN
China
Prior art keywords
calibration
points
code unit
graphic code
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910606545.XA
Other languages
Chinese (zh)
Other versions
CN112184803B (en
Inventor
杨煦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikrobot Technology Co Ltd
Original Assignee
Hangzhou Hikrobot Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikrobot Technology Co Ltd filed Critical Hangzhou Hikrobot Technology Co Ltd
Priority to CN201910606545.XA priority Critical patent/CN112184803B/en
Publication of CN112184803A publication Critical patent/CN112184803A/en
Application granted granted Critical
Publication of CN112184803B publication Critical patent/CN112184803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Abstract

The invention discloses a calibration plate and a calibration method adopting the calibration plate, wherein the calibration plate comprises: a substrate; the characteristic pattern is printed on the surface of the substrate and is provided with a plurality of characteristic points; the graphic code unit is printed on the substrate and is surrounded by the characteristic pattern; wherein, the graphic code unit includes: a quiet zone; the orientation frame is embedded in the quiet area; a positioning ring positioned at the center of the inner area of the orientation frame; and the coding pattern is positioned in the inner area of the orientation frame and distributed around the positioning ring, and records the calibration information of the mark points of the pattern code unit, wherein the mark points are superposed with one characteristic point in the characteristic pattern. The invention records the calibration information of the mark points by using the graphic code unit embedded in the calibration plate, so that the calibration information of the mark points in the calibration plate can be directly obtained from the image of the calibration plate when the camera is calibrated, the automatic calibration of the camera is realized, and the calibration efficiency and the calibration accuracy are improved.

Description

Calibration plate and calibration method
Technical Field
The invention relates to the technical field of machine vision, in particular to a calibration plate and a calibration method.
Background
In image measurement processes and machine vision applications, in order to determine the correlation between the three-dimensional geometric position of a certain point on the surface of an object in space and the corresponding point in the image, a geometric model of camera imaging must be established, and the parameters of the geometric model are the parameters of the camera. Under most conditions, the parameters must be obtained through experiments and calculation, and the process of solving the parameters is called camera calibration (or video camera calibration). In image measurement or machine vision application, calibration of camera parameters is a very critical link, and accuracy of calibration results and stability of algorithms directly influence accuracy of results generated by camera work. Therefore, the camera calibration is a precondition for subsequent work, and the improvement of the calibration precision is a key point of scientific research.
In the applications of machine vision, image measurement, photogrammetry, three-dimensional reconstruction and the like, a geometric model for camera imaging needs to be established for correcting lens distortion, determining a conversion relation between a physical size and pixels and determining a mutual relation between a three-dimensional geometric position of a certain point on the surface of a space object and a corresponding point in an image. The camera shoots the array flat plate with the fixed-spacing pattern, and a geometric model of the camera can be obtained through calculation of a calibration algorithm, so that high-precision measurement and reconstruction results are obtained. And the flat plate with the fixed pitch pattern array is a Calibration plate (Calibration Target).
In the existing calibration board, a two-dimensional code is embedded in a characteristic pattern of the calibration board, and the direction of the calibration board and the index of an area where the two-dimensional code is located are recorded in the two-dimensional code, so that the correlation information among multiple cameras is provided when the multiple cameras are calibrated. However, when such a calibration board is manufactured, software for generating a two-dimensional code is required, which increases the manufacturing cost of the calibration board.
Disclosure of Invention
In view of this, the present invention provides a calibration board, a calibration method, an electronic device, and a non-volatile computer-readable storage medium, which replace a calibration board calibrated by using two-dimensional codes, so as to save the cost required by using two-dimensional code generation software.
The technical scheme of the invention is realized as follows:
a calibration plate, comprising:
a substrate;
a feature pattern printed on a surface of the substrate and having a plurality of feature points therein;
it is characterized in that the calibration plate further comprises:
the graphic code unit is printed on the substrate and is surrounded by the characteristic pattern; wherein the content of the first and second substances,
the graphic code unit includes:
a quiet zone;
a directional frame embedded in the quiet zone;
a positioning ring, wherein the positioning ring is positioned at the center of the inner area of the orientation frame; and
and the coding patterns are positioned in the inner area of the orientation frame and distributed around the positioning ring, and the coding patterns record the calibration information of the mark points of the pattern code unit, wherein the mark points are superposed with one characteristic point in the characteristic pattern.
Preferably, the graphic code unit is a rectangle, and any one corner point of the rectangle is a mark point of the graphic code unit;
or the central point of the positioning ring is a mark point of the graphic code unit.
Preferably, the characteristic pattern is:
a checkerboard pattern, a dot pattern, or a hexagonal pattern; wherein the content of the first and second substances,
when the characteristic pattern is a checkerboard pattern, the characteristic points are corner points of each checkerboard;
when the characteristic pattern is a dot pattern, the characteristic point is the central point of each dot;
when the feature pattern is a hexagonal pattern, the feature points are corner points of each hexagon.
Preferably, the feature pattern is composed of a plurality of basic feature cell patterns, which are equal in size and arranged at equal intervals.
Preferably, the number of the graphic code units in the calibration board is at least one, the coded graph in each graphic code unit is used for recording calibration information of the mark points of the graphic code unit, and the calibration information of the mark points of the graphic code unit is used for determining the position coordinates of the feature points in the calibration board.
Preferably, the orientation frame is formed by sequentially connecting a first rectangular strip, a second rectangular strip, a third rectangular strip and a fourth rectangular strip outside the coding pattern, and an opening is formed between the fourth rectangular strip and the first rectangular strip.
Preferably, the positioning ring takes a shape that is different from the shape of the data points in the encoded pattern.
Preferably, the coding graph is a lattice composed of data points;
the data points include two color data points that are distinguished from each other, where a data point of one color represents a 0 and a data point of the other color represents a 1.
Preferably, the calibration information of the mark points of the graphic code unit includes:
the calibration index coordinates of the marking points of the graphic code unit in all the characteristic points in the calibration plate and the physical distance between the adjacent characteristic points in the calibration plate are as follows: index coordinates of the marking points recorded in the graphic code unit in all feature points in a calibration board;
alternatively, the first and second electrodes may be,
and the physical coordinates of the marking points of the graphic code unit in the calibration plate.
Preferably, the lattice comprises a data points, and the a data points are distributed in a lattice area of b × c around the positioning ring;
wherein the positioning ring occupies the central dxe point of the lattice area;
wherein d >1, e >1, b > d, b > e, c > d, c > e, a > b, a > c.
Preferably, the a data points are arranged to form f data code words and g error correction code words, and each code word is binary h bits; wherein the content of the first and second substances,
the calibration information of the characteristic points is recorded in the f data code words;
the error correction code word is used for carrying out error correction decoding on the data code word;
wherein f >1, g > f, h >1, and a ═ f + g × h.
Preferably, when the calibration information of the marker points of the graphic code unit is the calibration index coordinates of the marker points of the graphic code unit in all the feature points in the calibration board and the physical distance between adjacent feature points in the calibration board, the decimal-converted content of the f data code words includes: the column sequence number and the row sequence number of the marking points of the graphic code unit to which the dot matrix belongs in all the characteristic points, and the physical distance between the adjacent characteristic points in the calibration plate.
A calibration method, comprising:
shooting a calibration plate image containing the calibration plate as described in any one of the above, and extracting calibration plate information from the calibration plate image;
and performing calibration processing according to the extracted calibration plate information.
Preferably, said extracting calibration plate information from said calibration plate image comprises:
searching the graphic code unit in the calibration board image, and reading calibration information of the mark points of the graphic code unit recorded by the coding graph in the graphic code unit;
searching the characteristic points in the calibration plate image, obtaining the pixel coordinates of each characteristic point in the calibration plate image, and determining the image index coordinates of each characteristic point in the calibration plate image according to the pixel coordinates of each characteristic point in the calibration plate image, wherein the image index coordinates refer to: index coordinates in only part of the feature points photographed in the calibration plate image obtained from the calibration plate image;
and correcting the image index coordinates and the physical coordinates of each characteristic point in the calibration plate image according to the calibration information of the marking points of the graphic code unit.
Preferably, the searching for the graphic code unit in the calibration board image and reading the calibration information of the mark point of the graphic code unit recorded in the coding graph in the graphic code unit includes:
searching the orientation frame of the graphic code unit in the calibration board image to obtain the direction information of the orientation frame, and taking the direction information of the orientation frame as the direction information of the graphic code unit;
searching for a mark point of the graphic code unit in the calibration board image, determining a pixel coordinate of the mark point of the graphic code unit in the calibration board image, and determining an image index coordinate of the mark point in all feature points in the calibration board image according to the pixel coordinate of the mark point in the calibration board image and the pixel coordinate of each feature point in the calibration board image;
in the calibration board image, determining the area of the coded graph according to the positions of an orientation frame and a positioning ring in the graph code unit;
and reading the coding graph to obtain the calibration information of the mark points of the graph code unit recorded by the coding graph.
Preferably, when the calibration information of the mark points of the graphic code unit is the calibration index coordinates of the mark points of the graphic code unit in all the feature points in the calibration board and the physical distance between adjacent feature points in the calibration board, the correcting the image index coordinates and the physical coordinates of the feature points according to the calibration information of the mark points of the graphic code unit includes:
establishing a mapping relation from the image index coordinate to the calibration index coordinate according to the image index coordinate and the calibration index coordinate of the mark point;
transforming the image index coordinates of all the characteristic points in the calibration plate image into calibration index coordinates by using the mapping relation;
and obtaining the physical coordinates of each characteristic point in the calibration plate image according to the calibration index coordinates of each characteristic point in the calibration plate image and the physical distance between adjacent characteristic points.
Preferably, when the calibration information of the mark point of the graphic code unit is the physical coordinate of the mark point of the graphic code unit in the calibration board, the correcting the image index coordinate and the physical coordinate of the feature point according to the calibration information of the mark point of the graphic code unit includes:
receiving physical intervals between adjacent feature points in a calibration board input by a user;
and acquiring the physical coordinates of all the characteristic points in the calibration board according to the physical coordinates of the marking points of the graphic code unit in the calibration board and the physical distance between the adjacent characteristic points in the calibration board.
Preferably, the obtaining of the calibration information of the mark points of the graphic code unit recorded in the encoded graphic includes:
carrying out binarization processing on the coded graphic unit;
acquiring binary information recorded by the coding graph unit from the initial position of the coding graph;
according to the coding scheme of the coding graph, obtaining coding information of the coding graph from binary information recorded by the coding graph unit;
and carrying out error correction decoding on the coding information, and if the error value of the error correction decoding is less than a preset threshold value, taking the decoding result as the calibration information of the mark point of the graphic code unit.
Preferably, when acquiring the binary information described in the coding graphics unit and the coding information of the coding graphics, the method further includes:
and carrying out bit exclusive-or processing on the acquired binary information and the data mask matrix.
Preferably, when the coding information of the coding pattern is obtained from the binary information described in the coding pattern unit, the obtained binary information and a data mask matrix are subjected to bit exclusive or to obtain pre-mask information, and the coding information of the coding pattern is obtained from the pre-mask information.
Preferably, the error correction coding is reed solomon RS error correction coding.
An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform steps in a calibration method as described above.
A non-transitory computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the calibration method as described above.
According to the calibration board, the calibration method, the electronic device and the nonvolatile computer readable storage medium, the graphic code unit containing the direction information and the calibration information is embedded in the characteristic pattern of the calibration board, the calibration board calibrated by the two-dimensional code is replaced, and the cost required by software generated by the two-dimensional code is saved. Meanwhile, the invention records the calibration information of the feature points in the calibration plate by using the graphic code unit embedded in the calibration plate, so that the camera can directly obtain the index coordinates of the feature points and the physical distance information between adjacent feature points or obtain the physical coordinate information of the feature points in the calibration plate from the calibration plate image when the camera is calibrated, thereby avoiding manually inputting the related information of the calibration plate in a manual mode, realizing the automatic calibration of the camera and improving the calibration efficiency and the calibration accuracy. In the invention, the orientation frame contained in the graphic code unit can provide the direction information of the coded graphic in the graphic code unit and also can provide the direction information of the calibration board, thereby realizing the multiplexing of marking the direction of the coded graphic and the direction of the calibration board simultaneously. In the invention, the marking point of the graphic code unit can be any angular point of the graphic code unit or the central point of the positioning ring of the graphic code unit, and the size of the graphic code unit can be flexibly set and can be less than or equal to or greater than the characteristic pattern of the calibration board, so that the position and the size of the graphic code unit in the calibration board can be flexibly set. In the preferred embodiment of the present invention, the coding pattern in the pattern code unit includes a data code word and an error correction code word, the coding and decoding scheme adopts an RS coding and decoding scheme, and the xor processing is performed on the binary information recorded in the coding pattern unit during decoding, so as to improve the decoding accuracy.
Drawings
FIG. 1 is a schematic view of one embodiment of a calibration plate of the present invention;
FIG. 2 is a schematic view of another embodiment of the calibration plate of the present invention;
FIG. 3 is a diagram illustrating an embodiment of a graphic code unit in a calibration board according to the present invention;
FIG. 4 is a schematic diagram of another embodiment of a graphic code unit in the calibration board of the present invention;
FIG. 5 is a flowchart of a calibration method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of coordinate derivation in a calibration board in the calibration method according to the embodiment of the present invention;
FIG. 7 is a schematic diagram of an application scenario of a calibration board according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating an exemplary implementation of a calibration method according to an embodiment of the present invention;
fig. 9 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and examples.
Fig. 1 shows a schematic diagram of an embodiment of the calibration board of the present invention, fig. 2 shows a schematic diagram of another embodiment of the calibration board of the present invention, fig. 3 shows a specific embodiment of the graphic code unit 3 in the calibration board of the present invention, and fig. 4 shows another specific embodiment of the graphic code unit 3 in the calibration board of the present invention.
As shown in fig. 1 and 2, the calibration plate according to the embodiment of the present invention includes a substrate 1, a feature pattern 2, and a graphic code unit 3. Wherein, the characteristic pattern 2 is printed on the surface of the substrate 1, and the characteristic pattern 2 has a plurality of characteristic points. Graphic code units 3 are printed on the substrate 1, and the graphic code units 3 are surrounded by the characteristic patterns 2.
As shown in fig. 3 and 4, the graphic code unit 3 includes a quiet zone 31, an orientation frame 32, a positioning ring 33 and a coded graphic 34. Wherein the orientation frame 32 is embedded in the quiet zone 31. The positioning ring 33 is located in the center of the inner area of the orientation frame 32. The coding pattern 34 is located in the inner area of the orientation frame 32 and distributed around the positioning ring 33, and the coding pattern 34 records calibration information of the mark points of the graphic code unit 3, wherein the mark points of the graphic code unit 3 coincide with one of the feature points in the feature pattern 2.
In an alternative embodiment, the graphic code unit 3 is a rectangle, and any one of the corner points of the rectangle is a mark point of the graphic code unit 3, or the center point of the positioning ring 33 is a mark point of the graphic code unit 3.
More preferably, as shown in the figures, the graphic code unit 3 is square, wherein any one of four corner points of the square graphic code unit 3 can be used as a marking point of the graphic code unit 3, and the marking point of the graphic code unit 3 coincides with one of the feature points in the feature pattern 2. For example, as shown in fig. 1 and fig. 2, the mark point of each graphic code unit 3 may be an angular point at the upper left corner of each graphic code unit 3, the mark point of each graphic code unit 3 may also be an angular point at the upper right corner of each graphic code unit 3, the mark point of each graphic code unit 3 may also be an angular point at the lower left corner of each graphic code unit 3, and the mark point of each graphic code unit 3 may also be an angular point at the lower right corner of each graphic code unit 3. Alternatively, the center point of the positioning ring 33 is the mark point of the graphic code unit 3, and the mark point of the graphic code unit 3 coincides with the position of any one feature point in the feature pattern 2. For example, in fig. 2, the mark point of each graphic code unit 3 may be the center point of the positioning ring 33 of each graphic code unit 3, and in fig. 2, the center point (mark point) of the positioning ring 33 of each graphic code unit 3 coincides with the position of the feature point in the feature pattern 2.
In alternative embodiments, the feature pattern 2 is a checkerboard pattern (as shown in fig. 1, 2), a dot pattern, a hexagonal pattern, or other pattern. Although not shown in the drawings, the dot pattern, the hexagonal pattern, or the other patterns may be generalized to the dot pattern, the hexagonal pattern, or the other patterns by the description of the embodiments shown in fig. 1 and 2 under the spirit of the present invention. When the feature pattern 2 is a checkerboard pattern, the feature points are corner points of each checkerboard. When the feature pattern 2 is a dot pattern, the feature point is the center point of each dot. When the feature pattern 2 is a hexagonal pattern, the feature points are corner points of each hexagon.
In the embodiment of the present invention, the feature pattern 2 is composed of a plurality of basic feature unit patterns, and the plurality of basic feature unit patterns are equal in size and are arranged at equal intervals. In the checkerboard pattern shown in fig. 1 and 2, all the black and white squares in the checkerboard are equal in size and are arranged at equal intervals, and both the black squares and the white squares are basic feature unit patterns. It should be noted that, in the embodiment shown in fig. 1, the size of the graphic code unit 3 is equal to the size of the basic feature unit pattern of the white square, and the graphic code unit 3 just covers the basic feature unit of the white square, so that, in the embodiment shown in fig. 1, the basic feature unit patterns of the black square and the white square are equal in size and are arranged at equal intervals.
In an alternative embodiment, the number of the graphic code units 3 in the calibration board is at least one, the code pattern 34 in each graphic code unit 3 is used to record calibration information of a mark point of the graphic code unit 3, and the calibration information of the mark point of the graphic code unit 3 is used to determine a position coordinate of a feature point in the calibration board, that is, the code pattern 34 in each graphic code unit 3 respectively records calibration information of the graphic code unit 3 to which it belongs. For a calibration board using only one graphic code unit 3, it is suitable for calibration of a single camera, while for a calibration board using more than one graphic code unit 3, it can provide the correlation information between multiple cameras, and thus it can be suitable for calibration of multiple cameras.
In an alternative embodiment, the size of each graphic code unit 3 may be set according to needs, for example, it may be set to occupy at least one basic feature unit pattern, and of course, it may also be set to occupy less than one basic feature unit pattern. For example, as shown in fig. 1, the size of the graphic code unit 3 is equal to the basic feature unit pattern size of a white square, each graphic code unit 3 occupies a basic feature unit of a white square, and in this case, the mark point of the graphic code unit 3 may be one of an upper left corner point, an upper right corner point, a lower left corner point or a lower right corner point thereof. As shown in fig. 2, the size of the graphic code unit 3 is larger than the size of the basic feature unit pattern, specifically, the side length of the graphic code unit 3 is 2 times of the side length of the basic feature unit pattern, the area of the graphic code unit 3 is 4 times of the area of the basic feature unit pattern, each graphic code unit 3 occupies four basic feature units, that is, each graphic code unit 3 occupies two black squares and two white squares of the basic feature unit, in this case, the mark point of the graphic code unit 3 may be one of the upper left corner point, the upper right corner point, the lower left corner point or the lower right corner point, and in this case, the center point of the positioning ring 33 of the graphic code unit 3 is also exactly located at the feature point position in the feature pattern 2, that is, the center point of the positioning ring 33 of the graphic code unit 3 coincides with the feature point in the feature pattern 2, furthermore, the mark point of the graphic code unit 3 can also be the center point of the positioning ring 33 of the graphic code unit 3.
To further extend, in an alternative embodiment, the mark point of the graphic code unit 3 may be an upper left corner point, an upper right corner point, a lower left corner point, a lower right corner point, or a point in the center point of the positioning ring 33 that coincides with the position of the feature point in the feature pattern 2, further, in this case, the size or area of the graphic code unit 3 may not necessarily be completely matched with the basic feature unit pattern, as long as at least one of the upper left corner point, the upper right corner point, the lower left corner point, the lower right corner point or the center point of the positioning ring 33 of the graphic code unit 3 is enabled to coincide with the feature point position in the feature pattern 2, and thus, the side length of the graphic code unit 3 may be either smaller than that of the basic feature unit pattern or larger than that of the basic feature unit pattern, and the side length of the graphic code unit 3 may not be an integral multiple of the side length of the basic feature unit pattern.
When the calibration plate of the embodiment of the invention is used for calibration, the specific point positions of the marking points of the graphic code unit 3 can be appointed according to actual needs.
In an alternative embodiment, the orientation frame 32 is formed by sequentially connecting a first rectangular bar, a second rectangular bar, a third rectangular bar and a fourth rectangular bar outside the encoding pattern 34, and the fourth rectangular bar and the first rectangular bar have an opening therebetween, so that the size and shape of the orientation frame 32 can be determined by the shape and size of the first rectangular bar, the second rectangular bar, the third rectangular bar and the fourth rectangular bar, and in an alternative embodiment, the orientation frame 32 can be rectangular. More preferably, when the graphic code unit 3 is square, as shown in fig. 3 and 4, the orientation frame 32 is formed by connecting four rectangular bars. The lengths of three rectangular strips in the four rectangular strips are equal, and the length of the other rectangular strip except the three rectangular strips with the same length is smaller than the lengths of the three rectangular strips. Four rectangular bars are connected to form an orientation frame 32 surrounding the encoded pattern 34 and having an opening. In the embodiment shown in fig. 3 and 4, the upper, left and lower rectangular bars of the orientation frame 32 are equal in length, and the left end of the upper rectangular bar is connected to the upper end of the left rectangular bar, and the lower end of the left rectangular bar is connected to the left end of the lower rectangular bar, the right rectangular bar of the orientation frame 32 is shorter in length than the upper, left and lower rectangular bars, and the lower end of the right rectangular bar is connected to the right end of the lower rectangular bar, forming an opening between the upper end of the right rectangular bar and the right end of the upper rectangular bar. In an alternative embodiment, the length of the right rectangular bar is three-fourths of the lengths of the other three rectangular bars, and the width of the opening is one-fourth of the side length of the orientation frame 32, where the side length of the orientation frame 32 is the length of the upper rectangular bar, the left rectangular bar, and the lower rectangular bar. In other embodiments, the opening position and the opening width of the orientation frame 32 are not limited to the positions and widths shown in fig. 3 and 4, and the opening position of the orientation frame 32 can be adjusted to other positions of the orientation frame 32 under the spirit of the present invention, and the opening width can be set smaller or larger, in alternative embodiments, the length of the rectangular strip on the opening side can be set to 0, and the opening can also be set in the middle portion of the rectangular strip, so that the rectangular strip is divided into two segments by the opening, in alternative embodiments, the opening can also be located at the contact portion of two adjacent rectangular frames, i.e., at a certain corner region of the orientation frame 32.
With continued reference to fig. 3 and 4, the positioning ring 33 is a circular ring or a square ring. The number of the circular rings or the square rings may be plural, and the plural circular rings or the square rings are provided concentrically. In alternative embodiments, retaining ring 33 may be other polygonal rings, such as various regular polygonal rings. In other alternative embodiments, the positioning ring 33 may be replaced by a solid positioning block, such as a circular block, a square block, or a polygonal block, and the center of the solid positioning block is located at the center of the graphic code unit 3.
As shown in fig. 3 and 4, the code pattern 34 is a lattice of data points. Wherein the data points are square points (as shown in fig. 3) or circular points (as shown in fig. 4). In an alternative embodiment, retaining ring 33 takes a shape that is different from the shape of the data points in encoded pattern 34. Specifically, when the positioning ring 33 is a circular ring, the data points are square points, and when the positioning ring 33 is a square ring, the data points are circular points, which is beneficial for identification by distinguishing the shapes of the positioning ring 33 and the data points, so that the problem that the positioning ring 33 is mistakenly read as a data point due to the fact that the shape of the positioning ring 33 is similar to the shape of the data points can be prevented, the accuracy of reading the information recorded by the code pattern 34 can be improved, and the error rate of reading the information recorded by the code pattern 34 can be reduced.
In an alternative embodiment, the data points comprise two color data points that are distinguished from each other, wherein the data point of one color represents a 0 and the data point of the other color represents a 1. For example, the data points of two colors of black and white shown in fig. 3 and 4 may be combined in different colors other than the combination of black and white, such as red and white, black and yellow, blue and yellow, and the like, and the colors of the data points are selected to give priority to the ease of reading the encoded graphic 34, so as to avoid misreading caused by too close color values between the two colors. In the embodiments shown in fig. 3 and 4, black data points may be represented as 1, and white data points may be represented as 0, or black data points may be represented as 0, and white data points may be represented as 1.
As described above, the code pattern 34 records calibration information of the mark points of the pattern code unit 3, and the mark point coincides with one of the feature points in the feature pattern 2, so that what the code pattern 34 records is calibration information of the feature points, which can be used to determine the position coordinates of the feature points in the calibration board. In an alternative embodiment, the calibration information of the mark points (i.e. the calibration information of the feature points) of the graphic code unit 3 includes: the calibration index coordinates of the marking points of the graphic code unit 3 in all the characteristic points in the calibration plate and the physical distance between the adjacent characteristic points in the calibration plate are as follows: the index coordinates of the marking points recorded in the graphic code unit 3 in all the feature points in the calibration board. In another alternative embodiment, the calibration information of the mark points (i.e. the calibration information of the feature points) of the graphic code unit 3 includes: the physical coordinates of the mark points of the graphic code unit 3 in the calibration board.
For the above-mentioned optional embodiment of the calibration information about the calibration index coordinates of the mark points of the graphic code unit 3 in all the feature points in the calibration board and the feature points of the physical distances between the adjacent feature points in the calibration board, when the calibration is performed, the specific positions (row number and column number) of the mark points in all the feature points can be obtained by using the index coordinates of the mark points recorded in the graphic code unit 3 in all the feature points in the calibration board, so that the index coordinates of all the feature points in the calibration board can be obtained by using the specific positions of the mark points in all the feature points as the reference, and the physical coordinates of all the feature points in the calibration board can be obtained by further using the physical distances between the adjacent feature points in the calibration board recorded in the graphic code unit 3 and combining the index coordinates of all the feature points.
For the above-mentioned optional embodiment of the calibration information about the feature points of the physical coordinates of the mark points of the graphic code unit 3 in the calibration board, before the calibration, the physical distance between adjacent feature points in the calibration board is manually input into the calibration device (such as a camera), and when the calibration is performed, the physical coordinates of the mark points recorded in the graphic code unit 3 in the calibration board are further combined with the physical distance between adjacent feature points in the calibration board, so as to obtain the physical coordinates of all the feature points in the calibration board.
In addition to the two alternative embodiments described above, virtually any representation that can be used to indicate the location of the landmark points can be used within the spirit of embodiments of the present invention, provided that the data capacity that the encoded graphic 34 can record is not exceeded.
In an alternative embodiment, in the encoded graphic 34, the lattice of data points includes a data points, which are distributed in the b × c lattice area around the positioning ring 33; wherein, the positioning ring 33 occupies the center d × e point of the lattice area; wherein d >1, e >1, b > d, b > e, c > d, c > e, a > b, a > c. For example, as shown in fig. 3 and 4, in the coded graph 34 of the embodiment of the present invention, the lattice of data points includes 192 data points, and the 192 data points are distributed in a 16 × 16 lattice area around the positioning ring 33. Wherein the positioning ring 33 occupies a central 8 x 8 spot of the lattice area. The 8 × 8 dot at the center of the dot matrix area is not included in the encoding pattern 34.
In an optional embodiment, the a data points are arranged to form f data code words and g error correction code words, and each code word is binary h bits; wherein, the calibration information of the characteristic point is recorded in f data code words; the error correction code word is used for carrying out error correction decoding on the data code word; wherein f >1, g > f, h >1, and a ═ f + g × h. For example, in an alternative embodiment, 192 data points are arranged to form 6 data codewords and 18 error correction codewords, each codeword being a binary 8-bit. In practice, the error correction code word is used for correcting any error code word which does not exceed the error correction capacity, and the error code word may be a data code word or an error correction code word itself, so that, in an optional embodiment, the error correction code word is used for performing error correction decoding on all code words including the data code word and the error correction code word itself.
In an alternative embodiment, when the calibration information of the marker points of the graphic code unit 3 is the calibration index coordinates of the marker points of the graphic code unit 3 in all the feature points in the calibration board and the physical distance between adjacent feature points in the calibration board, the decimal converted contents of the f data codewords include: the column sequence number and the row sequence number of the marking points of the graphic code unit 3 belonging to the dot matrix in all the characteristic points, and the physical distance between the adjacent characteristic points in the calibration plate. For example, for the index coordinates of the mark points of the graphic code unit 3 in all the feature points in the calibration board and the calibration information of the feature points of the physical distance between adjacent feature points in the calibration board, the encoding scheme of the encoding graph 34 is as follows:
the format of 6 data code words is XXYZZZZZZZZZZZZZZ after conversion into decimal system. Wherein XXYY is an index coordinate of the mark points of the graphic code unit to which the matrix belongs in all the feature points in the calibration board, XX represents the column sequence number of the mark points of the graphic code unit 3 to which the matrix belongs in all the feature points, YY represents the row sequence number of the mark points of the graphic code unit 3 to which the matrix belongs in all the feature points, and the value ranges of XX and YY are 0 to 99 (decimal). Zzzzzzzzzz represents the physical spacing between adjacent feature points in a calibration plate, ranging from 0 to 99999999, representing physical dimensions ranging from 0 to 9.9999999 meters that can cover the checkerboard specification range of standard plates commonly used in the industry.
In alternative embodiments, other encoding schemes may be used for encoding pattern 34. For example, for the calibration information of the feature points of the physical coordinates of the marking points of the graphic code unit 3 in the calibration board, the physical coordinate information of the marking points of the graphic code unit 3 in the calibration board can be recorded in 6 data code words.
In one embodiment, the reading order of the data points in the encoded pattern 34 for embodiments of the present invention is: starting from the top left corner of the matrix, the data points of each row are read in left-to-right, top-to-bottom order, i.e., the data points of the first row are read first from left to right, then the data points of the second row from left to right, and so on, until the data points of the last row are read from left to right. Since the positioning ring 33 occupies the center 8 × 8 dots of the dot matrix area in the embodiment of the present invention, the positioning ring 33 will divide the middle eight rows of data points in the data dot matrix of the code pattern 34 into left and right portions, and when reading each row of data points in the eight rows of data points, first, the data points in the left portion of the positioning ring 33 in the row are read from left to right, and then, the positioning ring 33 is skipped and the data points in the right portion of the positioning ring 33 in the row are read from left to right.
As described above, in the embodiment of the present invention, 192 data points are arranged to form 6 data codewords and 18 error correction codewords, in other embodiments, different numbers of data codewords and error correction codewords may be selected according to needs, and in other alternative embodiments, in the encoding pattern 34, the number of data points in the matrix formed by the data points is not limited to 192, the data points surround the positioning ring 33 and are not limited to the lattice area distributed in 16 × 16, and the size of the lattice area in the encoding pattern 34 and the number of data points may be adjusted according to needs to record more or less information.
In an alternative embodiment, in the encoded graphic 34, if the determined number of data code words is k and the number of error correction code words is 2t, the calculation formula of the length of the outer peripheral edge of the directional box 32 is:
Figure BDA0002120894840000121
where a is the length of the outer periphery of the orientation frame 32, m is the diameter (circle) or length of the side (square) of the positioning ring 33, p is the width of the orientation frame 32, q is the width of the dead space 31 between the positioning ring 33 and the code pattern 34 and between the code pattern 34 and the orientation frame 32, and ceil () represents the smallest integer greater than the variable in parentheses. m, p, q all use the side length of the region occupied by one data point in the code pattern 34 as the basic unit, k and t also use the side length of the region occupied by one data point in the code pattern 34 as the basic unit, so the size of the side length a of the outer periphery of the orientation frame 32 obtained also uses the size of one data point in the code pattern 34 as the basic unit, 8(k +2t) represents the size (area) of the region occupied by the code pattern 34, since each data code word and each error correction code word are 8-bit binary numbers, the above formula adopts the calculation method of 8(k +2t) for the code pattern 34 part, in the aforementioned embodiment that 192 data points are arranged to form 6 data code words and 18 error correction code words, 8(k +2t) is equal to the size of 192 data points, i.e. 8 x (6+18) is equal to 192.
The above is the size relationship when the graphic code unit is square.
To generalize further, if the area of the code pattern 34 is a general rectangle with a width x and a height y, that is, the width x and the height y of the outer periphery of the code pattern 34, the code pattern 34 should satisfy the following equations (1) to (3):
x·y≥(m+2q)2+8(k+2t) (1)
x≥m+2q (2)
y≥m+2q (3)
if the width and height of the outer periphery of the orientation frame 32 are w and h, the width and height of the outer periphery of the orientation frame 32 are the width and height of the outer periphery of the encoded pattern 34 plus the width of the quiet zone and the width of the orientation frame 32, and the calculation formula is:
w=x+2p+2q
h=y+2p+2q
wherein x, y, w, h are all the basic units of the size of one data point in the encoding graph 34.
The above is the size relationship when the graphic code unit is a general rectangle except a square.
It can be seen from the above formula that, taking the size of a data point in the encoded graph 34 as a basic unit, when the size of a data point in the encoded graph 34 is determined, the size of each part in the graph code unit 3 related to the above formula can be determined.
In the embodiment of the invention, when data coding is carried out, two decimal digits are taken as a group and are converted into binary digits for coding. After each group of two-digit decimal number codes are finished, bit streams are sequentially arranged to form data codes. After the data is encoded, the error correction encoding is performed by using Reed-Solomon (Reed Solomon) codes, but other conventional error correction encoding methods may be used.
In order to prevent the same color data points from aggregating and possibly affecting decoding, in the embodiment of the present invention, the encoded pattern 34 is processed by using a data mask matrix adapted to the encoded pattern 34, where the mask formula of the data mask matrix is:
mask=(row+col)%2
where mask is a mask value, row is a matrix row number in the encoded pattern 34, and col is a matrix column number in the encoded pattern 34. And performing exclusive or operation on the mask value and the coding value at the corresponding position to obtain a final coding result, and writing the final coding result into the matrix to form a final coding pattern 34.
The advantage of performing the exclusive or operation on the encoded pattern 34 by using the data mask matrix is that when the encoded region is large, the black and white block aggregation can be reduced, and the segmentation efficiency during decoding can be improved.
The decoding process corresponding to the above-described encoding is as follows.
Reading the data points in the above description in the reading sequence of the data points from the upper left corner of the matrix of the encoded graph 34 until all 192 data points in the encoded graph 34 are read, obtaining a reading result, performing exclusive-or operation on the reading result by using the data mask matrix to obtain an initial decoding, performing Reed-Solomon error correction decoding on the initial decoding, if the error value of the error correction decoding does not exceed a set threshold (e.g. 9), indicating that the original encoded code word can be correctly recovered, and then outputting a decoding result, wherein the decoding result is a correct code word. If the error value sets a threshold value (such as 9), the decoding fails, and a decoding failure prompt is returned.
The embodiment of the invention also provides a calibration method, as shown in fig. 5, which mainly comprises the following steps:
step 1, shooting a calibration plate image containing the calibration plate in any one of the embodiments, and extracting calibration plate information from the calibration plate image;
and 2, calibrating according to the extracted calibration plate information.
The calibration plate in the embodiment of the present invention is the calibration plate described in the above embodiment, and specifically, as shown in fig. 1, fig. 2, fig. 3, and fig. 4, the calibration plate includes a substrate 1, a feature pattern 2, and a graphic code unit 3. Wherein, the characteristic pattern 2 is printed on the surface of the substrate 1, and the characteristic pattern 2 has a plurality of characteristic points. Graphic code units 3 are printed on the substrate 1, and the graphic code units 3 are surrounded by the characteristic patterns 2. The graphic code unit 3 comprises a quiet zone 31, an orientation frame 32, a positioning ring 33 and a coded graphic 34. Wherein the orientation frame 32 is embedded in the quiet zone 31. The positioning ring 33 is located in the center of the inner area of the orientation frame 32. The code pattern 34 is located in the inner area of the orientation frame 32 and distributed around the positioning ring 33, and the code pattern 34 records the calibration information of the mark points of the graphic code unit 3, wherein the mark points coincide with one of the feature points in the feature pattern 2.
In the single-camera machine vision application, since only the relationship between a single camera and a measured object (a photographed object) needs to be calibrated (the relationship is usually an affine transformation matrix), the number of graphic code units in the calibration board only needs to be one. In the application of multiple-camera machine vision, because the application field of vision is large, the relationship between multiple cameras and the object to be measured (object to be photographed) needs to be calibrated, or the relationship between multiple cameras needs to be calibrated, and then a plurality of graphic code units need to be arranged in the calibration board. Before application, the number and the position of the graphic code units, the information carried by the graphic code units, and the specification information such as the size of a calibration board need to be determined. Then, the appropriate calibration plate is made.
In camera calibration applications, the pose of a calibration plate describes how the calibration plate is displayed in the camera when there is relative motion between the calibration plate and the camera. In some machine vision applications of cameras, it is necessary to calibrate a coordinate relationship between the camera and a moving object to be measured (object to be photographed), which is called hand-eye calibration. In hand-eye calibration, the calibration plate is placed at a plurality of different poses, whereby the poses of the camera and the calibration plate in the moving coordinate system can be determined. In other machine vision applications, there is no moving object to be measured (object to be photographed), and thus there is no need to calibrate the coordinate relationship between the camera and the moving object to be measured (object to be photographed), which is called non-hand-eye calibration. At this time, the calibration plate may adopt only one pose.
In an alternative embodiment, the extracting of the calibration plate information from the calibration plate image in step 1 includes:
step 11, searching a graphic code unit in a calibration board image, and reading calibration information of a mark point of the graphic code unit recorded by a coded graph in the graphic code unit;
step 12, searching for the feature points in the calibration board image, obtaining the pixel coordinates of each feature point in the calibration board image, and determining the image index coordinates of each feature point in the calibration board image according to the pixel coordinates of each feature point in the calibration board image, wherein the image index coordinates refer to: index coordinates in only a part of feature points captured in the calibration plate image are obtained from the calibration plate image.
And step 13, correcting the image index coordinates and the physical coordinates of each characteristic point in the calibration plate image according to the calibration information of the marking points of the graphic code unit.
In an alternative embodiment, step 11 and step 12 do not have a certain sequential execution order, and step 11 may be executed first and then step 12 may be executed, or step 12 may be executed first and then step 11 may be executed.
In an alternative embodiment, the direction information of the graphic code unit is determined by the direction of the orientation box in step 11.
In an alternative embodiment, the step 11 of finding the graphic code unit in the calibration board image and reading the calibration information of the mark points of the graphic code unit recorded in the encoded graph in the graphic code unit includes:
step 111, searching a directional frame of the graphic code unit in the calibration board image to obtain direction information of the directional frame, and taking the direction information of the directional frame as the direction information of the graphic code unit;
step 112, searching for a mark point of the graphic code unit in the calibration board image, determining a pixel coordinate of the mark point of the graphic code unit in the calibration board image, and determining an image index coordinate of the mark point in all the feature points in the calibration board image according to the pixel coordinate of the mark point in the calibration board image and the pixel coordinate of each feature point in the calibration board image;
step 113, determining the area of the coded graph according to the positions of the orientation frame and the positioning ring in the graph code unit in the calibration board image;
and step 114, reading the coding graph to obtain the calibration information of the mark points of the graph code unit recorded in the coding graph.
Referring to the description of the embodiment of the calibration board and the structures of the graphic code units shown in the drawings, in a preferred embodiment, the graphic code units are squares, wherein any one corner point of the square graphic code unit is a mark point of the graphic code unit, and the mark point of the graphic code unit is coincident with any one feature point in the feature pattern; or the central point of the positioning ring is a marking point of the graphic code unit, and the marking point of the graphic code unit is superposed with any one characteristic point in the characteristic pattern.
In an alternative embodiment, the execution process of finding the oriented box of the graphic code unit in step 111 is as follows:
firstly, carrying out image binarization processing on a calibration plate image; and then, searching a connected domain of the binarized calibration plate image, screening out the orientation frames according to the area and perimeter information of the connected domain, and obtaining the number of the orientation frames and the position and the direction of each orientation frame. The direction of the orientation frame is used as the direction of the graphic code unit.
In an optional embodiment, in step 112, if the central point of the positioning ring is the mark point of the graphic code unit, the position of the central point of the positioning ring may be determined by a connected domain analysis algorithm, so as to obtain coordinate information of the mark point of the graphic code unit in the calibration board image. In an optional embodiment, in step 112, if any one of the corner points of the graphic code unit is a mark point of the graphic code unit, after the positioning frame is screened out, the corner point of the graphic code unit may be determined by using an intersection point of an edge of the positioning frame, for example, if the mark point of the graphic code unit is an upper left corner point of the graphic code unit, a corner point of the graphic code unit outside the intersection point of the upper left corner of the edge of the positioning frame is determined as the corner point of the graphic code unit, and after the mark point of the graphic code unit is determined, coordinate information of the mark point of the graphic code unit in the calibration board image may be obtained.
In an alternative embodiment, the obtaining of the calibration information of the mark points of the graphic code unit described in the encoded graphic in step 114 includes:
carrying out binarization processing on the coded graphic unit;
acquiring binary information recorded by a coding graph unit from the initial position of a coding graph;
according to the coding scheme of the coding graph, obtaining coding information of the coding graph from binary information recorded by the coding graph unit;
and carrying out error correction decoding on the coded information, and if the error value of the error correction decoding is less than a preset threshold value, taking the decoding result as the calibration information of the mark point of the graphic code unit, wherein the error correction decoding is RS (Reed Solomon) error correction decoding.
In a preferred embodiment, when obtaining the coding information of the coding pattern from the binary information described in the coding pattern unit, the obtained binary information and the data mask matrix are subjected to bit exclusive or to obtain pre-mask information, and the coding information of the coding pattern is obtained from the pre-mask information.
In an alternative embodiment, the coding scheme for the coding pattern can be seen from the description above with respect to the embodiment of the calibration plate.
In an alternative embodiment, step 12 may specifically include:
the image edge of the characteristic pattern is extracted through a Canny edge detection operator, then straight lines in the edge image are extracted through a Hough algorithm, and the pixel coordinates of the corner points (namely the characteristic points) of the characteristic pattern are determined through the intersection points of the straight lines. The corner index coordinates of the feature pattern are denoted (x, y), where x denotes the column direction and y denotes the row direction. For example, the index coordinates of the corner point (feature point) of the feature pattern closest to the upper left corner of the image are set to (0, 0); then, coordinate indexes are given to each corner point (feature point) from left to right and from top to bottom in sequence. In step 12, the obtained coordinate information of the feature point in the calibration board image includes the pixel coordinate of the feature point and the image index coordinate of the feature point.
In an optional embodiment, when the calibration information of the mark points of the graphic code unit is the calibration index coordinates of the mark points of the graphic code unit in all the feature points in the calibration board and the physical distance between adjacent feature points in the calibration board, the step 13 of correcting the image index coordinates and the physical coordinates of each feature point in the calibration board image according to the calibration information of the mark points of the graphic code unit includes:
step 131, establishing a mapping relation from the image index coordinate to the calibration index coordinate according to the image index coordinate and the calibration index coordinate of the mark point;
step 132, transforming the image index coordinates of all the feature points in the calibration plate image into calibration index coordinates by using the mapping relation;
and step 133, obtaining the physical coordinates of each feature point in the calibration plate image according to the calibration index coordinates of each feature point in the calibration plate image and the physical distance between adjacent feature points.
Fig. 6 shows a schematic diagram of the coordinate derivation in relation to the calibration plate. In the embodiment shown in fig. 6, the graphic code units 3 all occupy four basic feature unit patterns, the central point of the positioning ring in the graphic code unit 3 is a mark point of the graphic code unit 3, and the mark point coincides with a feature point at the position, that is, the coordinate of the mark point is the coordinate of the feature point. In the embodiment shown in fig. 6, the calibration index coordinate of the center point of the positioning ring of the graphic code unit 3 is (0,0), which is read from the encoded graphic in the graphic code unit 3, the pixel coordinate of the center point of the positioning ring of the graphic code unit 3 (i.e., the coordinate of the mark point in the calibration board image) is (300 ), and the pixel coordinate of the feature point in the dashed line frame at the right of the graphic code unit 3 (i.e., the coordinate of the feature point in the calibration board image) is (500,300), wherein the pixel coordinate of the center point of the positioning ring of the graphic code unit 3 and the pixel coordinate of each feature point are obtained by looking up the graphic code unit 3 in the calibration board image in steps 11 and 12. In step 12, after obtaining the pixel coordinates of each feature point in the calibration board image, the image index coordinates of each feature point in the calibration board image are determined according to the pixel coordinates of each feature point in the calibration board image, for example, as shown in fig. 6, the pixel coordinates of the feature point at the uppermost left corner obtained are (0,0) and the image index coordinates of the feature point at the uppermost left corner are (0,0), then the image index coordinates of each feature point in the calibration board image are determined according to the pixel coordinates of each feature point in the calibration board image, for example, the pixel coordinates of the center point of the positioning ring of the graphic code unit 3 (i.e., the coordinates of the mark point in the calibration board image) are (300), and the pixel coordinates of each feature point in the calibration board image can be known, the feature point of the positioning ring of the graphic code unit 3 whose center point is located at the uppermost left corner (the image index coordinates are (0,0) three feature points on the lower side and located on the right side of the feature point on the leftmost upper corner, and further the image index coordinates of the center point of the positioning ring of the graphic code unit 3 are (3,3), for example, the pixel coordinates of the feature point (hereinafter referred to as the first feature point) in the dashed line frame on the right side of the graphic code unit 3 in fig. 6 are (500,300), the pixel coordinates of each feature point in the calibration plate image are known, the pixel coordinates of the first feature point is located on the lower side of the three feature points on the leftmost upper corner (the image index coordinates are (0,0)) and located on the five feature points on the right side of the feature point on the leftmost upper corner, and further the image index coordinates of the first feature point are (5,3), for example, the pixel coordinates of the feature point (hereinafter referred to as the second feature point) in the dashed line frame on the upper left side of the graphic code unit 3 in fig. 6 are known, and further, the pixel coordinates of each feature point in the calibration plate image are known, the second feature point is located at one feature point position on the lower side of the feature point (image index coordinate is (0,0)) at the uppermost left corner and one feature point position on the right side of the feature point at the uppermost left corner, and further the image index coordinate of the second feature point is (1, 1). Through step 12, it can be known that the image index coordinate of the central point (mark point) of the positioning ring of the graphic code unit 3 is (3,3), the image index coordinate of the first feature point is (5,3), the image index coordinate of the second feature point is (1,1), etc., through step 11, it can be known that the calibration index coordinate of the central point (mark point) of the positioning ring of the graphic code unit 3 is (0,0), and then in step 131, according to the image index coordinate (3,3) and the calibration index coordinate (0,0) of the mark point, a mapping relationship from the image index coordinate to the calibration index coordinate is established as follows:
x’=x+ox
y’=y+oy
wherein, (x ', y') is a calibration index coordinate of the feature point, (x, y) is an image index coordinate of the feature point, and ox and oy are offsets in the x direction and the y direction respectively. In the embodiment shown in fig. 6, as can be seen from the image index coordinates (3,3) and the calibration index coordinates (0,0) of the mark points, there are mark points for which
0=3+ox
0=3+oy
It can be found that ox is-3 and oy is-3. Then, in step 132, the image index coordinates (5,3) of the first feature point and the mapping relation can obtain the calibration index coordinates of the first feature point as
x’=5-3=2
y’=3-3=0
Namely, the calibration index coordinate of the first feature point is (2,0), and similarly, the calibration index coordinate of the second feature point can be deduced to be (-2, -2), and the calibration index coordinates of other feature points can be deduced by the method.
In step 133, the calibration index coordinates of each feature point and the physical distance between adjacent feature points are simply multiplied to obtain the physical coordinates of each feature point in the calibration board image. For example, if the physical distance between adjacent feature points is 10mm, the physical coordinates of the center point (mark point) of the positioning ring of the graphic code unit 3 are (0,0), the physical coordinates of the first feature point are (20mm,0), the physical coordinates of the second feature point are (-20mm ), and so on.
In an alternative embodiment, when the calibration information of the mark point of the graphic code unit is the physical coordinate of the mark point of the graphic code unit in the calibration board, the step 13 of correcting the image index coordinate and the physical coordinate of each feature point in the calibration board image according to the calibration information of the mark point of the graphic code unit includes:
step 131', receiving the physical distance between the adjacent feature points in the calibration board input by the user;
step 132', obtaining the physical coordinates of all the feature points in the calibration board according to the physical coordinates of the mark points of the graphic code unit in the calibration board and the physical distance between the adjacent feature points in the calibration board.
Here, only the conversion relationship between the physical coordinates is involved, and the content of step 132' can be realized by combining the above description with a general coordinate conversion technology, and will not be described herein again.
The calibration board of the embodiment of the present invention is applicable to the calibration of a machine vision application system of multiple cameras, as shown in fig. 7, wherein, although 4 cameras are depicted in fig. 7, the machine vision application system can use fewer or more cameras to photograph the same scene. There may or may not be an overlapping region of the field of view of each camera, as shown by the dashed regions in fig. 7. Even machine vision applications may use only one camera.
Fig. 8 shows a process of multi-camera calibration using the calibration plate of the embodiment of the invention, including:
step a, determining the size of a calibration plate to be manufactured, manufacturing the calibration plate, and then entering the step b;
b, determining the pose of the calibration plate, and then entering the step c;
step c, placing the calibration plate on the determined pose, and then entering step d;
d, the camera captures the image of the calibration plate, and then the step e is carried out;
e, positioning the calibration plate in the captured calibration plate image to obtain calibration plate information, and then entering f;
f, judging whether the cameras are traversed or not, namely judging whether all the cameras finish the step d and the step e or not, if so, entering the step g, and otherwise, returning to the step d;
step g, judging whether the pose of the calibration plate is moved completely, if so, entering the step i, otherwise, entering the step h;
h, moving the calibration plate to the next pose, and then returning to the step b;
and i, calibrating.
In an optional embodiment, the calibration process includes hand-eye calibration and non-hand-eye calibration, which can be implemented by using the prior art and are not described herein again.
In the embodiment of the present invention, the encoding pattern 34 shown in each drawing is only a schematic illustration and does not represent encoded data actually described therein.
The following is supplementary description about the exclusive or operation in the embodiment of the present invention.
In the encoding process, the real data to be recorded in the encoding graph and the data mask matrix are subjected to exclusive-or operation to obtain the encoding matrix graph which avoids the black and white aggregation condition, in the decoding process, the encoding graph is subjected to exclusive-or operation with the data mask matrix, and the data mask matrix adopted in the encoding process is the same as the data mask matrix adopted in the decoding process, because the exclusive-or operation follows the following combination law:
Figure BDA0002120894840000191
therefore, if a is defined as a data mask matrix and b is defined as real data to be recorded in the encoded pattern at the time of encoding, the equation in the left side is as follows
Figure BDA0002120894840000192
It means that the real data and the data mask matrix are subjected to exclusive or operation during encoding, if the actual data and the data mask matrix are to be subjected to exclusive or operation
Figure BDA0002120894840000193
If the result of (2) is defined as c, then c is the encoded pattern that avoids the black and white clusteringThen the left side of the above equation is
Figure BDA0002120894840000194
And the right side of the upper type
Figure BDA0002120894840000195
The xor operation of the encoded pattern with the data mask matrix is shown as decoding.
From the above two formulas
Figure BDA0002120894840000196
As known to those skilled in the art, the XOR value of the same values is 0, i.e., in the above formula
Figure BDA0002120894840000197
Then there is
Figure BDA0002120894840000198
While those skilled in the art will appreciate that 0 is exclusive-ored with a non-zero number, then if b is a non-zero number then there is
Figure BDA0002120894840000199
Since b is defined as data to be recorded in the encoded pattern during encoding, it can be seen from the above formula that, during decoding, the original real data during encoding can be obtained by performing an exclusive or operation on the encoded pattern and a data mask matrix (the same as the data mask matrix used during encoding).
Therefore, in the preferred embodiment, the same data mask matrix is used to perform the exclusive or operation on the real data to be recorded in the encoded pattern and the encoded pattern during the encoding process and the decoding process, respectively, so that the original encoded information recorded in the encoded pattern can be obtained during decoding.
An embodiment of the present invention further provides an electronic device, a structure of which can be seen in fig. 9, where the electronic device includes: at least one processor 41; and a memory 42 communicatively coupled to the at least one processor 41; wherein the memory 42 stores instructions executable by the at least one processor 41, the instructions being executable by the at least one processor 41 to cause the at least one processor 41 to perform the steps of the calibration method as described in any one of the embodiments above.
An embodiment of the present invention further provides a non-volatile computer-readable storage medium, which stores instructions, and is characterized in that the instructions, when executed by a processor, cause the processor to execute the steps in the calibration method according to any one of the above embodiments.
According to the calibration board, the calibration method, the electronic device and the nonvolatile computer readable storage medium, the graphic code unit containing the direction information and the calibration information is embedded in the characteristic pattern of the calibration board, the calibration board calibrated by adopting a two-dimensional code is replaced, and the cost required by adopting two-dimensional code generation software is saved. Meanwhile, the calibration information of the feature points in the calibration plate is recorded by the graphic code unit embedded in the calibration plate, so that the index coordinates of the feature points and the physical distance information between adjacent feature points or the physical coordinate information of the feature points in the calibration plate can be directly obtained from the calibration plate image when the camera is calibrated, the manual input of the related information of the calibration plate is not needed, the automatic calibration of the camera is realized, and the calibration efficiency and the calibration accuracy are improved. In the embodiment of the invention, the orientation frame contained in the graphic code unit can provide the direction information of the coded graphic in the graphic code unit and also can provide the direction information of the calibration board, thereby realizing the multiplexing of the direction of the coded graphic and the direction of the calibration board at the same time. In the embodiment of the invention, the mark point of the graphic code unit can be any angular point of the graphic code unit or the central point of the positioning ring of the graphic code unit, and the size of the graphic code unit can be flexibly set and can be smaller than or equal to or larger than the characteristic pattern of the calibration board, so that the position and the size of the graphic code unit in the calibration board can be flexibly set. In the preferred embodiment of the present invention, the coding pattern in the pattern code unit includes a data code word and an error correction code word, the coding and decoding scheme adopts an RS coding and decoding scheme, and the xor processing is performed on the binary information recorded in the coding pattern unit during decoding, so as to improve the decoding accuracy.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (22)

1. A calibration plate, comprising:
a substrate;
a feature pattern printed on a surface of the substrate and having a plurality of feature points therein;
it is characterized in that the calibration plate further comprises:
the graphic code unit is printed on the substrate and is surrounded by the characteristic pattern; wherein the content of the first and second substances,
the graphic code unit includes:
a quiet zone;
a directional frame embedded in the quiet zone;
a positioning ring, wherein the positioning ring is positioned at the center of the inner area of the orientation frame; and
and the coding patterns are positioned in the inner area of the orientation frame and distributed around the positioning ring, and the coding patterns record the calibration information of the mark points of the pattern code unit, wherein the mark points are superposed with one characteristic point in the characteristic pattern.
2. Calibration plate according to claim 1, characterized in that:
the graphic code unit is a rectangle, and any angular point of the rectangle is a mark point of the graphic code unit;
or the central point of the positioning ring is a mark point of the graphic code unit.
3. The calibration plate of claim 1, wherein the pattern of features is:
a checkerboard pattern, a dot pattern, or a hexagonal pattern; wherein the content of the first and second substances,
when the characteristic pattern is a checkerboard pattern, the characteristic points are corner points of each checkerboard;
when the characteristic pattern is a dot pattern, the characteristic point is the central point of each dot;
when the feature pattern is a hexagonal pattern, the feature points are corner points of each hexagon.
4. Calibration plate according to claim 1, characterized in that:
the feature pattern is composed of a plurality of basic feature cell patterns, which are equal in size and arranged at equal intervals.
5. Calibration plate according to claim 1, characterized in that:
the number of the graphic code units in the calibration plate is at least one, the coding graph in each graphic code unit is used for recording the calibration information of the mark points of the graphic code unit, and the calibration information of the mark points of the graphic code unit is used for determining the position coordinates of the feature points in the calibration plate.
6. Calibration plate according to claim 1, characterized in that:
the directional frame is formed by sequentially connecting a first rectangular strip, a second rectangular strip, a third rectangular strip and a fourth rectangular strip on the outer side of the coded graph, and an opening is formed between the fourth rectangular strip and the first rectangular strip.
7. Calibration plate according to claim 1, characterized in that:
the retaining ring takes a shape that is different from the shape of the data points in the encoded pattern.
8. Calibration plate according to claim 1, characterized in that:
the coding graph is a lattice formed by data points;
the data points include two color data points that are distinguished from each other, where a data point of one color represents a 0 and a data point of the other color represents a 1.
9. The calibration board according to claim 1, wherein the calibration information of the marking points of the graphic code unit comprises:
the calibration index coordinates of the marking points of the graphic code unit in all the characteristic points in the calibration plate and the physical distance between the adjacent characteristic points in the calibration plate are as follows: index coordinates of the marking points recorded in the graphic code unit in all feature points in a calibration board;
alternatively, the first and second electrodes may be,
and the physical coordinates of the marking points of the graphic code unit in the calibration plate.
10. Calibration plate according to claim 8, characterized in that:
the lattice comprises a data points, and the a data points are distributed in a b multiplied by c lattice area around the positioning ring;
wherein the positioning ring occupies the central dxe point of the lattice area;
wherein d >1, e >1, b > d, b > e, c > d, c > e, a > b, a > c.
11. Calibration plate according to claim 10, characterized in that:
the a data points are arranged to form f data code words and g error correction code words, and each code word is binary h bits; wherein the content of the first and second substances,
the calibration information of the characteristic points is recorded in the f data code words;
the error correction code word is used for carrying out error correction decoding on the data code word;
wherein f >1, g > f, h >1, and a ═ f + g × h.
12. The calibration plate according to claim 11, wherein when the calibration information of the marker points of the graphic code unit is the calibration index coordinates of the marker points of the graphic code unit in all the feature points in the calibration plate and the physical distance between adjacent feature points in the calibration plate, the decimal-converted contents of the f data codewords comprise: the column sequence number and the row sequence number of the marking points of the graphic code unit to which the dot matrix belongs in all the characteristic points, and the physical distance between the adjacent characteristic points in the calibration plate.
13. A calibration method, comprising:
taking a calibration plate image containing a calibration plate according to any one of claims 1 to 12 and extracting calibration plate information from the calibration plate image;
and performing calibration processing according to the extracted calibration plate information.
14. The calibration method according to claim 13, wherein said extracting calibration plate information from said calibration plate image comprises:
searching the graphic code unit in the calibration board image, and reading calibration information of the mark points of the graphic code unit recorded by the coding graph in the graphic code unit;
searching the characteristic points in the calibration plate image, obtaining the pixel coordinates of each characteristic point in the calibration plate image, and determining the image index coordinates of each characteristic point in the calibration plate image according to the pixel coordinates of each characteristic point in the calibration plate image, wherein the image index coordinates refer to: index coordinates in only part of the feature points photographed in the calibration plate image obtained from the calibration plate image;
and correcting the image index coordinates and the physical coordinates of each characteristic point in the calibration plate image according to the calibration information of the marking points of the graphic code unit.
15. The calibration method according to claim 14, wherein the searching for the graphic code unit in the calibration board image and reading the calibration information of the mark points of the graphic code unit recorded in the encoded graph in the graphic code unit comprises:
searching the orientation frame of the graphic code unit in the calibration board image to obtain the direction information of the orientation frame, and taking the direction information of the orientation frame as the direction information of the graphic code unit;
searching for a mark point of the graphic code unit in the calibration board image, determining a pixel coordinate of the mark point of the graphic code unit in the calibration board image, and determining an image index coordinate of the mark point in all feature points in the calibration board image according to the pixel coordinate of the mark point in the calibration board image and the pixel coordinate of each feature point in the calibration board image;
in the calibration board image, determining the area of the coded graph according to the positions of an orientation frame and a positioning ring in the graph code unit;
and reading the coding graph to obtain the calibration information of the mark points of the graph code unit recorded by the coding graph.
16. The calibration method according to claim 14, wherein when the calibration information of the marker points of the graphic code unit is the calibration index coordinates of the marker points of the graphic code unit in all the feature points in the calibration board and the physical distance between adjacent feature points in the calibration board, the correcting the image index coordinates and the physical coordinates of the feature points according to the calibration information of the marker points of the graphic code unit comprises:
establishing a mapping relation from the image index coordinate to the calibration index coordinate according to the image index coordinate and the calibration index coordinate of the mark point;
transforming the image index coordinates of all the characteristic points in the calibration plate image into calibration index coordinates by using the mapping relation;
and obtaining the physical coordinates of each characteristic point in the calibration plate image according to the calibration index coordinates of each characteristic point in the calibration plate image and the physical distance between adjacent characteristic points.
17. The calibration method according to claim 14, wherein when the calibration information of the mark points of the graphic code unit is the physical coordinates of the mark points of the graphic code unit in the calibration board, the correcting the image index coordinates and the physical coordinates of the feature points according to the calibration information of the mark points of the graphic code unit comprises:
receiving physical intervals between adjacent feature points in a calibration board input by a user;
and acquiring the physical coordinates of all the characteristic points in the calibration board according to the physical coordinates of the marking points of the graphic code unit in the calibration board and the physical distance between the adjacent characteristic points in the calibration board.
18. The calibration method according to claim 15, wherein obtaining calibration information of the marker points of the graphic code unit recorded in the encoded graphic comprises:
carrying out binarization processing on the coded graphic unit;
acquiring binary information recorded by the coding graph unit from the initial position of the coding graph;
according to the coding scheme of the coding graph, obtaining coding information of the coding graph from binary information recorded by the coding graph unit;
and carrying out error correction decoding on the coding information, and if the error value of the error correction decoding is less than a preset threshold value, taking the decoding result as the calibration information of the mark point of the graphic code unit.
19. The calibration method according to claim 18, wherein:
when the coding information of the coding graph is obtained from the binary information recorded by the coding graph unit, firstly, the obtained binary information and a data mask matrix are subjected to bit exclusive or processing to obtain pre-mask information, and the coding information of the coding graph is obtained from the pre-mask information.
20. The calibration method according to claim 18, wherein:
the error correction decoding is reed solomon RS error correction decoding.
21. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the calibration method as claimed in claim 13.
22. A non-transitory computer readable storage medium storing instructions which, when executed by a processor, cause the processor to perform the steps in the calibration method of claim 13.
CN201910606545.XA 2019-07-05 2019-07-05 Calibration plate and calibration method Active CN112184803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910606545.XA CN112184803B (en) 2019-07-05 2019-07-05 Calibration plate and calibration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910606545.XA CN112184803B (en) 2019-07-05 2019-07-05 Calibration plate and calibration method

Publications (2)

Publication Number Publication Date
CN112184803A true CN112184803A (en) 2021-01-05
CN112184803B CN112184803B (en) 2024-02-02

Family

ID=73918776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910606545.XA Active CN112184803B (en) 2019-07-05 2019-07-05 Calibration plate and calibration method

Country Status (1)

Country Link
CN (1) CN112184803B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114299172A (en) * 2021-12-31 2022-04-08 广东工业大学 Planar coding target for visual system and real-time pose measurement method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106600648A (en) * 2016-12-06 2017-04-26 合肥工业大学 Stereo coding target for calibrating internal parameter and distortion coefficient of camera and calibration method thereof
CN107689061A (en) * 2017-07-11 2018-02-13 西北工业大学 Rule schema shape code and localization method for indoor mobile robot positioning

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106600648A (en) * 2016-12-06 2017-04-26 合肥工业大学 Stereo coding target for calibrating internal parameter and distortion coefficient of camera and calibration method thereof
CN107689061A (en) * 2017-07-11 2018-02-13 西北工业大学 Rule schema shape code and localization method for indoor mobile robot positioning

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114299172A (en) * 2021-12-31 2022-04-08 广东工业大学 Planar coding target for visual system and real-time pose measurement method thereof
CN114299172B (en) * 2021-12-31 2022-07-08 广东工业大学 Planar coding target for visual system and real-time pose measurement method thereof
US11699244B2 (en) 2021-12-31 2023-07-11 Guangdong University Of Technology Planar coding target for vision system and real-time pose measurement method thereof

Also Published As

Publication number Publication date
CN112184803B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
JP4564813B2 (en) Two-dimensional barcode and code decoding method thereof
CN112184826B (en) Calibration plate and calibration method
JP6254548B2 (en) High capacity 2D color barcode and method for decoding high capacity 2D color barcode
JP2005267598A5 (en)
TW201428635A (en) Two-dimensional code
TWI574209B (en) Two - dimensional code, two - dimensional code of the analytical system
TWI501159B (en) QR code
EP3561729B1 (en) Method for detecting and recognising long-range high-density visual markers
WO2021004414A1 (en) Coding pattern, coding and reading methods for same, calibration board, and calibration method
CN111046996B (en) Color QR code generation and identification method
JP2007079781A (en) Two-dimensional code division display method, two-dimensional code reading method and two-dimensional code reader
WO2015174192A1 (en) Two-dimensional code, two-dimensional-code analysis system, and two-dimensional-code generation system
CN111275152A (en) Two-dimensional code, encoding method and decoding method of two-dimensional code, decoding device of two-dimensional code and electronic system
CN112184825A (en) Calibration plate and calibration method
CN112184803B (en) Calibration plate and calibration method
JP5187383B2 (en) Two-dimensional code division display method, two-dimensional code reading method, and two-dimensional code reading apparatus
CN112187284A (en) Encoding method, encoding pattern reading method, and imaging device
CN106897758B (en) QRL code for plane continuous positioning and continuous positioning method thereof
KR20030085511A (en) 2d barcode card and its decoding method
CN110543798B (en) Two-dimensional code identification method and device
JP5187382B2 (en) Two-dimensional code division display method, two-dimensional code reading method, and two-dimensional code reading apparatus
CN112183695B (en) Coding method, coding pattern reading method, and photographing apparatus
KR20050092335A (en) Two-dimensional bar code and associated codingdecoding method
CN109934036B (en) Method and system for recognizing and reading QR (quick response) code through single-position detection graph
JP2015039153A (en) Image processing system, image reader and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: 310052 5 / F, building 1, building 2, no.700 Dongliu Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant