CN113160329B - Coding plane target for camera calibration and decoding method thereof - Google Patents
Coding plane target for camera calibration and decoding method thereof Download PDFInfo
- Publication number
- CN113160329B CN113160329B CN202110397468.9A CN202110397468A CN113160329B CN 113160329 B CN113160329 B CN 113160329B CN 202110397468 A CN202110397468 A CN 202110397468A CN 113160329 B CN113160329 B CN 113160329B
- Authority
- CN
- China
- Prior art keywords
- coding
- parallelogram
- target
- calibration
- image
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 238000003672 processing method Methods 0.000 claims abstract description 6
- 239000013598 vector Substances 0.000 claims description 124
- 108091026890 Coding region Proteins 0.000 claims description 62
- 230000007797 corrosion Effects 0.000 claims description 42
- 238000005260 corrosion Methods 0.000 claims description 42
- 238000012545 processing Methods 0.000 claims description 25
- 239000003086 colorant Substances 0.000 claims description 23
- 239000003550 marker Substances 0.000 claims description 19
- 238000004364 calculation method Methods 0.000 claims description 11
- 230000008569 process Effects 0.000 claims description 11
- 108700026244 Open Reading Frames Proteins 0.000 claims description 10
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 7
- 238000000605 extraction Methods 0.000 claims description 7
- 238000003491 array Methods 0.000 claims description 6
- 230000000717 retained effect Effects 0.000 claims description 5
- 125000004432 carbon atom Chemical group C* 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 6
- 239000007787 solid Substances 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000002679 ablation Methods 0.000 description 1
- 230000001154 acute effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30244—Camera pose
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a coding plane target for camera calibration and a decoding method thereof, wherein the coding plane target comprises a coding checkerboard which is formed by alternating parallelogram coding units and parallelogram non-coding units, and the coding plane target takes the intersection points of the parallelogram coding units which are connected by any opposite angles as calibration angular points of the coding plane target; each parallelogram coding unit in the coding plane target is provided with a coding pattern, and the coding pattern comprises a positioning pattern, an orientation pattern and a coding mark pattern; the decoding method of the coding plane target can quickly and accurately obtain the matching relation of the calibration corner sub-pixel coordinates, the corresponding calibration corner coding serial number and the corresponding calibration corner target coordinates on the coding plane target in the image through a digital image processing method; the coding plane target and the decoding method thereof provided by the invention can be used in the fields of camera internal and external parameter calibration and the like.
Description
Technical Field
The invention relates to the field of camera calibration in the field of computer vision, in particular to a coding plane target for camera calibration and a decoding method thereof, which are used for monocular camera calibration, binocular camera calibration and multi-view vision system calibration.
Background
Computer vision is widely applied to the fields of control engineering, optics, measurement and the like, the first and fundamental problems to be solved by computer vision are camera calibration, and the camera calibration is a big difficulty in the research of computer vision measurement technology; the final purpose is to solve the internal and external parameters of the camera and find the corresponding relation between the pixel coordinate and the world coordinate; camera calibration techniques have therefore received much attention and have also been rapidly developed.
In order to complete camera calibration, calibration targets are needed to be used for achieving, for example, a camera calibration algorithm based on radial constraint, which is proposed by Roger Tsai in 1896, the algorithm uses a stereo target, and although the 3D stereo target can achieve camera calibration and solve internal and external parameters of a camera, the volume of the camera calibration algorithm is large, certain flexibility is lacked, and the camera calibration algorithm is not easy to move; zhangyingyou (Z.Y Zhang) provided a camera calibration algorithm based on a planar target in 1999, and the calibration process becomes more flexible by using the planar target with a relatively simple structure, but the planar target does not contain any coding and directional information, and in the actual calibration process, the camera often cannot shoot a complete target image, and at the moment, the camera calibration cannot be carried out by using the traditional planar checkerboard target which does not contain coding information.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a coding plane target for camera calibration and a decoding method thereof, which can give a determined and unique coding number to each calibration angular point in the coding plane target, so that high-precision homonymous point matching can be still completed even if the complete coding plane target cannot be shot in the multi-target camera calibration process; in addition, each parallelogram coding unit in the coding plane target contains respective coding information and is independent, and compared with a directional target, the coding plane target provided by the invention has stronger robustness in the application of camera calibration.
In order to realize the effect, the invention adopts the technical scheme that: providing a coding plane target for calibrating internal and external parameters of a camera, wherein the coding plane target is formed by a coding checkerboard which is formed by alternating parallelogram coding units and parallelogram non-coding units, the coding plane target takes the intersection points of the parallelogram coding units which are connected with any opposite angles as the calibration angular points of the coding plane target, the coding plane target comprises M rows and N columns of calibration angular points altogether, and M and N are positive integers; the interior of each parallelogram coding unit in the coding plane target is provided with a coding pattern, the coding pattern comprises a positioning pattern, an orientation pattern and a coding mark pattern, and the coding mark pattern consists of a plurality of coding unit patterns; the orientation pattern and the positioning pattern are used for judging the rotation direction of the coded plane target; the coding mark pattern is used for coding each calibration corner point in the coding plane target.
The positioning pattern, the orientation pattern and the coding unit pattern inside each parallelogram coding unit in the coding plane target are not overlapped and not communicated.
All parallelogram coding units and parallelogram non-coding units in the coding plane target are parallelograms with the length of a and the width of b, and a and b are both larger than zero; the acute angle in the parallelogram-shaped coding unit is lambda, and if the parallelogram-shaped coding unit is rectangular in particular, lambda is 90 degrees.
One parallelogram coding unit in any coding plane target is taken and recorded as a coding plane target vector to determine a coding unit gamma v Arbitrarily taking a coding plane target vector to determine a coding unit gamma v One vertex of the vector determination coding unit is marked as a first vertex o ″ of the vector determination coding unit 1 Determining a coding unit gamma in the coding plane target vector v Wherein the intersections form a vector defining a first vertex o ″' of the coding unit 1 Any one edge of the first edge is marked as a vector to determine first edge Ν of the coding unit v1 Determining a first edge Ν of an encoding unit in a vector v1 Upward orientation amount determination encoding unit Γ v The vertex of (a) is marked as the first point o' on the first side of the vector-determined coding unit 2 Wherein the vector determines a first point o' on a first side of the coding unit 2 And vector determination coding unit first vertexPoint o 1 Are 2 points which are not coincident with each other, and the vector is recordedTo specify a vectorAnd the positional relationship of the positioning pattern and the orientation pattern in each parallelogram coding unit within the coding plane target is as follows: the direction and the prescribed vector pointing from the center of mass of the orientation pattern to the center of mass of the orientation pattern in the same parallelogram coding unitAre in the same direction;
marking the plane where the coding plane target is as a target plane P t Determining the first vertex o' of the coding unit by the vector 1 Making a prescribed vector for the starting pointThe unit vector in the same direction is denoted as the 1 st predetermined unit vectorWhen the person looks at the target plane P t Then, the first vertex o' of the coding unit is determined by the vector 1 At the target plane P as a rotation center t Defining the 1 st unit vectorCounterclockwise rotation by an angle beta '(0 DEG < beta' < 90 DEG) to obtain a 2 nd prescribed unit vectorDetermining the first vertex o' of the coding unit in space as a vector 1 As a starting point, anThe unit vectors with the same direction are recorded as positive vectorsDetermining a coding unit gamma by using a coding plane target vector v Upper distance coding plane target vector determination coding unit gamma v The two nearest vertexes of the orientation pattern in (1) are respectively marked as the 1 st temporary vertex o ″ 3 And the 2 nd temporary vertex o ″ 4 (ii) a If it isDirection of the resulting vector and the forward vectorAre in the same direction, they will be recorded as vectorsAuxiliary vectorIf it isDirection of the obtained vector and forward vectorAre in the same direction, then vector is setIs recorded as an auxiliary vector
The positioning pattern and the orientation pattern in each parallelogram coding unit in the coding plane target are in the following position relation, the positioning pattern and the orientation pattern of the same parallelogram coding unit are both inside the corresponding parallelogram coding unit, and the mass center of the positioning pattern and the mass center of the orientation pattern in the same parallelogram coding unit are both near the mass center of the corresponding parallelogram coding unit;
coded planar targetThe positional relationship between the positioning pattern and the orientation pattern in each parallelogram coding unit in the target is as follows, the direction from the orientation pattern centroid to the positioning pattern centroid in the same parallelogram coding unit and the prescribed vectorAre in the same direction;
the sizes of a plurality of coding unit patterns in the same parallelogram coding unit in the coding plane target can be different from each other;
each parallelogram coding unit and the positioning pattern and the coding unit pattern inside the parallelogram coding unit in the coding plane target satisfy the following relations: in the same parallelogram coding unit, the contour length of each coding unit pattern is smaller than that of the positioning pattern, and the contour length of the positioning pattern is smaller than (2a +2 b);
the background colors of all the parallelogram coding units in the coding plane target are the same, and the background colors of all the parallelogram coding units in the coding plane target are marked as color 1; the colors of all the parallelogram non-coding units in the coding plane target are the same, and the colors of all the parallelogram non-coding units in the coding plane target are marked as color 2;
the background color (i.e. color 1) of all parallelogram coding units in the coding plane target is obviously different from the color (i.e. color 2) of all parallelogram non-coding units;
the colors of all the positioning patterns and all the orientation patterns contained in all the parallelogram coding units in the coding plane target are the same, the colors of all the positioning patterns and all the orientation patterns contained in all the parallelogram coding units in the coding plane target are marked as color 3, and the color 3 is obviously different from the color 1;
the color of all coding unit patterns contained in all parallelogram coding units in the coding plane target is the same as color 1 or the same as color 3;
the positioning pattern inside each parallelogram coding unit in the coding plane target is a solid circle, the orientation pattern is a circular ring, and the coding unit patterns are all solid circles;
the connected domain with the color of 1 in each parallelogram coding unit in the coding plane target has the following characteristics that 2 connected domains with the color of 1 are contained in the same parallelogram coding unit, and the area of the connected domain with the color of 1 closest to the centroid of the directional pattern is smaller than the area of the connected domain with the color of 1 in the other parallelogram coding unit;
the areas of the positioning patterns contained in different parallelogram coding units in the coding plane target can be the same or different; the area sizes of the orientation patterns contained in different parallelogram coding units in the coding plane target can be the same or different; the areas of the coding unit patterns contained in different parallelogram coding units in the coding plane target can be the same or different;
the coding unit pattern of each parallelogram coding unit in the coding plane target has the following characteristics: in the same parallelogram coding unit, the position and the color of a coding unit pattern are determined by a non-unique coding method of each calibration corner point in a coding plane target;
the steps of decoding each calibration corner point in the coding plane target by using a digital image processing method are as follows:
step 1, inputting basic information of a coding plane target placed in a space, namely the coding plane target in the space comprises M rows multiplied by N columns of calibration angular points, and the coding number of an initial parallelogram coding unit of the coding plane target is z v The number phi of the calibration corner points in 4 vertexes of the 1 st parallelogram coding unit in the 1 st line on the coding plane target p (ii) a Shooting the coding plane target in the space through a camera, thereby obtaining an image of the coding plane target, wherein the coding plane target image comprises the complete or local coding plane target;
step 2, carrying out 8-bit gray level processing on the coding target image, and recording the obtained image as a coding plane target gray level image P 1 (ii) a Wherein the content of the first and second substances,encoding a planar target grayscale image P 1 Is an 8-bit gray scale map;
step 3, establishing a pixel coordinate system for calibrating the angular point, and encoding a plane target gray image P 1 In the method, a checkerboard corner extraction algorithm based on growth is utilized to extract a coding plane target gray image P 1 The method comprises the steps of (1) merging a sub-pixel coordinate set of m rows multiplied by n columns of calibration angular points with the largest number of calibration angular points into a calibration angular point sub-pixel coordinate set Q, and marking a polygon surrounded by the outermost angular points (namely the 1 st row calibration angular point, the 1 st column calibration angular point, the m rows of calibration angular points and the n columns of calibration angular points) in the m rows multiplied by n columns of calibration angular point sub-pixel coordinate set as a maximum calibration angular point number polygon L; wherein, the coded plane target gray image P after the angular point extraction 1 No change occurred;
step 4, in the said coded plane target gray image P 1 In the method, the gray values of all the pixel points in the maximum calibration corner point polygon L are kept unchanged by using a digital image processing method, the gray values of all the pixel points except the maximum calibration corner point polygon L are assigned to be 255, and the gray image P of the coding plane target is assigned 1 The image obtained by the processing is recorded as a gray image P without a complex background target 1 ′;
Step 5, aiming at the gray image P of the target without the complex background 1 ' binarization processing is carried out, and a target gray level image P without complex background is obtained 1 ' the image obtained by binarization processing is marked as a binarized image P without a complex background target 2 (ii) a Make the image P binarized on the target without complex background 2 The background color of the middle parallelogram coding unit is changed into black, the colors of the background color of the parallelogram non-coding unit, the positioning pattern and the orientation pattern are all changed into white, and the color of the coding mark pattern can be white or black according to the coding rule;
6, according to the gray image P of the coded plane target 1 The number of m rows multiplied by n columns of calibration angular points is contained in the extracted maximum calibration angular point number polygon L, and the number mu of parallelogram coding units contained in the maximum calibration angular point number polygon L is determined, wherein m, n and mu are integers;
this step can be divided into the following cases:
case 1, when m and n are both odd numbers, or m and n are odd, even, the number μ (μ is an integer) of parallelogram coding units contained in the polygon L can be calculated by formula (1);
μ=(m-1)(n-1)/2 (1)
then step 7 is executed;
case 2, if m and n are even numbers, the estimated number μ '(μ' is an integer) of parallelogram coding units contained in the polygon L can be calculated by formula (2);
μ′=[(m-1)(n-1)+1]/2 (2)
at this time, the number mu of the parallelogram coding units actually contained in the polygon L satisfies mu ≦ mu';
step 7, setting a parallelogram coding unit number judgment threshold value L'; target binary image P without complex background 2 Performing black connected domain corrosion treatment to ensure that no complex background target binaryzation image P 2 All the parallelogram coding units are disconnected at the diagonal positions, and the complex background-free target binary image P is obtained 2 The image obtained by the processing is marked as a target binaryzation corrosion image P' 2 (ii) a Wherein, the binary image P of the target without complex background 2 When black connected domain corrosion treatment is carried out, the following conditions are satisfied:
(1) each parallelogram coding unit in the polygon L with the maximum number of the angle points satisfies the following conditions: the white connected domain of the orientation circle, the white connected domain of the positioning ring, the black connected domain of the center of the positioning ring and the white connected domain of the coding mark pattern in the parallelogram coding unit are kept complete;
(2) each parallelogram coding unit in the maximum-calibration large-angle point number polygon L meets the following requirements: the connected domains of the orientation pattern, the positioning pattern and the coding mark pattern in the parallelogram coding unit are not communicated with each other;
(3) each parallelogram coding unit in the polygon L with the maximum number of the angle points satisfies the following conditions: the orientation pattern, the positioning pattern and the coding mark pattern in the parallelogram coding unit are all positioned in the background of the parallelogram coding unit;
binarizing corrosion image P 'at target' 2 Searching mu ' maximum black connected domains, and calculating the average value χ ' of pixel points contained in the first mu ' -1 maximum black connected domains;
marking the minimum black connected domain in the mu' maximum black connected domains in the polygon L as the tail end black connected domain, and calculating the pixel point chi contained in the tail end black connected domain m Judging according to a formula (3);
(1) if L ' is less than or equal to L ', the polygon L actually comprises mu ' parallelogram coding units, and the value of mu ' is assigned to mu, and the value of mu is equal to mu '; and executing the step 8;
(2) if L ' > L ', the polygon L actually contains μ ' -1 parallelogram coding units, and a value of μ ' -1 is assigned to μ, where μ is μ ' -1; and step 8 is executed;
step 8, finding binaryzation corrosion image P 'in target' 2 And the mu maximum black connected domains in the image are respectively marked as grid connected domains omega 1 Grid connected domain omega 2 …, grid connected domain omega μ Taking an integer variable i, and giving an initial value i to 1;
binarizing corrosion image P 'at target' 2 Calculating the square connected domain omega in the above steps i Pixel coordinate of centroid (x) i ,y i ) i And re-assigning i +1 to i, and continuing to execute the step until i is greater than mu, thereby obtaining a target binary corrosion image P' 2 Upper square connected domain omega 1 Grid connected domain omega 2 …, grid connected domain omega μ Centroid pixel coordinate (x) 1 ,y 1 ) 1 、(x 2 ,y 2 ) 2 、…、(x μ ,y μ ) μ And will be (x) 1 ,y 1 ) 1 、(x 2 ,y 2 ) 2 、…、(x μ ,y μ ) μ Sequentially serving as a 1 st element, a 2 nd element, … and a mu th element in a parallelogram coding unit centroid pixel coordinate set A;
step 9, assigning an initial value i to the integer variable i again, wherein the initial value i is 1;
binarizing corrosion image P 'at target' 2 In (1), calculating the distance grid connected domain omega i Centroid pixel coordinate value (x) i ,y i ) i The nearest black connected domain is recorded as a target binary corrosion image P' 2 Of (1) ring center connected region omega' i (ii) a Assigning i +1 to i again, and continuing to execute the step until i is greater than mu; thus obtaining target binaryzation corrosion images P' 2 Annular center connected region omega 'of (1)' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' μ ;
Step 10, assigning an initial value i to the integer variable i again, wherein the initial value i is 1;
binarizing corrosion image P 'at target' 2 In (1), calculating the distance grid connected domain omega i Centroid pixel coordinate value (x) i ,y i ) i The nearest black connected domain is recorded as a target binary corrosion image P' 2 Of (1) ring center connected region omega' i (ii) a Assigning i +1 to i again, and continuing to execute the step until i is greater than mu; thus obtaining target binaryzation corrosion images P' 2 Of (1) ring center connected region omega' 1 And a circular ring center connected region omega' 2 …, ring center connected region omega' μ ;
The initial value i is given to the integer variable i again as 1;
binarizing corrosion image P 'at target' 2 In (1), calculating the target binaryzation corrosion image P' 2 Annular center connected region omega 'of (1)' i Centroid pixel coordinate o ″) d,i (x″ d,i ,y″ d,i ) Assigning i +1 to i again and continuing to execute the step until i is greater than mu; obtaining a target binaryzation corrosion image P' 2 Annular center connected region omega 'of (1)' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' μ Centroid pixel coordinate o ″) d,1 (x″ d,1 ,y″ d,1 )、o″ d,2 (x″ d,2 ,y″ d,2 )、…、o″ d,μ (x″ d,μ ,y″ d,μ ) And will o ″) d,1 (x″ d,1 ,y″ d,1 )、o″ d,2 (x″ d,2 ,y″ d,2 )、…、o″ d,μ (x″ d,μ ,y″ d,μ ) Sequentially serving as a 1 st element, a 2 nd element, … and a mu th element in the circular ring centroid pixel coordinate set B;
step 11, binarizing the corrosion image P 'on the target' 2 In, will remove square connected domain omega 1 Grid connected domain omega 2 …, grid connected domain omega μ And a circular ring center connected region omega' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' μ The gray values of the other black connected domains are all assigned to be 255, and the target is subjected to binarization to form a corrosion image P' 2 The image obtained by the processing is recorded as a decoded binary image P 3 ;
Step 12, taking an integer variable zeta, and giving an initial value zeta as 1;
step 13, removing the complex background except the zeta-th parallelogram coding unit to obtain a zeta-th unit binary image E without the complex background ζ ;
In this step, the zeta unit binary image E without complex background is obtained ζ The method comprises the following specific steps:
step 13.1, decoding the binary image P 3 Copying and backing up, and recording the copied image as the zeta-th backup binary image P ζ,4 ;
Step 13.2, backup binarization image P at the zeta th ζ,4 Taking the Zeth centroid pixel coordinate value (x) in the centroid pixel coordinate set A of the parallelogram coding unit ζ ,y ζ ) ζ Finding out the pixel coordinate value (x) of distance centroid in the calibration corner point set Q ζ ,y ζ ) ζ Pixel coordinate values of the nearest 4 calibration corner points, and setting the pixel coordinate values of the 4 calibration corner points in the ζ -th backup binary image P ζ,4 The corresponding 4 pixel points are respectively marked as C ″) ζ,1 (x″ ζ,1 ,y″ ζ,1 )、C″ ζ,2 (x″ ζ,2 ,y″ ζ,2 )、C″ ζ,3 (x″ ζ,3 ,y″ ζ,3 )、C″ ζ,4 (x″ ζ,4 ,y″ ζ,4 ) (ii) a And taking the 4 pixel points as a zeta-th calibration corner point quadrangle S ζ And connecting the 4 vertexes to form a zeta-th calibration corner point quadrangle S ζ ;
Step 13.3, finding out the Zeth centroid pixel coordinate value (x) in the centroid pixel coordinate set A of the parallelogram coding unit from the circular ring centroid pixel coordinate set B ζ ,y ζ ) ζ The corresponding zeta th ring centroid pixel coordinate value (x ″) d,ζ ,y″ d,ζ );
Step 13.4, backup binarization image P at the zeta th ζ,4 In the method, the coordinate value (x ″) of the pixel of the center of mass of the ring is searched d,ζ ,y″ d,ζ ) The nearest white connected domain, and the gray value of the white connected domain is assigned to be 0;
step 13.5, backup binarization image P at the zeta th ζ,4 In the above, the Zeta th calibration corner point quadrangle S ζ Except that the gray values of all the pixel points are assigned to be 255, and the zeta-th calibration corner point quadrangle S ζ Keeping the gray values of all internal pixel points unchanged, and marking the obtained image as the zeta-th unit binary image E without complex background ζ ;
Step 14, binarizing the image E in the zeta th unit without complex background ζ Searching for a calibration angular point of the zeta-th parallelogram coding unit, and determining a coding region corresponding to the calibration angular point;
in this step, the specific method for finding the calibration corner point of the ζ -th parallelogram coding unit includes:
step 14.1, binarizing the image E in the zeta th unit without complex background ζ In, search forUnit binary image E with maximum black connected domain and marked as Zeth no complex background ζ Maximum black connected component Ω in ζ,E (ii) a Extracting the Zeth unit binary image E without complex background ζ Maximum black connected component Ω in ζ,E And is recorded as a centroid pixel coordinate value of (x) ζ ,y ζ ) ζ Of a parallelogram-shaped coding unit D ζ ;
Step 14.2, the coordinates of the centroid pixel are the value (x) ζ ,y ζ ) ζ Of a parallelogram-shaped coding unit D ζ In the method, the number of pixel points included in each contour is counted, wherein the contour including the second most pixel points is the unit binary image E without the complex background at the zeta th ζ The centroid pixel coordinate value of (x) ζ ,y ζ ) ζ In a parallelogram coding unit of (2) an outline G of a positioning circle ζ Calculating the positioning circle profile G ζ And is recorded as a unit binary image E without complex background at the zeta th position ζ The centroid pixel coordinate value of (x) ζ ,y ζ ) ζ Locate circle centroid pixel coordinate o 'in parallelogram coding unit of (1)' l,ζ (x′ l,ζ ,y′ l,ζ );
Step 14.3, coordinate of mass center is (x) ζ ,y ζ ) ζ Of a parallelogram-shaped coding unit D ζ In (1), the 2 contours with the largest number of pixels are removed, and the remaining k ζ (wherein κ ζ 0,1,2, 3.) contours, classified as follows:
case 1, if κ ζ If 0, go to step 14.6;
case 2 if κ ζ Not equal to 0, then this κ ζ The contour is the unit binary image E without complex background at the zeta th ζ The centroid pixel coordinate value of (x) ζ ,y ζ ) ζ The coded mark circle contour in the parallelogram coding unit is recorded as the coded mark circle contourCoded marker circle profileCoded marker circle profile
Step 14.4, assigning the initial value i to the integer variable i again, wherein the initial value i is 1;
step 14.5, binarizing the image E in the zeta th unit without complex background ζ In, calculating the circular contour of the code markCentroid pixel coordinates ofThis step continues after i +1 is reassigned to i until i > κ ζ And finishing, obtaining the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ Coded flag circle contour in parallelogram coding unit ofCoded marker circle profileCoded marker circle profileCentroid pixel coordinates of
Step 14.6, binarizing the image E in the zeta th unit without complex background ζ The pixel coordinate value is (x ″) d,ζ ,y″ d,ζ ) The pixel point is marked as a centroid pixelThe coordinate value is (x) ζ ,y ζ ) ζ Of parallelogram-shaped coding units of (2) oriented circular ring centroid o' d,ζ (x′ d,ζ ,y′ d,ζ ) (ii) a And binarizing the image E at the ζth unit without complex background ζ The pixel coordinate values are (x ″) ζ,1 ,y″ ζ,1 )、(x″ ζ,2 ,y″ ζ,2 )、(x″ ζ,3 ,y″ ζ,3 )、(x″ ζ,4 ,y″ ζ,4 ) 4 pixels are recorded as C' ζ,1 (x′ ζ,1 ,y′ ζ,1 )、C′ ζ,2 (x′ ζ,2 ,y′ ζ,2 )、C′ ζ,3 (x′ ζ,3 ,y′ ζ,3 )、C′ ζ,4 (x′ ζ,4 ,y′ ζ,4 );
Step 14.7, binarizing the image E at the zeta th unit without complex background ζ Upper, get C ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) Respectively expressed in coordinates of centroid as (x) ζ ,y ζ ) ζ The pixel coordinates of the calibration corner points of the No. 1 coding region, the No. 3 coding region, the No. 4 coding region and the No. 6 coding region in the parallelogram coding unit; the centroid pixel coordinate value is (x) ζ ,y ζ ) ζ In a parallelogram coding unitCan be derived from formula (4) while recording through the centroid o 'of the positioning circle' l,ζ And a directional ring centroid o' d,ζ Is a straight line of ζ,3 ;
Step 14.8, binarizing the image E in the zeta th unit without complex background ζ Last, 4 pixel points C' ζ,1 (x′ ζ,1 ,y′ ζ,1 )、C′ ζ,2 (x′ ζ,2 ,y′ ζ,2 )、C′ ζ,3 (x′ ζ,3 ,y′ ζ,3 )、C′ ζ,4 (x′ ζ,4 ,y′ ζ,4 ) Medium-distance positioning circle center of mass o' l,ζ (x′ l,ζ ,y′ l,ζ ) The nearest 2 pixels are respectively marked as C ζ,1min (x ζ,1min ,y ζ,1min ) And C ζ,2min (x ζ,2min ,y ζ,2min ) (ii) a The coordinate value of the centroid pixel is calculated as (x) through the formulas (5) and (6) ζ ,y ζ ) ζ 1 st decision vector in a parallelogram coding unit ofAnd 2 nd decision vectorAnd calculating the area division sine value 1sin alpha by the formulas (7) and (8) ζ Sum region dividing sine value 2sin beta ζ ;
Case 1, if sin α ζ <0,sinβ ζ If greater than 0, then C ζ,1min (x ζ,1min ,y ζ,1min ) Is the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ For the marking corner point of the 1 st coding region in the parallelogram coding unit, theC ζ,1min (x ζ,1min ,y ζ,1min ) Is assigned to C ζ,1 (x ζ,1 ,y ζ,1 );C ζ,2min (x ζ,2min ,y ζ,2min ) Is the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ C of the 6 th coding region in the parallelogram coding unit ζ,2min (x ζ,2min ,y ζ,2min ) Is assigned to C ζ,4 (x ζ,4 ,y ζ,4 );
Case 2, if sin α ζ >0,sinβ ζ If < 0, then C ζ,2min (x ζ,2min ,y ζ,2min ) Is the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ C is the nominal corner point of the 1 st coding region in the parallelogram coding unit ζ,2min (x ζ,2min ,y ζ,2min ) Is assigned to C ζ,1 (x ζ,1 ,y ζ,1 );C ζ,1min (x ζ,1min ,y ζ,1min ) Is the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ C of the 6 th coding region in the parallelogram coding unit ζ,1min (x ζ,1min ,y ζ,1min ) Is assigned to C ζ,4 (x ζ,4 ,y ζ,4 );
Step 14.9, binarizing the image E in the zeta th unit without complex background ζ By having found the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ The calibration corner points C of the 1 st coding region and the 6 th coding region in the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 ) And C ζ,4 (x ζ,4 ,y ζ,4 ) C 'will be 4 pixel points' ζ,1 (x′ ζ,1 ,y′ ζ,1 )、C′ ζ,2 (x′ ζ,2 ,y′ ζ,2 )、C′ ζ,3 (x′ ζ,3 ,y′ ζ,3 )、C′ ζ,4 (x′ ζ,4 ,y′ ζ,4 ) The pixel coordinates of the rest 2 pixel points are respectively assigned to the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ The 1 st temporary coordinate value of the parallelogram coding unit of (1) is denoted as C' ζ,5 (x′ ζ,5 ,y′ ζ,5 ) And the 2 nd temporary coordinate value, denoted as C' ζ,6 (x′ ζ,6 ,y′ ζ,6 ) (ii) a The pixel coordinate value at the centroid can be found as (x) according to equations (9) and (10) ζ ,y ζ ) ζ Of the parallelogram coding unit of (3) th decision vectorAnd 4 th judgment vector
Step 14.10, judging the vector according to the No. 3And 4 th judgment vectorThe area division sine value 3sin omega can be obtained by the formula (11) and the formula (12) ζ Sum region dividing sine value 4sin xi ζ ;
Case 1, sin ω ζ ==0,sinξ ζ Not equal to 0, then C' ζ,5 (x′ ζ,5 ,y′ ζ,5 ) I.e. the centroid pixel coordinate value is (x) ζ ,y ζ ) ζ C 'to the index corner point of the 3 rd coding region in the parallelogram coding unit of (1)' ζ,5 (x′ ζ,5 ,y′ ζ,5 ) Is assigned to C ζ,2 (x ζ,2 ,y ζ,2 );C′ ζ,6 (x′ ζ,6 ,y′ ζ,6 ) Is the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ C 'to the index corner point of the 4 th coding region in the parallelogram coding unit of' ζ,6 (x′ ζ,6 ,y′ ζ,6 ) Is assigned to C ζ,3 (x ζ,3 ,y ζ,3 );
Case 2, sin ω ζ ≠0,sinξ ζ 0 to C' ζ,6 (x′ ζ,6 ,y′ ζ,6 ) I.e. the centroid pixel coordinate value is (x) ζ ,y ζ ) ζ C 'to the index corner point of the 3 rd coding region in the parallelogram coding unit of (1)' ζ,6 (x′ ζ,6 ,y′ ζ,6 ) Is assigned to C ζ,2 (x ζ,2 ,y ζ,2 );C′ ζ,5 (x′ ζ,5 ,y′ ζ,5 ) Is the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ C 'of the index corner point of the 4 th coding region in the parallelogram coding unit of (1)' ζ,5 (x′ ζ,5 ,y′ ζ,5 ) Is assigned to C ζ,3 (x ζ,3 ,y ζ,3 );
So far, the Zeth unit binary image E without complex background ζ In the above, the centroid pixel coordinate value is found to be (x) ζ ,y ζ ) ζ Is marked with the corner point C of the No. 1 coding region in the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 ) 3 rd coding region calibration corner point C ζ,2 (x ζ,2 ,y ζ,2 ) Calibration corner point C of the 4 th coding region ζ,3 (x ζ,3 ,y ζ,3 ) And the calibration corner point C of the 6 th coding region ζ,4 (x ζ,4 ,y ζ,4 );
Step 15, according to the obtained centroid pixel coordinatesA value of (x) ζ ,y ζ ) ζ The coded values of all the coded mark circles in the parallelogram coding unit are obtained, and a unit binary image E without a complex background with the Zeth unit is obtained ζ The central pixel coordinate value is (x) ζ ,y ζ ) ζ The coding number W of the parallelogram coding unit on the coding plane target placed in the actual space corresponding to the parallelogram coding unit ζ (ii) a The method comprises the following specific steps:
step 15.1, according to the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ Is marked with an angular point C of the 1 st coding region in the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 ) Calibration corner point C of the 6 th coding region ζ,4 (x ζ,4 ,y ζ,4 ) The centroid pixel coordinate value is (x) obtained from the formula (13) ζ ,y ζ ) ζ The 5 th decision vector in the parallelogram coding unit of
Unit binary image E without complex background at zeta th ζ The centroid pixel coordinate value is (x) ζ ,y ζ ) ζ Positioning circle center of mass o 'of parallelogram encoding unit' l,ζ (x′ l,ζ ,y′ l,ζ ) Make a 5 th decision vector as a starting pointParallel and co-directional unit vectors, denoted asAnd recording unit vectorThe straight line is l ζ,1 (ii) a Using the coordinate value of the centroid pixel as(x ζ ,y ζ ) ζ Of parallelogram-shaped coding units of (1)' d,ζ (x′ d,ζ ,y′ d,ζ ) Make a 5 th decision vector as a starting pointParallel and co-directional unit vectors, denoted asAnd recording the straight line of the unit vector as l ζ,2 (ii) a Re-assigning the integer variable i to 1;
step 15.2, defining 6 floating point type two-dimensional arrays For storing the value of the centroid pixel coordinate as (x) ζ ,y ζ ) ζ The coding mark circular contour centroid of the parallelogram coding units in the No. 1 coding area, the No. 2 coding area, the No. 3 coding area, the No. 4 coding area, the No. 5 coding area and the No. 6 coding area is in the Zeth unit binary image without complex background ζ Initializing all elements in the 6 two-dimensional arrays according to the pixel coordinates, and assigning the values to be-1; taking 6 integer variablesAnd it is initialized by the computer system to be initialized,
step 15.3, binarizing the image E in the zeta th unit without complex background ζ Calculating the centroid pixel coordinate value as (x) ζ ,y ζ ) ζ In a parallelogram coding unit ofCentroid pixel ofSign boardRespectively connected with the positioning circle center o' l,ζ And a directional ring center o' d,ζ The formed ith group of 1 st quadrant vectorsAnd ith group of 2 nd quadrant vectors
According to the calculated 1 st quadrant vector of the ith groupAnd ith group of 2 nd quadrant vectorsUnit vectorAnd withAnd a direction vectorCalculated by the following equations (16), (17), (18) and (19)cosγ ζ 、cosη ζ 、cosθ ζ ;
Judging the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ In the parallelogram-shaped coding unit of (1), the manner of coding the coding region to which the flag circle belongs is as follows:
case 1 ifCoded marker circle profileThe pixel falling on the centroid has a coordinate value of (x) ζ ,y ζ ) ζ The 1 st coding region of the parallelogram coding unit of (1); order to Then holdIs assigned toReassign i +1 to i when i ≦ κ ζ Then execution of step 15.3 is resumed when i > k ζ Then the next step 15.4 is executed;
case 2 ifCoded marker circle profileThe pixel falling on the centroid has a coordinate value of (x) ζ ,y ζ ) ζ The 2 nd coding region of the parallelogram coding unit of (1); order to Then holdIs assigned toReassign i +1 to i when i ≦ κ ζ Then execution of step 15.3 is resumed when i > k ζ Then the next step 15.4 is executed;
case 3 ifCoded marker circle profileThe pixel falling on the centroid has a coordinate value of (x) ζ ,y ζ ) ζ The 3 rd coding region of the parallelogram coding unit of (1); order to Then holdIs assigned toReassign i +1 to i when i ≦ κ ζ Then execution of step 15.3 is resumed when i > k ζ Then the next step 15.4 is executed;
case 4, ifCoded marker circle profileThe pixel falling on the centroid has a coordinate value of (x) ζ ,y ζ ) ζ The 4 th coding region of the parallelogram coding unit of (1); order to Then holdIs assigned toReassign i +1 to i when i ≦ κ ζ Then execution of step 15.3 is resumed when i > k ζ Then the next step 15.4 is executed;
situation 5, ifCoded marker circle profileThe pixel falling on the centroid has a coordinate value of (x) ζ ,y ζ ) ζ The 5 th coding region of the parallelogram coding unit of (1); order to Then holdIs assigned toReassign i +1 to i when i ≦ κ ζ Then execution of step 15.3 is resumed when i > k ζ Then the next step 15.4 is executed;
case 6 ifCoded marker circle profileThe pixel falling on the centroid has a coordinate value of (x) ζ ,y ζ ) ζ The 6 th coding region of the parallelogram coding unit of (1); order to Then holdIs assigned toReassign i +1 to i when i ≦ κ ζ Then execution of step 15.3 is resumed when i > k ζ Then the next step 15.4 is executed;
step 15.4, defineThe value of the representative centroid pixel coordinate is (x) ζ ,y ζ ) ζ The code value of the w-th bit of the flag circle (where w is 1,2) in the λ -th code region (where λ is 1,2,3,4,5,6) in the parallelogram coding unit of (1),taking 0 or 1; taking an integer variable i, and endowing the i with an initial value i which is 1 again;
step 15.5, the step is divided into the following conditions:
case 1 ifThenAssigning i +1 to i, and when i is more than 2, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
case 2 ifRecording coordinate pointsTo a straight line l ζ,1 A distance ofTo a straight line l ζ,3 A distance ofIf it isAnd orderIf it isThen orderAssigning i +1 to i, and when i is more than 2, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
case 3 ifRecording coordinate pointsTo a straight line l ζ,1 A distance ofTo a straight line l ζ,3 A distance ofIf it isThen orderIf it isOrder toAssigning i +1 to i, and when i is more than 2, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
case 4, ifThen orderAssigning i +1 to i, and when i is more than 2, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
step 15.6, the step is divided into the following conditions:
case 1 ifThenAssigning i +1 to i, and when i is more than 4, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
case 2 ifRecording coordinate pointsTo a straight line l ζ,2 A distance ofTo a straight line l ζ,3 Is a distance ofIf it isAnd make an orderIf it isThen orderAssigning i +1 to i, and when i is more than 4, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
case 3 ifRecording coordinate pointsTo a straight line l ζ,2 A distance ofTo a straight line l ζ,3 A distance ofIf it isThen orderIf it isOrder toAssigning i +1 to i, and when i is more than 4, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
case 4, ifThen orderAssigning i +1 to i, and when i is more than 4, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
step 15.7, the step is divided into the following conditions:
case 1 ifThenAssigning i +1 to i, and when i is more than 6, continuing to execute the next step 15.8; otherwise, returning to execute the step 15.7;
case 2 ifRecording coordinate pointsTo a straight line l ζ,1 A distance ofTo a straight line l ζ,3 A distance ofIf it isAnd orderIf it isThen orderAssigning i +1 to i, and when i is more than 6, continuing to execute the next step 15.8; otherwise, returning to execute the step 15.7;
case 3, ifRecording coordinate pointsTo a straight line l ζ,1 A distance ofTo a straight line l ζ,3 A distance ofIf it isThen orderIf it isOrder toAssigning i +1 to i, and when i is more than 6, continuing to execute the next step 15.8; otherwise, returning to execute the step 15.7;
case 4, ifThen orderAssigning i +1 to i, and when i is more than 6, continuing to execute the next step 15.8; otherwise, returning to execute the step 15.7;
step 15.8, the centroid pixel coordinate value obtained by the above steps 15.5, 15.6 and 15.7 is (x) ζ ,y ζ ) ζ The coded values of all the coded mark circles in the parallelogram coding unit can be obtained by the formula (20) and the unit binary image E without complex background ζ The central pixel coordinate value is (x) ζ ,y ζ ) ζ The coding number W of the parallelogram coding unit on the coding plane target placed in the actual space corresponding to the parallelogram coding unit ζ ;
W ζ =V ζ T ·U (20)
Step 16, obtaining the zeta unit binary image E without complex background ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) The non-unique code number of (a);
zeta-th unit binary image E without complex background ζ Upper qualityThe coordinate value of the heart pixel is (x) ζ ,y ζ ) ζ The non-unique coding number of the calibration corner point belonging to the sigma-th coding region (where sigma is 1,3,4,6) in the parallelogram coding unit of (1) isWherein the lower foot mark W ζ For calibrating angular pointsThe coding number of the parallelogram coding unit, and the value of the upper corner mark sigma represents the calibration corner pointThe sigma-th coding region; that is, the coordinates of the centroid pixel are obtained as (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) Respectively has a non-unique code number of(where σ ζ,1 =1,σ ζ,2 =3,σ ζ,3 =4,σ ζ,4 =6);
Step 17, calculating to obtain the zeta unit binary image E without complex background ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ 4 calibration corner points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) The specific steps of the unique code number are as follows:
obtaining the Zeth unit binary image E without complex background ζ The upper centroid pixel coordinate value is (x) ζ ,y ζ ) ζ 4 of parallelogram coding unitOn the basis of the non-unique code serial number of each calibration angular point, the unique code serial numbers of the 4 calibration angular points are calculated through the following specific steps:
step 17.1, take Delta' ζ,1 _σ′ ζ,1 、Δ′ ζ,2 _σ′ ζ,2 、Δ′ ζ,3 _σ′ ζ,3 、Δ′ ζ,4 _σ′ ζ,4 Respectively used for storing the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) Is unique code number of, wherein' ζ,1 、Δ′ ζ,2 、Δ′ ζ,3 、Δ′ ζ,4 、σ′ ζ,1 、σ′ ζ,2 、σ′ ζ,3 、σ′ ζ,4 Are all positive integers;
step 17.2, taking an integer variable i and re-assigning the value of i to 1;
step 17.3, judging whether N is an even number, if N is an odd number, executing step 17.4; if N is an even number, taking an integer parameter delta and assigning the value delta to be N/2, and calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Non-unique code number ofThis step can be divided into the following cases:
case 1, if σ ζ,i 1 or σ ζ,i When W is equal to 6, the product is put in ζ Value of to delta' ζ,i Will σ ζ,i Value of to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i ;
Case 2, if σ ζ,i (W) 3 ═ 3 ζ Value of- Δ) to Δ' ζ,i Assigning 6 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is uniquely coded serial numberIs delta' ζ,i _6;
Case 3, if σ ζ,i (W) when being equal to 4 ζ Value of-Delta-1) to Delta' ζ,i Assigning 1 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _1;
Judging whether i is smaller than 4, if i is smaller than 4, assigning i +1 to i, and returning to the step 17.3 for sequential execution; otherwise, executing step 18;
step 17.4, taking the integer parameter delta, assigning the value delta to be (N +1)/2, and calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Non-unique code number ofThis step can be divided into the following cases:
case 1, if σ ζ,i 1 or σ ζ,i When W is equal to 6, the product is put in ζ Value of to' ζ,i Will σ ζ,i Value of to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i ;
Case 2, if σ ζ,i When the value is 3, the following two cases are divided into:
(1) when phi is p When the value is 1, (W) is ζ Value of- Δ ') to Δ' ζ,i Assigning 6 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i (ii) a Delta' can be derived from the formula (21),
wherein Δ ″ ═ 2 (W) ζ -z v ) V (N +1) +1 (integers only retained);
(2) when phi is p When being equal to 2, (W) is ζ Value of- Δ '") to Δ' ζ,i Assign 6 to σ′ ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i (ii) a Δ' "can be obtained from equation (22),
wherein Δ ″ ═ 2 (W) ζ -z v +1)/(N +1) +1 (integers only retained);
case 3, if σ ζ,i The following two cases are divided into two cases:
(1) when phi is p When the value is 1, (W) is ζ Value of- Δ ') to Δ' ζ,i Assigning 1 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i Wherein Δ' can be derived from formula (23);
wherein Δ ″ ═ 2 (W) ζ -z v ) V (N +1) +1 (integers only retained);
(2) when phi is p When being equal to 2, (W) is ζ Value of- Δ '") to Δ' ζ,i Assigning 1 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i Δ' "can be derived from equation (24),
wherein Δ ″ -2 (W) ζ -z v +1)/(N +1) +1 (integers only retained);
judging whether i is smaller than 4, if i is smaller than 4, assigning i +1 to i, and returning to the step 17.4 to execute in sequence; otherwise, executing step 18;
thus, the zeta unit binary image E without complex background is obtained ζ The upper centroid pixel coordinate value is (x) ζ ,y ζ ) ζ The one-to-one correspondence relationship between the pixel coordinates of the 4 calibration corner points of the parallelogram coding unit and the unique coding serial number thereof is as follows:
calibrating angular point C ζ,1 (x ζ,1 ,y ζ,1 ) Corresponding unique code number is Δ' ζ,1 _σ′ ζ,1 ;
Calibrating angular point C ζ,2 (x ζ,2 ,y ζ,2 ) Corresponding unique code number is delta' ζ,2 _σ′ ζ,2 ;
Calibrating angular point C ζ,3 (x ζ,3 ,y ζ,3 ) Corresponding unique code number is delta' ζ,3 _σ′ ζ,3 ;
Calibrating angular point C ζ,4 (x ζ,4 ,y ζ,4 ) Corresponding unique code number is delta' ζ,4 _σ′ ζ,4 ;
Step 18, establishing a target coordinate system O t -X t Y t Z t (ii) a The specific process is as follows:
step 18.1, recording the number of calibration corner points in 4 vertexes of the 1 st parallelogram coding unit in the 1 st line as phi p Then can be according to phi p The numerical values are classified into the following two cases:
case 1 when phi p When 1, the 1 st parallelogram coding unit in the 1 st line is denotedIn as the origin calibration corner point alpha' 1 At the moment, an origin is selected to mark the angular point alpha' 1 Origin O as target coordinate system t To assist the vectorAs a target coordinate system X t The direction of the axis;
case 2 when phi p When 2, the 1 st line and the 1 st parallelogram codes are respectively markedUnit cellIs epsilon 'as two calibration corner points' 3 And ε 3 According to the calibrated corner point epsilon' 3 And ε 3 The positional relationship of (c) can be further classified into the following cases:
(1) when vectorDirection and auxiliary vector ofIs the same, the calibration corner point epsilon 'is selected at the moment' 3 Origin O as target coordinate system t To assist the vectorIs taken as X of a target coordinate system t The direction of the axis;
(2) when vectorDirection and auxiliary vector ofWhen the directions of the two points are different, the calibration corner point epsilon' is selected at the moment 3 Origin O as target coordinate system t To assist the vectorIs taken as X of a target coordinate system t The direction of the axis;
step 18.2, with forward vectorAs Z of the target coordinate system t Direction of axis, X of target coordinate system t Axis, Z t Axis and Y t The axis meets the right-hand criterion, so as to establish a target coordinate system O t -X t Y t Z t ;
Step 19, obtaining the zeta unit binary image E without complex background by using the target coordinate calculation method of the calibration corner point on the coding plane target ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ The specific steps of the target coordinate values of the 4 calibration corner points on the parallelogram coding unit are as follows:
step 19.1, taking an integer variable i and re-assigning the value of i to 1;
step 19.2, judging whether N is an even number, if N is an odd number, executing step 19.3; if N is an even number, the step is divided into the following cases:
case 1, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 1 ═ 1; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
case 2, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 6; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
after the execution of the step is finished, directly executing a step 19.4;
step 19.3, the step is divided into the following two cases:
case 1, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 1 ═ 1; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
case 2, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 6; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
step 19.4, judging whether i is smaller than 4, if i is smaller than 4, assigning i +1 to i and returning to the step 19.2 to execute in sequence; if i is more than or equal to 4, finishing the coordinates of the centroid pixel as (x) ζ ,y ζ ) ζ Calculating the target coordinate values of 4 calibration angular points on the parallelogram coding unit, and obtaining the matching relation of the sub-pixel coordinates, the unique coding number and the target coordinates of the 4 calibration angular points:
unique code number of delta' ζ,1 _σ′ ζ,1 Pixel coordinate C of the calibration corner point ζ,1 (x ζ,1 ,y ζ,1 ) The corresponding target coordinate is (X) ζ,1 ,Y ζ,1 ,0);
Unique code numberIs delta' ζ,2 _σ′ ζ,2 Pixel coordinate C of the calibration corner point ζ,2 (x ζ,2 ,y ζ,2 ) The corresponding target coordinate is (X) ζ,2 ,Y ζ,2 ,0);
Unique code number of delta' ζ,3 _σ′ ζ,3 Pixel coordinate C of the calibration corner point ζ,3 (x ζ,3 ,y ζ,3 ) The corresponding target coordinate is (X) ζ,3 ,Y ζ,3 ,0);
Unique code number of delta' ζ,4 _σ′ ζ,4 Pixel coordinate C of the calibration corner point ζ,4 (x ζ,4 ,y ζ,4 ) The corresponding target coordinate is (X) ζ,4 ,Y ζ,4 ,0);
Step 20, assigning ζ +1 to ζ, and circularly executing steps 13 to 19 to obtain target coordinate values of all calibration corner points on the μ parallelogram coding units.
Therefore, according to all the steps, the gray image P of the plane target can be obtained and coded 1 And target coordinates corresponding to the pixel coordinates of all calibration corner points in the polygon L with the maximum number of the calibration corner points are found, namely, the one-to-one correspondence relationship between the pixel coordinates of the selected calibration corner point and the target coordinates is found, and simultaneously, the unique coding serial number of the selected calibration corner point is also found, so that the decoding of the coding plane target is completed.
The invention also provides a computer-readable storage medium comprising a computer program for use in conjunction with an electronic device having image processing capabilities, said computer program being executable by a processor to perform said decoding method.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the invention, the positioning patterns and the orientation patterns are arranged in the grids of each parallelogram coding unit, so that the rotation direction of the target can be automatically judged by a computer in the camera calibration process, and the flexibility of camera calibration is improved;
2. according to the invention, a plurality of coding mark patterns are arranged in each parallelogram coding unit, each parallelogram coding unit can be numbered and subjected to region division, and each characteristic angular point is given a determined and unique code, so that high-precision matching of the same-name calibration angular points in different calibration images can be realized even if an incomplete coding plane target is shot in the calibration process of a multi-camera;
3. the decoding method of the coding plane target has high decoding speed, completes decoding by utilizing the connected domain, the vector relation, the position relation and the like, has high efficiency, can realize real-time decoding, and provides a basis for real-time calibration;
4. the decoding method of the coding plane target can effectively remove the interference of noise, can finish calibration under a complex background, has strong robustness, and the target is often in the complex background in the actual calibration process, so the coding plane target and the decoding mode thereof have high practical value;
5. in the coding plane target and the decoding method thereof adopted by the invention, the calibration corner points can be extracted to be in a sub-pixel level, the extraction precision of the calibration corner points is high, and the calibration with higher precision can be realized.
Drawings
FIG. 1 is a schematic representation of an encoded planar target according to an embodiment of the present invention;
FIG. 2 is a diagram of a prescribed vector for encoding a planar target according to an embodiment of the present inventionAnd an auxiliary vectorA schematic diagram of (a);
FIG. 3 is a schematic diagram of a polygon L with a maximum number of calibration corners of 4 rows × 8 columns extracted by a growth-based tessellated corner extraction algorithm;
FIG. 4 is a target grayscale image P obtained by 8-bit grayscale processing of a photographed encoded planar target image 1 A schematic diagram of (a);
FIG. 5 is a target gray scale image P of the ablation target 1 Middle-maximum calibration angular point number polygon L external complex backComplex background-free target gray image P obtained from scene 1 ' schematic view;
FIG. 6 is a gray scale image P of a target without a complex background 1 ' binarization image P without complex background target obtained by binarization processing 2 A schematic diagram of (a);
FIG. 7 is a unit binary image E without complex background 1 A schematic diagram of (a);
fig. 8 is a flowchart illustrating the method for decoding the encoding plane target according to the present invention.
Detailed Description
The following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention easier to understand by those skilled in the art, and thus will clearly and clearly define the scope of the invention.
Referring to fig. 1, a coding plane target for camera calibration is composed of a coding checkerboard formed by alternating parallelogram coding units and parallelogram non-coding units, the coding plane target uses the intersection points of the parallelogram coding units connected by any opposite angles as the calibration angular points of the coding plane target, and the coding plane target shown in fig. 1 totally contains 4 rows × 12 columns of calibration angular points; the interior of each parallelogram coding unit in the coding plane target is provided with a coding pattern, the coding pattern comprises a positioning pattern, an orientation pattern and a coding mark pattern, and the coding mark pattern consists of 12 coding unit patterns; the judgment of the rotation direction of the coding plane target can be realized by the orientation pattern and the positioning pattern; the coding mark pattern is used for coding each calibration corner point in the coding plane target.
In this embodiment, the vector determines the first vertex o ″' of the coding unit 1 The vector determines a first point o' on a first side of the coding unit 2 Specifying the vectorAnd an auxiliary vectorAs shown in fig. 2.
In this embodiment, the parallelogram-shaped coding unit is a square with a side length of 24 mm, and λ is 90 °.
As shown in fig. 1 and 2, the positioning pattern in each parallelogram-shaped coding unit within the coding plane target is a solid circle with a diameter of 6 mm, the orientation patterns are circular rings with an outer diameter of 6 mm and an inner diameter of 3 mm, and the positional relationship of the positioning pattern and the orientation patterns satisfies the following condition: the positioning pattern and the orientation pattern of the same parallelogram coding unit are both arranged inside the parallelogram coding unit, the mass center of the positioning pattern and the mass center of the orientation pattern in the same parallelogram coding unit are both arranged near the mass center of the parallelogram coding unit, and the direction and the specified vector pointing to the mass center of the positioning pattern from the mass center of the orientation pattern in the same parallelogram coding unitAre in the same direction;
the sizes of a plurality of coding unit patterns in the same parallelogram coding unit in the coding plane target can be different from each other or can be different from each other; in the embodiment of the present invention, as shown in fig. 1, the 12 coding unit patterns in the same parallelogram coding unit in the coding plane target are all solid circles with a diameter of 3 mm;
each parallelogram coding unit and the positioning pattern and the coding unit pattern inside the parallelogram coding unit in the coding plane target satisfy the following relations: in the same parallelogram coding unit, the contour length of each coding unit pattern is smaller than that of the positioning pattern, and the contour length of the positioning pattern is smaller than the perimeter (2a +2b) of the parallelogram coding unit; in this embodiment (as shown in fig. 1), in the same parallelogram coding unit, the contour length of each coding unit pattern is 9.42 mm smaller than the contour length of the positioning pattern is 18.85 mm, and the contour length of the positioning pattern is 18.85 mm smaller than the perimeter of the parallelogram coding unit, which is 96 mm.
The background colors of all the parallelogram coding units in the coding plane target are the same, and the background colors of all the parallelogram coding units in the coding plane target are marked as color 1; the colors of all the parallelogram non-coding units in the coding plane target are the same, and the colors of all the parallelogram non-coding units in the coding plane target are marked as color 2; the background color (i.e. color 1) of all parallelogram coding units in the coding plane target is obviously different from the color (i.e. color 2) of all parallelogram non-coding units; in a specific embodiment (as shown in fig. 1), the background color of all parallelogram-encoded units in the encoded planar target is black (i.e., color 1), and is significantly different from the color of all parallelogram-non-encoded units in the encoded planar target being white (i.e., color 2);
the colors of all the positioning patterns and all the orientation patterns contained in all the parallelogram coding units in the coding plane target are the same, the colors of all the positioning patterns and all the orientation patterns contained in all the parallelogram coding units in the coding plane target are marked as color 3, and the color 3 is obviously different from the color 1; in the embodiment of the present invention, the colors of all the positioning patterns and the orientation patterns contained in all the parallelogram coding units in the coding plane target are white (i.e. color 3); in this embodiment (as shown in fig. 1), the color 3 and the color 2 are both white, and the color 3 (white) is obviously different from the color 1 (black);
the color of all coding unit patterns contained in all parallelogram coding units in the coding plane target is the same as color 1 or the same as color 3; in an embodiment (as shown in fig. 1), the color of all the coding unit patterns in the coding plane target is black (color 1) or white (color 3);
as shown in fig. 1, the connected component of black color (i.e. color 1) in each parallelogram coding unit in the coding plane target has the following features: the same parallelogram coding unit contains 2 black (namely color 1) connected domains, and the area of the black (namely color 1) connected domain closest to the centroid of the oriented pattern is smaller than that of the other black (namely color 1) connected domain;
the areas of the positioning patterns contained in different parallelogram coding units in the coding plane target can be the same or different; as shown in fig. 1, the areas of the positioning patterns included in different parallelogram coding units in the coding plane target in this embodiment are the same;
the area sizes of the orientation patterns contained in different parallelogram coding units in the coding plane target can be the same or different; as shown in fig. 1, the areas of the orientation patterns contained in different parallelogram coding units in the coding plane target in this embodiment are the same;
the areas of the coding unit patterns contained in different parallelogram coding units in the coding plane target can be the same or different; as shown in fig. 1, the coding unit patterns included in different parallelogram coding units in the coding plane target in the present embodiment have the same area size;
in the present embodiment, the coding unit pattern of each parallelogram coding unit in the coding plane target has the following characteristics: as shown in fig. 1, in the same parallelogram coding unit, the position and color of the coding unit pattern are determined by the non-unique coding method of each calibration corner point in the coding plane target;
in the coding plane target, the coding number of the parallelogram coding unit with the coding serial number W (wherein W is more than or equal to 0 and less than or equal to 32) is determined by the positions and the colors of all the coding unit patterns inside the parallelogram coding unit with the coding serial number W, and the coding plane target decoding method can analyze the coding number of each parallelogram coding unit and the coding number of the calibration corner point in the image according to the position and the color information of all the coding unit patterns inside each parallelogram coding unit on the coding plane target in the image.
The steps of decoding each calibration corner point in the coding plane target by using a digital image processing method are as follows:
step 1, inputting basic information of a coding plane target placed in a space, namely the coding plane target in the space comprises 8 rows by 12 columns of calibration angle points and the initial of the coding plane targetThe code number of the parallelogram coding unit is 0, and the number phi of the calibration angular points in 4 vertexes of the 1 st parallelogram coding unit in the 1 st line on the coding plane target p ==1;
Shooting the coding plane target in the space through a camera, thereby obtaining an image of the coding plane target, wherein the coding plane target image comprises the complete or local coding plane target;
step 2, carrying out 8-bit gray level processing on the coded plane target image, and recording an image obtained by carrying out gray level processing on the coded plane target image as a coded plane target gray level image P 1 (ii) a Wherein, the planar target gray image P is coded 1 An 8-bit gray scale map, as shown in FIG. 4;
step 3, establishing a pixel coordinate system of the calibration corner point:
in the shot coding plane target image, taking the upper left corner of the image as the origin o of a pixel coordinate system of the calibration corner point, and taking the direction from left to right as the x-axis direction of the pixel coordinate system of the calibration corner point and the direction from top to bottom as the y-axis direction of the pixel coordinate system of the calibration corner point; thus establishing a pixel coordinate system o-xy of the calibration corner point;
extracting a gray image P of a coding plane target by using a growth-based checkerboard corner extraction algorithm (a checkerboard detection algorithm proposed by Automatic Camera and Range Sensor Calibration using a single Shot) 1 The polygon surrounded by the outermost corner points (i.e. the calibration corner point of row 1, the calibration corner point of column 1, the calibration corner point of row 4 and the calibration corner point of column 8) in the sub-pixel coordinate set of calibration corner points of row 4 × 8 is marked as the polygon with the maximum number of calibration corner points L, as shown in fig. 3; wherein, the coded plane target gray image P after the angular point extraction 1 No change occurred;
step 4, in the said coded plane target gray image P 1 In the step 3, the gray values of all the pixels in the polygon L with the maximum number of the calibration angle points are kept unchanged by using a digital image processing method,assigning the gray values of all pixel points except L to be 255, and coding the planar target gray image P 1 The image obtained by the processing is recorded as a gray image P without a complex background target 1 ', as shown in FIG. 5;
step 5, aiming at the gray image P of the target without the complex background 1 ' binarization processing is carried out, and a target gray level image P without complex background is obtained 1 ' the image obtained by binarization processing is marked as a binarized image P without a complex background target 2 So that the image P is binarized on the target without complex background 2 The background color of the middle parallelogram coding unit is changed into black, the colors of the background color of the parallelogram non-coding unit, the positioning pattern and the orientation pattern are all changed into white, and the color of the coding mark pattern can be white or black according to the coding rule, as shown in fig. 6;
6, according to the gray image P of the coded plane target 1 The extracted maximum calibration corner number polygon L contains 4 rows × 8 columns of calibration corners. In this embodiment, m and n are even numbers, and the estimated number μ' of the parallelogram coding units included in the polygon L can be calculated by the formula (2): μ ═ [ (m-1) (n-1) +1]If/2 is 11, the number μ of parallelogram coding units actually contained in the polygon L is less than or equal to 11;
setting a parallelogram coding unit number judgment threshold value L' to be 0.2; target binary image P without complex background 2 Performing black connected domain corrosion treatment on the image to ensure that no complex background target binaryzation image P 2 All the parallelogram coding units are disconnected at the diagonal positions, and the complex background-free target binary image P is obtained 2 The image obtained by the processing is marked as a target binaryzation corrosion image P' 2 ;
Binarizing corrosion image P 'at target' 2 Searching 11 maximum black connected domains, and calculating an average value χ 'of pixel points included in the first 10 maximum black connected domains, which may be calculated to obtain χ' 168 in this embodiment;
marking the minimum black connected domain of the 11 maximum black connected domains in the polygon L as the tail end black connected domain, and calculating the tail endNumber χ of pixel points included in black connected domain m Chi in the present embodiment m 164, get L ═ 0.024 according to equation (3), satisfy L ″ < L', copy 11 to μ, μ ═ 11, and perform step 8;
step 8, finding binaryzation corrosion image P 'in target' 2 11 maximum black connected domains in the image are respectively marked as grid connected domains omega 1 Grid connected domain omega 2 …, grid connected domain omega 11 (ii) a Taking an integer variable i, and giving an initial value i to 1;
binarizing corrosion image P 'at target' 2 Calculating the square connected domain omega in the above steps i Pixel coordinate of centroid (x) i ,y i ) i And (5) reassigning i +1 to i, and continuing to execute the step until i is greater than 11, thereby obtaining a target binary corrosion image P' 2 Upper square connected domain omega 1 Grid connected domain omega 2 …, grid connected domain omega 11 Centroid pixel coordinates (1154,696) 1 、…、(x 11 ,y 11 ) 11 And will (1154,696) 1 、…、(x 11 ,y 11 ) 11 Sequentially serving as a 1 st element, a 2 nd element, … and an 11 th element in a parallelogram coding unit centroid pixel coordinate set A;
step 9, assigning an initial value i to the integer variable i again, wherein the initial value i is 1;
binarizing corrosion image P 'at target' 2 In (1), calculating the distance grid connected domain omega i Centroid pixel coordinate (x) i ,y i ) i The nearest black connected domain is recorded as a target binary corrosion image P' 2 Of (1) ring center connected region omega' i (ii) a The step is continuously executed after i +1 is reassigned to i until i is greater than 11; finally obtaining target binaryzation corrosion images P' 2 Of (1) ring center connected region omega' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' 11 ;
Step 10, assigning an initial value i to the integer variable i again, wherein the initial value i is 1;
at target twoValue corrosion image P' 2 In (1), calculating the target binaryzation corrosion image P' 2 Of (1) ring center connected region omega' i Centroid pixel coordinate o ″) d,i (x″ d,i ,y″ d,i ) Assigning i +1 to i again, and continuing to execute the step until i is greater than 11; thus obtaining target binaryzation corrosion images P' 2 Of (1) ring center connected region omega' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' 11 Centroid pixel coordinate o ″) d,1 (1211,715)、…、o″ d,11 (x″ d,11 ,y″ d,11 ) Sequentially as the 1 st element, the 2 nd element, … and the 11 th element in the circular ring centroid pixel coordinate set B;
step 11, binarizing the corrosion image P 'on the target' 2 In, will remove square connected domain omega 1 Grid connected domain omega 2 …, grid connected domain omega 11 And a circular ring center connected region omega' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' 11 The gray values of the other black connected domains are all assigned to be 255, and the target is subjected to binarization to form a corrosion image P' 2 The image obtained by the processing is recorded as a decoded binary image P 3 ;
Step 12, taking an integer variable zeta, and giving an initial value zeta as 1;
step 13, in the step, obtaining the 1 st unit binary image E without complex background 1 The method comprises the following specific steps:
step 13.1, decoding the binary image P 3 Copying and backing up, and recording the copied image as a 1 st backup binary image P 1,4 ;
Step 13.2, backup binarization image P at 1 st 1,4 Taking the 1 st centroid coordinate value in the parallelogram coding unit centroid pixel coordinate set A (1154,696) 1 Finding the coordinate value of distance centroid in the set of calibration corner points Q (1154,696) 1 Pixel coordinate values of the nearest 4 calibration corner points, and the binarization image P at the 1 st backup 1,4 The 4 calibration corner points areRespectively marking 4 pixel points corresponding to the pixel coordinate values as C 1 ″ ,1 (1333,546.2)、C 1 ″ ,2 (1333,790.8)、C 1 ″ ,3 (1088,790.8)、C 1 ″ ,4 (1087,546.2); and taking the 4 pixel points as the 1 st calibration angular point quadrangle S 1 And connecting the 4 vertexes to form a 1 st calibration corner point quadrangle S 1 ;
Step 13.3, finding out the 1 st barycenter pixel coordinate value in the barycenter pixel coordinate set A of the parallelogram coding unit in the ring barycenter pixel coordinate B in step 10 (1154,696) 1 A corresponding circle centroid pixel coordinate of circle 1 (1211,715);
step 13.4, backup binarization image P at 1 st 1,4 Searching a white connected domain closest to the coordinate value (1211,715) of the centroid of the circular ring, and assigning the gray value of the white connected domain as 0;
step 13.5, backup binarization image P at 1 st 1,4 In the above, the 1 st calibration corner point quadrangle S 1 Except that the gray values of all the pixel points are assigned to be 255, and the 1 st calibration corner point quadrangle S 1 Keeping the gray values of all internal pixel points unchanged, and marking the obtained image as the 1 st unit binary image E without complex background 1 As in FIG. 7;
step 14, binarizing the image E in the zeta th unit without complex background ζ In the method, a calibration angular point of a 1 st parallelogram coding unit is found and obtained, and a coding region to which the corresponding calibration angular point belongs is determined, and the method specifically comprises the following steps:
step 14.1, binarizing the image E in the 1 st unit without complex background 1 In the method, a unit binary image E with the maximum black connected domain and marked as the 1 st no complex background is searched 1 Maximum black connected component Ω in 1,E (ii) a Extracting the 1 st unit binary image E without complex background 1 Maximum black connected component Ω in 1,E And is recorded as the centroid pixel coordinate value of (1154,696) 1 Of a parallelogram-shaped coding unit D 1 ;
Step 14.2, the coordinate value of the centroid pixel is (1154,696) 1 Of a parallelogram-shaped coding unit D 1 In the method, the number of pixel points contained in each contour is counted, wherein the contour containing the second most pixel points is the 1 st unit binary image E without complex background 1 The pixel coordinate value of the middle mass center is (1154,696) 1 In a parallelogram coding unit of (2) an outline G of a positioning circle 1 Calculating the positioning circle profile G 1 And is recorded as the 1 st unit binary image without complex background 1 The coordinate value of the upper centroid pixel is (1154,696) 1 Positioning circular centroid pixel coordinate o 'in parallelogram coding unit of (1)' l,1 (1211,621);
Step 14.3, the coordinate value of the centroid pixel in the above step is (1154,696) 1 Of a parallelogram-shaped coding unit D 1 In (1), the 2 contours with the largest number of pixels are removed, and the remaining k 1 (wherein κ 1 0,1,2, 3.) contours, in this example κ 1 If 2, the 2 contours are the 1 st unit binarized image E without complex background 1 The coordinate of the upper mass center is (1154,696) 1 The coding mark circle contour in the parallelogram coding unit is respectively marked as the coding mark circle contourCoded marker circle profile
Step 14.4, assigning the initial value i to the integer variable i again, wherein the initial value i is 1;
step 14.5, binarizing the image E in the 1 st unit without complex background 1 Calculating the contour of the coding mark circleCentroid pixel coordinates ofI +1 is resetAssigning a value to i and continuing to execute the step until i is greater than 2; can obtain the corresponding coding mark circular contourCoded marker circle profileCentroid pixel coordinates of
Step 14.6, binarizing the image E in the 1 st unit without complex background 1 And recording the pixel point with the pixel coordinate value of (1211,715) as the centroid coordinate value of (1154,696) 1 Of parallelogram-shaped coding units of (2) oriented circular ring centroid o' d,1 (1211,715); and binarizing the image E in the 1 st cell without complex background 1 In the above, 4 pixels having pixel coordinate values of (1333,546.2), (1333,790.8), (1088,790.8) and (1087,546.2) are denoted as C' 1,1 (1333,546.2)、C′ 1,2 (1333,790.8)、C′ 1,3 (1088,790.8)、C′ 1,4 (1087,546.2);
Step 14.7, binarizing the image E in the 1 st unit without complex background 1 Upper, get C 1,1 (x 1,1 ,y 1,1 )、C 1,2 (x 1,2 ,y 1,2 )、C 1,3 (x 1,3 ,y 1,3 )、C 1,4 (x 1,4 ,y 1,4 ) Respectively representing a centroid pixel coordinate value of (1154,696) 1 The pixel coordinates of the calibration corner points of the No. 1 coding region, the No. 3 coding region, the No. 4 coding region and the No. 6 coding region in the parallelogram coding unit; the centroid pixel coordinate value is (1154,696) 1 In a parallelogram coding unitThis can be derived from equation (4):simultaneously records through the center of mass o 'of the positioning circle' l,1 And a directional ring centroid o' d,1 Is a straight line of 1,3 ;
Step 14.8, binarizing the image E in the 1 st unit without complex background 1 Last, 4 pixel points C' 1,1 (1333,546.2)、C′ 1,2 (1333,790.8)、C′ 1,3 (1088,790.8)、C′ 1,4 (1087,546.2) distance-located circular centroid pixel coordinate o' l,1 (1211,621) the nearest 2 pixels are respectively marked as C 1,1min (x 1,1min ,y 1,1min ) And C 1,2min (x 1,2min ,y 1,2min ) (ii) a In this embodiment, C 1,1min (x 1,1min ,y 1,1min ) Is C' 1,1 (1333,546.2),C 1,2min (x 1,2min ,y 1,2min ) Is C' 1,4 (1087,546.2) calculating the centroid pixel coordinate value (1154,696) by the formulas (5) and (6) 1 1 st decision vector in a parallelogram coding unit ofAnd 2 nd decision vectorRespectively as follows:
the area division sine value 1sin alpha is calculated by the formula (7) and the formula (8) 1 Sum region dividing sine value 2sin beta 1 Respectively as follows:
due to sin alpha 1 <0,sinβ 1 If greater than 0, then C 1,1min (1333,546.2) the centroid pixel coordinate value is (1154,696) 1 C for the 1 st coding region in the parallelogram coding unit 1,1min (1333,546.2) the pixel coordinate value is assigned to C 1,1 (x 1,1 ,y 1,1 );C 1,2min (1088,546.2) the centroid pixel coordinate value is (1154,696) 1 C of the 6 th coding region in the parallelogram coding unit 1,2min (1088,546.2) the pixel coordinate value is assigned to C 1,4 (x 1,4 ,y 1,4 );
Step 14.9, binarizing the image E in the 1 st unit without complex background 1 The coordinate value of the centroid pixel is found to be (1154,696) 1 The calibration corner points C of the 1 st coding region and the 6 th coding region in the parallelogram coding unit 1,1 (1333,546.2) and C 1,4 (1088,546.2); c 'of 4 pixel points' 1,1 (1333,546.2)、C′ 1,2 (1333,790.8)、C′ 1,3 (1088,790.8)、C′ 1,4 (1087,546.2) the remaining 2 pixels (in this example, C' 1,2 (1333,790.8) and C' 1,3 (1088,790.8)) are assigned to centroid pixel coordinate values of (1154,696) 1 The 1 st temporary coordinate value of the parallelogram coding unit of (2) is denoted as C' 1,5 (1333,790.8), and the 2 nd temporary coordinate value is marked as C' 1,6 (1088,790.8); the coordinates of the centroid pixel are obtained from the equations (9) and (10) as (1154,696) 1 Of the parallelogram coding unit of (3) th decision vectorAnd 4 th judgment vectorRespectively as follows:
step 14.10, according to the calculated 3 rd judgment vectorAnd 4 th judgment vectorThe area division sine value 3sin omega can be obtained by the formula (11) and the formula (12) 1 Sum region dividing sine value 4sin xi 1 Respectively as follows:
due to sin omega 1 ==0,sinξ 1 Not equal to 0, then C' 1,5 (1333,790.8) the centroid pixel coordinate value is (1154,696) 1 C 'to the index corner point of the 3 rd coding region in the parallelogram coding unit of (1)' 1,5 (1333,790.8) to C 1,2 (x 1,2 ,y 1,2 );C′ 1,6 (1088,790.8) the centroid pixel coordinate value is (1154,696) 1 C 'to the index corner point of the 4 th coding region in the parallelogram coding unit of' 1,6 (1088,790.8) to C 1,3 (x 1,3 ,y 1,3 );
So far, the image E is binarized in the 1 st unit without complex background 1 In the above, the centroid pixel coordinate value is found to be (1154,696) 1 In parallel withCalibration corner point C of 1 st coding region in quadrilateral coding unit 1,1 (1333,546.2) and a 3 rd coding region calibration corner point C 1,2 (1333,790.8) and a calibration corner point C of the 4 th encoding region 1,3 (1088,790.8) and the calibration corner point C of the 6 th encoding region 1,4 (1088,546.2);
Step 15, according to the obtained barycenter pixel coordinate value (1154,696) 1 The coded values of all the coded mark circles in the parallelogram coding unit are calculated to obtain a unit binary image E without a complex background 1 The pixel coordinate value of the middle mass center is (1154,696) 1 The coding number W of the parallelogram coding unit on the coding plane target placed in the actual space corresponding to the parallelogram coding unit 1 The method comprises the following specific steps:
step 15.1, binarizing the image E in the 1 st unit without complex background 1 According to the obtained coordinate value of the pixel at the centroid as (1154,696) 1 Is marked with an angular point C of the 1 st coding region in the parallelogram coding unit 1,1 (1333,546.2), calibration corner point C of the 6 th encoding region 1,4 (1088,546.2) the centroid coordinate is (1154,696) from equation (13) 1 The 5 th decision vector in the parallelogram coding unit ofComprises the following steps:
Binarizing image E in 1 st unit without complex background 1 The coordinate value of the centroid pixel is (1154,696) 1 Positioning circle center of mass o 'of parallelogram encoding unit' l,1 (1211,621) as a starting point with a 5 th decision vectorParallel and co-directional unit vectors, denoted asAnd recording unit vectorThe straight line is l 1,1 The coordinate value of the centroid pixel is (1154,696) 1 Of parallelogram-shaped coding units of (1)' d,1 (1211,715) as a starting point with a 5 th decision vectorParallel and co-directional unit vectors, denoted asAnd recording the straight line of the unit vector as l 1,2 (ii) a Re-assigning the integer variable i to 1;
step 15.2, defining 6 floating point type two-dimensional arrays Cr 1 1 [2][2]、Cr 1 2 [2][2]、Cr 1 3 [2][2]、Cr 1 4 [2][2]、Cr 1 5 [2][2]、Cr 1 6 [2][2]For storing the centroid pixel coordinate value is (1154,696) 1 The coding mark circular contour centroid of the parallelogram coding unit respectively positioned in the 1 st coding region, the 2 nd coding region, the 3 rd coding region, the 4 th coding region, the 5 th coding region and the 6 th coding region in the 1 st unit binary image E without complex background 1 Initializing all elements in the 6 two-dimensional arrays according to the pixel coordinates, and assigning the values to be-1; taking 6 integer variablesAnd it is initialized by the computer system to be initialized,re-assigning the integer variable i to 1;
step 15.3, at 1 stUnit binary image E without complex background 1 Calculating the centroid pixel coordinate value is (1154,696) 1 In a parallelogram coding unit of (1) code the marker circle profileCentroid pixel coordinates ofAndrespectively with the center of mass o 'of the positioning circle' l,1 Oriented ring centroid o' d,1 Formed 1 st group of 1 st quadrant vectorsAnd group 1,2 nd quadrant vectorAnd group 2 quadrant 1 vectorsAnd group 2 quadrant 2 vectors
According to the calculated 1 st group of 1 st quadrant vectorsAnd group 1,2 nd quadrant vectorGroup 2, quadrant 1 vectorsAnd group 2 quadrant 2 vectorsUnit vectorAndand a direction vectorCalculated by the following equations (16), (17), (18) and (19)Andthe results are as follows:
the pixel coordinate value at the mass center is (1154,696) 1 In the parallelogram coding unit of (1), the judgment result of the coding region to which the coding flag circle belongs is as follows:
coded marker circle profileThe coordinate value of the pixel falling on the centroid is (1154,696) 1 The 1 st coding region of the parallelogram coding unit of (1); order to
Coded marker circle profileThe coordinate value of the pixel falling on the centroid is (1154,696) 1 The 2 nd coding region of the parallelogram coding unit of (1); order to
Step 15.4, defineThe coordinate value of the representative centroid pixel is (1154,696) 1 The code value of the w-th bit of the flag circle (where w is 1,2) in the λ -th code region (where λ is 1,2,3,4,5,6) in the parallelogram coding unit of (1),taking 0 or 1; taking an integer variable i, and endowing the i with an initial value i which is 1 again;
step 15.5, in this embodiment, according to this step, can obtain:
Step 15.6, in this embodiment, the following steps can be obtained:
Step 15.7, in a specific embodiment, this step can result in:
Step 15.8, the coordinate value of the centroid pixel obtained by the steps is (1154,696) 1 The coded values of all the coded mark circles in the parallelogram coding unit can be obtained by the formula (23) from the 1 st unit binary image E without complex background 1 The center of mass pixel coordinate is a value (1154,696) 1 The coding number W of the parallelogram coding unit on the coding plane target placed in the actual space corresponding to the parallelogram coding unit 1 Comprises the following steps: w 1 =V 1 T U ═ 10; wherein, the column vector U is (2) 0 ,2 1 ,2 2 ,...2 11 ) T Column vector V 1 =(0,1,0,1,0,0,0,0,0,0,0,0) T ;
Step 16, recording the unit binary image E of the 1 st non-complex background 1 The coordinate value of the upper centroid pixel is (1154,696) 1 The non-unique code number of the calibration corner point belonging to the sigma-th coding region (where sigma is 1,3,4,6) in the parallelogram coding unit of (a) is L 10 σ Wherein the lower foot mark 10 is a calibration corner point L 10 σ The coding number of the parallelogram coding unit, the value of the upper corner mark sigma represents the calibration corner point L 10 σ The sigma-th coding region; that is, the coordinates of the centroid pixel are obtained as (1154,696) 1 4 calibration angular points C on the parallelogram coding unit 1,1 (1333,546.2)、C 1,2 (1333,790.8)、C 1,3 (1088,790.8)、C 1,4 (1088,546.2) the non-unique code numbers are each (where σ 1,1 =1,σ 1,2 =3,σ 1,3 =4,σ 1,4 =6);
Step 17, obtaining the 1 st unit binary image E without complex background 1 The coordinate value of the upper centroid pixel is (1154,696) 1 On the basis of the non-unique code serial numbers of the 4 calibration angular points of the parallelogram coding unit, the unique code serial numbers of the 4 calibration angular points are calculated through the following specific steps:
step 17.1, take Delta' 1,1 _σ′ 1,1 、Δ′ 1,2 _σ′ 1,2 、Δ′ 1,3 _σ′ 1,3 、Δ′ 1,4 _σ′ 1,4 Respectively used for storing the coordinates of the mass center as (1154,696) 1 4 calibration angular points C on the parallelogram coding unit 1,1 (1333,546.2)、C 1,2 (1333,790.8)、C 1,3 (1088,790.8)、C 1,4 (1088,546.2) a unique code number, wherein Δ' 1,1 、Δ′ 1,2 、Δ′ 1,3 、Δ′ 1,4 、σ′ 1,1 、σ′ 1,2 、σ′ 1,3 、σ′ 1,4 Are all positive integers;
step 17.2, taking an integer variable i and re-assigning the value of i to 1;
step 17.3, in this embodiment, if N is equal to 12 and is an even number, then the integer parameter Δ is taken and assigned with Δ N/2 is equal to 6, and the corner point C is calibrated 1,i (x 1,i ,y 1,i ) Non-unique code number ofThis step can be divided into the following cases:
case 1, if σ 1,i 1 or σ 1,i To 6, 10 is assigned to Δ' 1,i Will σ 1,i Value of to σ' 1,i Then calibrating the corner point C 1,i (x 1,i ,y 1,i ) Is 10_ σ' 1,i ;
Case 2, if σ 1,i To 3,4 is assigned to Δ' 1,i Assigning 6 to σ' 1,i Then calibrating the corner point C 1,i (x 1,i ,y 1,i ) The unique code number of (2) is 4_ 6;
case 3, if σ 1,i To 4, assign 3 to Δ' 1,i Assigning 1 to σ' 1,i Then calibrating the corner point C 1,i (x 1,i ,y 1,i ) The unique code number of (2) is 3_ 1;
judging whether i is smaller than 4, if i is smaller than 4, assigning i +1 to i, and returning to the step 17.3 for sequential execution; otherwise, executing step 18;
thus, a 1 st unit binary image E without complex background is obtained 1 The upper centroid pixel coordinate is (1154,696) 1 The one-to-one correspondence relationship between the pixel coordinates of the 4 calibration corner points on the parallelogram coding unit and the unique coding serial number thereof is as follows:
calibrating angular point C 1,1 (1333,546.2) the corresponding unique code number is 10_ 1;
calibrating angular point C 1,2 (1333,790.8) the corresponding unique code number is 4_ 6;
calibrating angular point C 1,3 (1088,790.8) corresponding unique coding sequenceNumber 3_ 1;
calibrating angular point C 1,4 (1088,546.2) the corresponding unique code number is 10_ 6;
step 18, establishing a target coordinate system O t -X t Y t Z t (ii) a The specific process is as follows:
step 18.1, recording the number of calibration corner points in 4 vertexes of the 1 st parallelogram coding unit in the 1 st line as phi p Then can be according to phi p The numerical values are classified into the following two cases:
case 1 when phi p When 1, the 1 st parallelogram coding unit in the 1 st line is denotedIn as the origin calibration corner point alpha' 1 At the moment, an origin is selected to mark the angular point alpha' 1 Origin O as target coordinate system t To assist the vectorAs a target coordinate system X t The direction of the axis;
case 2 when phi p When 2, the 1 st parallelogram coding unit in the 1 st row is respectively markedIs epsilon 'as two calibration corner points' 3 And ε 3 According to the calibrated corner point epsilon' 3 And ε 3 The following can be classified into the following cases:
(1) when vectorDirection and auxiliary vector ofIs the same, the calibration corner point epsilon 'is selected at the moment' 3 Origin O as target coordinate system t To assist the vectorIs taken as X of a target coordinate system t The direction of the axis;
(2) when vectorDirection and auxiliary vector ofWhen the directions of the two points are different, the calibration corner point epsilon' is selected at the moment 3 Origin O as target coordinate system t To assist the vectorIs taken as X of a target coordinate system t The direction of the axis;
step 18.2, with forward vectorAs Z of the target coordinate system t Direction of axis, X of target coordinate system t Axis, Z t Axis and Y t The axis meets the right-hand criterion, so as to establish a target coordinate system O t -X t Y t Z t ;
Step 19, at the known centroid pixel coordinate of (1154,696) 1 4 calibration angular points C on the parallelogram coding unit 1,1 (1333,546.2)、C 1,2 (1333,790.8)、C 1,3 (1088,790.8)、C 1,4 (1088,546.2) under the condition of the unique code serial numbers 10_1, 4_6, 3_1, and 10_6 of the coding plane target and the basic information of the coding plane target in the space, obtaining target coordinate values of the No. 10_1 calibration corner point, the No. 4_6 calibration corner point, the No. 3_1 calibration corner point, and the No. 10_6 calibration corner point by using a target coordinate calculation method of the calibration corner points on the coding plane target;
this step can be calculated to obtain:
pixel coordinate C of calibration corner point with unique code serial number of 10_1 1,1 (1333,546.2) the target coordinate corresponding to (X) 1,1 ,Y 1,1 ,0)=(168,24,0);
Pixel coordinate C of calibration corner point with unique code serial number of 4_6 1,2 (1333,790.8) the target coordinate is (X) 1,2 ,Y 1,2 ,0)=(168,0,0);
Pixel coordinate C of calibration corner point with unique code serial number of 3_1 1,3 (1088,790.8) the target coordinate is (X) 1,3 ,Y 1,3 ,0)=(144,0,0);
Pixel coordinate C of calibration corner point with unique code serial number of 10_6 1,4 (1088,546.2) the target coordinate is (X) 1,4 ,Y 1,4 ,0)=(144,24,0);
And step 20, assigning zeta +1 to zeta, and executing the steps 13 to 19 in a circulating manner until zeta is larger than 11, ending the circulating manner, and obtaining the target coordinate values of all the calibration corner points on 11 parallelogram coding units.
Therefore, according to all the steps, the gray image P of the plane target can be obtained and coded 1 And target coordinates corresponding to the pixel coordinates of all calibration corner points in the polygon L with the maximum number of the calibration corner points are found, namely, the one-to-one correspondence relationship between the pixel coordinates of the selected calibration corner point and the target coordinates is found, and simultaneously, the unique coding serial number of the selected calibration corner point is also found, so that the decoding of the coding plane target is completed.
In this embodiment, a 1 st unit binarized image E without complex background is obtained by using a target coordinate calculation method for calibrating corner points on a coding plane target 1 The coordinate value of the upper centroid pixel is (1154,696) 1 The target coordinates corresponding to the pixel coordinates of the 4 calibration corner points on the parallelogram coding unit are as follows:
step 1, taking an integer variable i and re-assigning the value i to be 1;
step 2, if N is an even number, in this embodiment, step 2.1 is executed;
step 2.1, the step is divided into the following conditions:
case 1, if Δ' 1,i _σ′ 1,i Of σ' 1,i 1 ═ 1; then the code number is delta' 1,i _σ′ 1,i Target coordinates corresponding to the calibration corner pointsComprises the following steps: (24. rho.) 10 ,24·δ 10 ,0);
Case 2, if Δ' 1,i _σ′ 1,i Of σ' 1,i 6; then the code number is delta' 1,i _σ′ 1,i The target coordinates corresponding to the calibration corner points are as follows: (24. (. rho.) 10 -1),24·δ 10 ,0);
In this step, δ 10 =2Δ′ 1,i /13 (the result retains only integer bits);
when delta 10 When it is odd, ρ 10 ={Δ′ 1,i -[12·δ 10 /2+(δ 10 +1)/2]}·2+1;
When delta 10 When it is even, ρ 10 =[Δ′ 1,i -13·δ 10 /2]·2;
Step 3, judging whether i is smaller than 4, if i is smaller than 4, assigning i +1 to i and returning to the step 2 for sequential execution; if i is larger than or equal to 4, obtaining target coordinates of the No. 10_1 calibration angular point, the No. 4_6 calibration angular point, the No. 3_1 calibration angular point and the No. 10_6 calibration angular point, and respectively recording the target coordinates as (X) 1,1 ,Y 1,1 ,0)、(X 1,2 ,Y 1,2 ,0)、(X 1,3 ,Y 1,3 ,0)、(X 1,4 ,Y 1,4 ,0);
thereby obtaining a centroid pixel coordinate of (1154,696) 1 The target coordinate values corresponding to the pixel coordinate values of the 4 calibration corner points on the parallelogram coding unit.
In addition, the decoding method based on the encoding plane target provided by the invention needs to prepare a corresponding computer program and execute the program on a computer to realize the corresponding operation processing and logic control functions, so the invention also provides a computer readable storage medium comprising the computer program used in combination with an electronic device with an image processing function, and the computer program can be executed by a processor to realize the decoding method.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (16)
1. A method for decoding a coded planar target for camera calibration, comprising: the method comprises the following main steps:
step 1.1, inputting basic information of a coding plane target placed in a space, namely, the coding plane target in the space comprises M rows multiplied by N columns of calibration angular points, and the coding number of an initial parallelogram coding unit of the coding plane target is z v The number phi of the calibration corner points in 4 vertexes of the 1 st parallelogram coding unit in the 1 st line on the coding plane target p ;
Step 1.2, shooting the coding plane target located in the space through a camera, and obtaining an image of the coding plane target;
step 2, carrying out 8-bit gray level processing on the coding target image, and recording the obtained image as a coding plane target gray level image P 1 ;
Step 3, establishing a pixel coordinate system for calibrating the angular point, and encoding a plane target gray image P 1 In the method, a checkerboard corner extraction algorithm is used for extracting a gray level image P of a coding plane target 1 The sub-pixel coordinate set of m lines multiplied by n columns of calibration angular points with the largest number of calibration angular points is recorded as a calibration angular point sub-pixel coordinate set Q, and a polygon surrounded by the outermost angular points in the m lines multiplied by n columns of calibration angular point sub-pixel coordinate set is recorded as a maximum calibration angular point number polygon L;
step 4, in the said coded plane target gray image P 1 In the method, the gray values of all the pixel points in the maximum calibration corner point polygon L are kept unchanged by using a digital image processing method, the gray values of all the pixel points except the maximum calibration corner point polygon L are assigned to be 255, and the gray image P of the coding plane target is assigned 1 The image obtained by the processing is recorded as the gray level of the target without complex backgroundImage P 1 ′;
Step 5, aiming at the gray image P of the target without the complex background 1 ' binarization processing is carried out, and a target gray level image P without complex background is obtained 1 ' the image obtained by binarization processing is marked as a binarized image P without a complex background target 2 ;
6, according to the gray image P of the coded plane target 1 The number of m rows multiplied by n columns of calibration angular points is contained in the extracted maximum calibration angular point number polygon L, and the number mu of parallelogram coding units contained in the maximum calibration angular point number polygon L is determined, wherein m, n and mu are integers;
step 7, binarizing the image P on the target without the complex background 2 Performing black connected domain corrosion treatment to ensure that no complex background target binaryzation image P 2 All the parallelogram coding units are disconnected at the diagonal positions, and the complex background-free target binary image P is obtained 2 The image obtained by the processing is marked as a target binaryzation corrosion image P' 2 ;
Step 8, finding binaryzation corrosion image P 'in target' 2 And the mu maximum black connected domains in the image are respectively marked as grid connected domains omega 1 Grid connected domain omega 2 …, grid connected domain omega μ Calculating to obtain a target binarization corrosion image P' 2 Upper square connected domain omega 1 Grid connected domain omega 2 …, grid connected domain omega μ Centroid pixel coordinate (x) 1 ,y 1 ) 1 、(x 2 ,y 2 ) 2 、…、(x μ ,y μ ) μ And will be (x) 1 ,y 1 ) 1 、(x 2 ,y 2 ) 2 、…、(x μ ,y μ ) μ Sequentially serving as a 1 st element, a 2 nd element, … and a mu th element in a parallelogram coding unit centroid pixel coordinate set A;
step 9, binarizing the corrosion image P 'on the target' 2 In the method, a target binarization corrosion image P 'is obtained through calculation' 2 Of (1) ring center connected region omega' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' μ ;
Step 10, binarizing the corrosion image P 'on the target' 2 In the method, a target binarization corrosion image P 'is obtained through calculation' 2 Of (1) ring center connected region omega' 1 And a circular ring center connected region omega' 2 …, ring center connected region omega' μ Centroid pixel coordinate o ″) d,1 (x″ d,1 ,y″ d,1 )、o″ d,2 (x″ d,2 ,y″ d,2 )、…、o″ d,μ (x″ d,μ ,y″ d,μ ) And will o ″) d,1 (x″ d,1 ,y″ d,1 )、o″ d,2 (x″ d,2 ,y″ d,2 )、…、o″ d,μ (x″ d,μ ,y″ d,μ ) Sequentially serving as a 1 st element, a 2 nd element, … and a mu th element in the circular ring centroid pixel coordinate set B;
step 11, binarizing the corrosion image P 'on the target' 2 In, will remove square connected domain omega 1 Grid connected domain omega 2 …, grid connected domain omega μ And a circular ring center connected region omega' 1 And omega 'of circular ring center connected region' 2 …, ring center connected region omega' μ The gray values of the other black connected domains are all assigned to be 255, and the target is subjected to binarization to form a corrosion image P' 2 The image obtained by the processing is recorded as a decoded binary image P 3 ;
Step 12, taking an integer variable zeta, and giving an initial value zeta as 1;
step 13, removing the complex background except the zeta-th parallelogram coding unit to obtain a zeta-th unit binary image E without the complex background ζ ;
Step 14, binarizing the image E in the zeta th unit without complex background ζ Searching for a calibration angular point of the zeta-th parallelogram coding unit, and determining a coding region corresponding to the calibration angular point;
step 15, obtaining the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ All coding mark circles in the parallelogram coding unitCode value, and obtaining the binary image E of the unit without complex background ζ The central pixel coordinate value is (x) ζ ,y ζ ) ζ The coding number W of the parallelogram coding unit on the coding plane target placed in the actual space corresponding to the parallelogram coding unit ζ ;
Step 16, obtaining the zeta unit binary image E without complex background ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) A non-unique code number of (a);
step 17, calculating to obtain the zeta unit binary image E without complex background ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) The unique code number of (2);
step 18, establishing a target coordinate system O t -X t Y t Z t ;
Step 19, obtaining the zeta unit binary image E without complex background by using the target coordinate calculation method of the calibration corner point on the coding plane target ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ Target coordinate values of 4 calibration angular points on the parallelogram coding unit; that is, the centroid pixel coordinate is obtained as (x) ζ ,y ζ ) ζ The matching relation among the sub-pixel coordinates, the unique coding numbers and the target coordinates of the 4 calibration corner points on the parallelogram coding unit is as follows:
unique code number of delta' ζ,1 _σ′ ζ,1 Pixel coordinate C of the calibration corner point ζ,1 (x ζ,1 ,y ζ,1 ) The corresponding target coordinate is (X) ζ,1 ,Y ζ,1 ,0);
Unique code number of delta' ζ,2 _σ′ ζ,2 Pixel coordinate C of the calibration corner point ζ,2 (x ζ,2 ,y ζ,2 ) The corresponding target coordinate is (X) ζ,2 ,Y ζ,2 ,0);
Unique code number of delta' ζ,3 _σ′ ζ,3 Pixel coordinate C of the calibration corner point ζ,3 (x ζ,3 ,y ζ,3 ) The corresponding target coordinate is (X) ζ,3 ,Y ζ,3 ,0);
Unique code number of delta' ζ,4 _σ′ ζ,4 Pixel coordinate C of the calibration corner point ζ,4 (x ζ,4 ,y ζ,4 ) The corresponding target coordinate is (X) ζ,4 ,Y ζ,4 ,0);
And 20, endowing zeta +1 with zeta, and circularly executing the steps 13 to 19 to obtain target coordinate values of all calibration corner points on the mu parallelogram coding units.
2. The method of claim 1, wherein the method comprises the following steps: in step 13, the zeta th unit binary image E without complex background is obtained ζ The method comprises the following specific steps:
step 13.1, decoding the binary image P 3 Copying and backing up, and recording the copied image as the zeta-th backup binary image P ζ,4 ;
Step 13.2, backup binarization image P at the zeta th ζ,4 Taking the Zeth centroid pixel coordinate value (x) in the centroid pixel coordinate set A of the parallelogram coding unit ζ ,y ζ ) ζ Finding out the pixel coordinate value (x) of distance centroid in the calibration corner point set Q ζ ,y ζ ) ζ Pixel coordinate values of the nearest 4 calibration corner points, and setting the pixel coordinate values of the 4 calibration corner points in the ζ -th backup binary image P ζ,4 The corresponding 4 pixel points are respectively marked as C ″) ζ,1 (x″ ζ,1 ,y″ ζ,1 )、C″ ζ,2 (x″ ζ,2 ,y″ ζ,2 )、C″ ζ,3 (x″ ζ,3 ,y″ ζ,3 )、C″ ζ,4 (x″ ζ,4 ,y″ ζ,4 ) (ii) a And taking the 4 pixel points as a zeta-th calibration corner point quadrangle S ζ And connecting the 4 vertexes to form a zeta-th calibration corner point quadrangle S ζ ;
Step 13.3, finding out the Zeth centroid pixel coordinate value (x) in the centroid pixel coordinate set A of the parallelogram coding unit from the circular ring centroid pixel coordinate set B ζ ,y ζ ) ζ The corresponding zeta th circle centroid pixel coordinate value (x ″) d,ζ ,y″ d,ζ );
Step 13.4, backup binarization image P at the zeta th ζ,4 In the method, the coordinate value (x ″) of the pixel of the center of mass of the ring is searched d,ζ ,y″ d,ζ ) The nearest white connected domain, and the gray value of the white connected domain is assigned to be 0;
step 13.5, backup binarization image P at the zeta th ζ,4 In the above, the Zeta th calibration corner point quadrangle S ζ Except that the gray values of all the pixel points are assigned to be 255, and the zeta-th calibration corner point quadrangle S ζ The gray values of all the internal pixel points are kept unchanged.
3. The method of claim 1, wherein the method comprises the following steps: in step 14, binarized image E is obtained in the ζ -th unit without complex background ζ In the method, a specific method for finding a calibration corner of the ζ -th parallelogram coding unit and determining a coding region to which the corresponding calibration corner belongs is as follows:
step 14.1, binarizing the image E in the zeta th unit without complex background ζ In the binary image, the maximum black connected domain is searched and marked as the zeta th unit binary image without complex background ζ Maximum black connected component Ω in ζ,E (ii) a Extracting the Zeth unit binary image E without complex background ζ Maximum black connected component Ω in ζ,E All the inner and outer contours of (1) and recording as a centroid imageThe pixel coordinate value is (x) ζ ,y ζ ) ζ Of a parallelogram-shaped coding unit D ζ ;
Step 14.2, the coordinates of the centroid pixel are the value (x) ζ ,y ζ ) ζ Of a parallelogram-shaped coding unit D ζ In the method, the number of pixel points included in each contour is counted, wherein the contour including the second most pixel points is the unit binary image E without the complex background at the zeta th ζ The centroid pixel coordinate value of (x) ζ ,y ζ ) ζ In a parallelogram coding unit of (2) an outline G of a positioning circle ζ Calculating the positioning circle profile G ζ And is recorded as a unit binary image E without complex background at the zeta th position ζ The centroid pixel coordinate value of (x) ζ ,y ζ ) ζ Locate circle centroid pixel coordinate o 'in parallelogram coding unit of (1)' l,ζ (x′ l,ζ ,y′ l,ζ );
Step 14.3, coordinate of mass center is (x) ζ ,y ζ ) ζ Of a parallelogram-shaped coding unit D ζ In (1), the 2 contours with the largest number of pixels are removed, and the remaining k ζ The contour is the unit binary image E without complex background at the zeta th ζ The centroid pixel coordinate value of (x) ζ ,y ζ ) ζ The coded mark circle contour in the parallelogram coding unit is recorded as the coded mark circle contourCoded marker circle profile… coded marker circle outlineWherein κ ζ =0,1,2,3...;
Step 14.4, assigning the initial value i to the integer variable i again, wherein the initial value i is 1;
step 14.5, binarizing the image E in the zeta th unit without complex background ζ In, calculating the circular contour of the code markCentroid pixel coordinates ofThis step continues after i +1 is reassigned to i until i > κ ζ And finishing, obtaining the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ Coded flag circle contour in parallelogram coding unit ofCoded marker circle profile… circle outline of coded markCentroid pixel coordinates of
Step 14.6, binarizing the image E in the zeta th unit without complex background ζ The pixel coordinate value is (x ″) d,ζ ,y″ d,ζ ) The pixel point is marked as the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ Of parallelogram-shaped coding units of (2) oriented circular ring centroid o' d,ζ (x′ d,ζ ,y′ d,ζ ) (ii) a And binarizing the image E at the ζth unit without complex background ζ The pixel coordinate values are (x ″) ζ,1 ,y″ ζ,1 )、(x″ ζ,2 ,y″ ζ,2 )、(x″ ζ,3 ,y″ ζ,3 )、(x″ ζ,4 ,y″ ζ,4 ) And 4 pixel points are recorded as C' ζ,1 (x′ ζ,1 ,y′ ζ,1 )、C′ ζ,2 (x′ ζ,2 ,y′ ζ,2 )、C′ ζ,3 (x′ ζ,3 ,y′ ζ,3 )、C′ ζ,4 (x′ ζ,4 ,y′ ζ,4 );
Step 14.7, binarizing the image E in the zeta th unit without complex background ζ Upper, get C ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) Respectively expressed in the centroid coordinate of (x) ζ ,y ζ ) ζ The pixel coordinates of the calibration corner points of the 1 st coding region, the 3 rd coding region, the 4 th coding region and the 6 th coding region in the parallelogram coding unit; positioning circle centroid pixel coordinate o' l,ζ (x′ l,ζ ,y′ l,ζ ) And a directional ring centroid o' d,ζ (x′ d,ζ ,y′ d,ζ ) The coordinate value of the centroid pixel is calculated as (x) ζ ,y ζ ) ζ In a parallelogram coding unit
Step 14.8, binarizing the image E in the zeta th unit without complex background ζ Last, 4 pixel points C' ζ,1 (x′ ζ,1 ,y′ ζ,1 )、C′ ζ,2 (x′ ζ,2 ,y′ ζ,2 )、C′ ζ,3 (x′ ζ,3 ,y′ ζ,3 )、C′ ζ,4 (x′ ζ,4 ,y′ ζ,4 ) Medium-distance positioning circle center of mass o' l,ζ (x′ l,ζ ,y′ l,ζ ) The nearest 2 pixels are respectively marked as C ζ,1min (x ζ,1min ,y ζ,1min ) And C ζ,2min (x ζ,2min ,y ζ,2min ) (ii) a Respectively calculating the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ Parallelogram knittingDecision vector 1 in a code unitAnd 2 nd decision vectorAnd a region division sine value 1sin alpha ζ Sum region dividing sine value 2sin beta ζ (ii) a According to sin alpha ζ And sin beta ζ Determining the coordinate value of the heart pixel as (x) ζ ,y ζ ) ζ The calibration corner points of the 1 st coding region and the 6 th coding region in the parallelogram coding unit are calibrated;
step 14.9, binarizing the image E in the zeta th unit without complex background ζ By having found the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ The calibration corner points C of the 1 st coding region and the 6 th coding region in the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 ) And C ζ,4 (x ζ,4 ,y ζ,4 ) C 'will be 4 pixel points' ζ,1 (x′ ζ,1 ,y′ ζ,1 )、C′ ζ,2 (x′ ζ,2 ,y′ ζ,2 )、C′ ζ,3 (x′ ζ,3 ,y′ ζ,3 )、C′ ζ,4 (x′ ζ,4 ,y′ ζ,4 ) The pixel coordinates of the rest 2 pixel points are respectively assigned to the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ The 1 st temporary coordinate value of the parallelogram coding unit of (1) is denoted as C' ζ,5 (x′ ζ,5 ,y′ ζ,5 ) And the 2 nd temporary coordinate value, denoted as C' ζ,6 (x′ ζ,6 ,y′ ζ,6 ) (ii) a Calculating the pixel coordinate value at the centroid as (x) ζ ,y ζ ) ζ Of the parallelogram coding unit of (3) th decision vectorAnd 4 th judgment vector
Step 14.10, judging the vector according to the No. 3And 4 th judgment vectorObtaining the region dividing sine value 3sin omega ζ Sum region dividing sine value 4sin xi ζ (ii) a According to sin ω ζ And sin xi ζ Determining the pixel coordinate value as (x) ζ ,y ζ ) ζ The 3 rd coding region and the 4 th coding region in the parallelogram coding unit.
4. The method of claim 1, wherein the method comprises the following steps: in step 15, the centroid pixel coordinate value is determined to be (x) ζ ,y ζ ) ζ Number W of parallelogram-shaped coding unit of (1) ζ The specific method comprises the following steps:
step 15.1, binarizing the image E in the zeta th unit without complex background ζ According to the centroid pixel coordinate value of (x) ζ ,y ζ ) ζ Is marked with an angular point C of the 1 st coding region in the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 ) Calibration corner point C of the 6 th coding region ζ,4 (x ζ,4 ,y ζ,4 ) Obtaining the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ The 5 th decision vector in the parallelogram coding unit ofThe coordinate value of the centroid pixel is (x) ζ ,y ζ ) ζ Positioning circle center of mass o 'of parallelogram encoding unit' l,ζ (x′ l,ζ ,y′ l,ζ ) Make the 5 th judgment vector as the starting pointParallel and co-directional unit vectorsThe coordinate value of the centroid pixel is (x) ζ ,y ζ ) ζ Of parallelogram-shaped coding units of (1)' d,ζ (x′ d,ζ ,y′ d,ζ ) Make the 5 th judgment vector as the starting pointParallel and co-directional unit vectorsRe-assigning the integer variable i to 1;
step 15.2, defining 6 floating point type two-dimensional arrays For storing the value of the centroid pixel coordinate as (x) ζ ,y ζ ) ζ The coding mark circular contour centroid of the parallelogram coding units in the No. 1 coding area, the No. 2 coding area, the No. 3 coding area, the No. 4 coding area, the No. 5 coding area and the No. 6 coding area is in the Zeth unit binary image without complex background ζ Initializing all elements in the 6 two-dimensional arrays according to the pixel coordinates, and assigning the values to be-1; taking 6 integer variablesAnd it is initialized by the user terminal,
step 15.3, binarizing the image E in the zeta th unit without complex background ζ In the above-mentioned manner,calculating a centroid pixel coordinate value of (x) ζ ,y ζ ) ζ In a parallelogram coding unit ofCentroid pixel coordinates ofRespectively with the center o 'of the positioning circle' l,ζ And a directional ring center o' d,ζ The formed ith group of 1 st quadrant vectorsAnd ith group of 2 nd quadrant vectorsAccording toAndunit vectorAndand a direction vectorRespectively calculateAnd according toRespectively judging that the coordinate value of the centroid pixel is (x) ζ ,y ζ ) ζ In the parallelogram coding unit of (1), coding the coding region to which the marker circle belongs;
step 15.4, according to the calculationDetermining the centroid pixel coordinate value as (x) ζ ,y ζ ) ζ The code values of all the code flag circles in the parallelogram coding unit of (1);
step 15.5, calculating the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ Number W of parallelogram-shaped coding unit of (1) ζ 。
5. The method of claim 1, wherein the method comprises the following steps: in step 16, the ζ th unit binary image E without complex background is obtained ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) The method of the non-unique code number of (2) is as follows:
zeta-th unit binary image E without complex background ζ The upper centroid pixel coordinate value is (x) ζ ,y ζ ) ζ The non-unique coding serial number of the calibration angle point belonging to the sigma-th coding region in the parallelogram coding unit isWhere σ is 1,3,4,6, subscript W ζ For calibrating angular pointsThe coding number of the parallelogram coding unit, and the value of the upper corner mark sigma represents the calibration corner pointThe sigma-th coding region; that is, the coordinates of the centroid pixel are obtained as (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) Respectively has a non-unique code number ofWherein sigma ζ,1 =1,σ ζ,2 =3,σ ζ,3 =4,σ ζ,4 =6。
6. The method of claim 1, wherein the method comprises the following steps: in step 17, the ζ th unit binary image E without complex background is obtained by calculation ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) The specific steps of the unique code number are as follows:
step 17.1, take Delta' ζ,1 _σ′ ζ,1 、Δ′ ζ,2 _σ′ ζ,2 、Δ′ ζ,3 _σ′ ζ,3 、Δ′ ζ,4 _σ′ ζ,4 Respectively used for storing the coordinate value of the centroid pixel as (x) ζ ,y ζ ) ζ 4 calibration angular points C on the parallelogram coding unit ζ,1 (x ζ,1 ,y ζ,1 )、C ζ,2 (x ζ,2 ,y ζ,2 )、C ζ,3 (x ζ,3 ,y ζ,3 )、C ζ,4 (x ζ,4 ,y ζ,4 ) Is unique code number of, wherein' ζ,1 、Δ′ ζ,2 、Δ′ ζ,3 、Δ′ ζ,4 、σ′ ζ,1 、σ′ ζ,2 、σ′ ζ,3 、σ′ ζ,4 Are all positive integers;
step 17.2, taking an integer variable i and re-assigning the value of i to 1;
step 17.3, judging according to the parity of N, and if N is an even number, executing step 17.4; if N is odd, go to step 17.5;
step 17.4, taking the integer parameter delta, assigning the value delta to be N/2, and calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Non-unique code number ofThis step 17.4 can be divided into the following cases:
case 1, if σ ζ,i 1 or σ ζ,i When W is equal to 6, the product is put in ζ Value of to delta' ζ,i Will σ ζ,i Value of to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i ;
Case 2, if σ ζ,i (W) 3 ═ 3 ζ Value of- Δ) to Δ' ζ,i Assigning 6 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _6;
Case 3, if σ ζ,i (W) is 4 ═ 4 ζ Value of-Delta-1) to Delta' ζ,i Assigning 1 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _1;
Judging whether i is smaller than 4, if i is smaller than 4, assigning i +1 to i, and returning to the step 17.4 to execute in sequence; otherwise, finishing the calculation of the unique coding serial number of the calibration angular point;
step 17.5, taking the integer parameter delta, assigning the value delta to be (N +1)/2, and calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Non-unique code number ofThis step 17.5 can be divided into the following cases:
case 1, if σ ζ,i 1 or σ ζ,i When W is equal to 6, the product is put in ζ Value of to delta' ζ,i Will σ ζ,i Value of to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i ;
Case 2, if σ ζ,i When the value is 3, the following two cases are divided into:
(1) when phi is p When the value is 1, (W) is ζ Value of- Δ ') to Δ' ζ,i Assigning 6 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i (ii) a WhereinΔ″=2(W ζ -z v ) V (N +1) +1, only integers remaining;
(2) when phi is p When being equal to 2, (W) is ζ Value of- Δ '") to Δ' ζ,i Assigning 6 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i (ii) a WhereinΔ″=2(W ζ -z v +1)/(N +1) +1, only integers remaining;
case 3, if σ ζ,i The following two cases are divided into two cases:
(1) when phi is p When the value is 1, (W) is ζ Value of- Δ ') to Δ' ζ,i Assigning 1 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i WhereinΔ″=2(W ζ -z v ) V (N +1) +1, only integers remaining;
(2) when phi is p When being equal to 2, (W) is ζ Value of- Δ '") to Δ' ζ,i Assigning 1 to σ' ζ,i Then calibrating the corner point C ζ,i (x ζ,i ,y ζ,i ) Is delta 'as the unique code number' ζ,i _σ′ ζ,i WhereinΔ″=2(W ζ -z v +1)/(N +1) +1, keeping only integers;
judging whether i is less than 4, if i is less than 4, assigning i +1 to i, and returning to the step 17.5 for sequential execution; otherwise, finishing the calculation of the unique coding serial number of the calibration corner point.
7. The method of claim 1, wherein the method comprises the following steps: in step 19, the ζ -th unit binarized image E without complex background is obtained by using a target coordinate calculation method for calibrating corner points on a coding plane target ζ The center of mass pixel coordinate is (x) ζ ,y ζ ) ζ The specific steps of the target coordinate values of the 4 calibration corner points on the parallelogram coding unit are as follows:
step 19.1, taking an integer variable i and re-assigning the value of i to 1;
step 19.2, judging whether N is an even number, if N is an odd number, executing step 19.3; if N is an even number, the step is divided into the following cases:
case 1, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 1 ═ 1; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
case 2, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 6; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
after the execution of the step is finished, directly executing a step 19.4;
step 19.3, the step is divided into the following two cases:
case 1, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 1 ═ 1; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
case 2, if Δ' ζ,i _σ′ ζ,i Of σ' ζ,i 6; then the unique code number is delta' ζ,i _σ′ ζ,i The target coordinates corresponding to the calibration corner points are as follows:
in this step 19.3 δ Wζ =2(Δ′ ζ,i -z v ) (N +1), the result retains only integer bits;
in the above-mentioned steps, the first step,for encoding a prescribed vector of a parallelogram coding unit in a planar target, a direction pointing from the center of mass of the orientation pattern to the center of mass of the orientation pattern within the same parallelogram coding unit and the prescribed vectorAre in the same direction in the direction of the axis,for specifying vectors in the same coding plane targetThe auxiliary vector is obtained according to preset regulations, and lambda is an included angle corresponding to a smaller inner angle in the parallelogram coding unit;
step 19.4, judging whether i is smaller than 4, if i is smaller than 4, assigning i +1 to i and returning to the step 19.2 to execute in sequence; if i is more than or equal to 4, finishing the coordinates of the centroid pixel as (x) ζ ,y ζ ) ζ And (4) calculating target coordinate values of the 4 calibration corner points on the parallelogram coding unit.
8. An encoded planar target for camera calibration by the decoding method of claim 1, wherein: the coding plane target consists of coding checkerboards formed by alternating parallelogram coding units and parallelogram non-coding units, the coding plane target takes the intersection points of the parallelogram coding units connected with any opposite angle as the calibration angular points of the coding plane target, a coding pattern is arranged in each parallelogram coding unit in the coding plane target, the coding pattern comprises a positioning pattern, an orientation pattern and a coding mark pattern, and the coding mark pattern consists of a plurality of coding unit patterns; the judgment of the rotation direction of the coding plane target can be realized by the orientation pattern and the positioning pattern; the coding mark pattern is used for coding each calibration corner point in the coding plane target.
9. The encoding planar target for camera calibration according to claim 8, wherein: the positioning pattern, the orientation pattern and the coding unit pattern inside each parallelogram coding unit in the coding plane target are not overlapped and not communicated.
10. The encoding planar target for camera calibration according to claim 8, wherein: the background colors of all parallelogram coding units in the coding plane target are the same, the colors of all parallelogram non-coding units in the coding plane target are the same, and the background colors of all parallelogram coding units in the coding plane target and the colors of all parallelogram non-coding units have obvious difference.
11. The encoding planar target for camera calibration according to claim 8, wherein: the colors of all positioning patterns and all orientation patterns contained in all parallelogram coding units in the coding plane target are the same, and the colors of all the positioning patterns and all the orientation patterns are obviously different from the background colors of all the parallelogram coding units.
12. The encoding planar target for camera calibration according to claim 8, wherein: the color of all coding unit patterns contained in all parallelogram coding units in the coding plane target is the same as the background color of the parallelogram coding units or the color of the positioning pattern.
13. The encoding planar target for camera calibration according to claim 8, wherein: each parallelogram coding unit on the coding plane target is provided with a positioning pattern and a coding mark pattern, the contour length of the positioning pattern in the parallelogram coding unit is larger than the contour length of all the coding mark patterns, and the contour length of the positioning pattern is smaller than the region contour length of the parallelogram coding unit.
14. The encoding planar target for camera calibration according to claim 8, wherein: in the coding plane target, the positioning pattern, the orientation pattern and the coding mark pattern on the same parallelogram coding unit are all arranged inside the parallelogram coding unit, and the mass center of the positioning pattern and the mass center of the orientation pattern in the same parallelogram coding unit are all arranged near the mass center of the parallelogram coding unit.
15. The encoding planar target for camera calibration according to claim 8, wherein: in the coding plane target, the coding number of each parallelogram coding unit and the coding number of the calibration corner point are determined by position and color information analyzed by a coding plane target decoding method of all coding unit patterns in the coding parallelogram coding unit.
16. A computer-readable storage medium comprising a computer program for use in conjunction with an electronic device having image processing functionality, the computer program being executable by a processor to perform the decoding method of claim 1.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011540933 | 2020-12-23 | ||
CN2020115409331 | 2020-12-23 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113160329A CN113160329A (en) | 2021-07-23 |
CN113160329B true CN113160329B (en) | 2022-08-09 |
Family
ID=76890657
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110397468.9A Active CN113160329B (en) | 2020-12-23 | 2021-04-14 | Coding plane target for camera calibration and decoding method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113160329B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114299172B (en) | 2021-12-31 | 2022-07-08 | 广东工业大学 | Planar coding target for visual system and real-time pose measurement method thereof |
CN114302173B (en) * | 2021-12-31 | 2022-07-15 | 广东工业大学 | Two-dimensional image splicing system and method for planar coding target |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104864807A (en) * | 2015-04-10 | 2015-08-26 | 深圳大学 | Manipulator hand-eye calibration method based on active binocular vision |
CN104867160A (en) * | 2015-06-17 | 2015-08-26 | 合肥工业大学 | Directional calibration target for camera inner and outer parameter calibration |
CN104933717A (en) * | 2015-06-17 | 2015-09-23 | 合肥工业大学 | Camera intrinsic and extrinsic parameter automatic calibration method based on directional calibration target |
CN107292927A (en) * | 2017-06-13 | 2017-10-24 | 厦门大学 | A kind of symmetric motion platform's position and pose measuring method based on binocular vision |
EP3387372A1 (en) * | 2015-12-08 | 2018-10-17 | Carestream Dental Technology Topco Limited | 3-d scanner calibration with active display target device |
CN110763204A (en) * | 2019-06-25 | 2020-02-07 | 西安理工大学 | Planar coding target and pose measurement method thereof |
-
2021
- 2021-04-14 CN CN202110397468.9A patent/CN113160329B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104864807A (en) * | 2015-04-10 | 2015-08-26 | 深圳大学 | Manipulator hand-eye calibration method based on active binocular vision |
CN104867160A (en) * | 2015-06-17 | 2015-08-26 | 合肥工业大学 | Directional calibration target for camera inner and outer parameter calibration |
CN104933717A (en) * | 2015-06-17 | 2015-09-23 | 合肥工业大学 | Camera intrinsic and extrinsic parameter automatic calibration method based on directional calibration target |
EP3387372A1 (en) * | 2015-12-08 | 2018-10-17 | Carestream Dental Technology Topco Limited | 3-d scanner calibration with active display target device |
CN107292927A (en) * | 2017-06-13 | 2017-10-24 | 厦门大学 | A kind of symmetric motion platform's position and pose measuring method based on binocular vision |
CN110763204A (en) * | 2019-06-25 | 2020-02-07 | 西安理工大学 | Planar coding target and pose measurement method thereof |
Non-Patent Citations (2)
Title |
---|
Full-field 3D measurement using multi-camera digital image correlation system;Fanxiu Chen 等;《Optics and Lasers in Engineering》;20130413;全文 * |
双目立体视觉中靶标的设计与识别;乔晓勇等;《电子技术》;20090625(第06期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113160329A (en) | 2021-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113160329B (en) | Coding plane target for camera calibration and decoding method thereof | |
CN113129385B (en) | Binocular camera internal and external parameter calibration method based on multi-coding plane target in space | |
CN108573511B (en) | Point-distributed cooperative coding mark and identification and positioning method thereof | |
CN108921895B (en) | Sensor relative pose estimation method | |
CN112097689A (en) | Calibration method of 3D structured light system | |
CN110686599A (en) | Three-dimensional measurement method, system and device based on colored Gray code structured light | |
CN111981982B (en) | Multi-directional cooperative target optical measurement method based on weighted SFM algorithm | |
CN113096191B (en) | Intelligent calibration method for monocular camera based on coding plane target | |
CN113129386B (en) | Intelligent calibration method for internal and external parameters of binocular camera based on coding plane target | |
CN113129397B (en) | Decoding method of parallelogram coding mark based on graphic geometric relation | |
CN110570354B (en) | Strip chessboard calibration plate-based close-range image splicing method | |
CN112257721A (en) | Image target region matching method based on Fast ICP | |
CN115222828A (en) | Regular hexagon coding mark decoding method for visual positioning | |
CN113012271B (en) | Finger three-dimensional model texture mapping method based on UV (ultraviolet) mapping | |
CN113112550B (en) | Coding plane target for calibrating internal and external parameters of camera and coding method thereof | |
CN113129396B (en) | Decoding method of parallelogram coding mark based on region segmentation | |
CN113192143B (en) | Coding stereo target for camera quick calibration and decoding method thereof | |
CN113112549B (en) | Monocular camera rapid calibration method based on coding stereo target | |
CN116468805A (en) | Homography matrix determination method, system and equipment | |
CN114299172B (en) | Planar coding target for visual system and real-time pose measurement method thereof | |
CN113627548A (en) | Planar workpiece template matching method, device, medium and computer equipment | |
CN113129388B (en) | Coding stereo target for quickly calibrating internal and external parameters of camera and coding method thereof | |
CN115731312B (en) | Annular coding mark point extraction and identification method based on multi-feature relaxation constraint | |
Guo et al. | Automatic shape-based target extraction for close-range photogrammetry | |
CN113188524B (en) | Parallelogram coding sign based on graphic geometric relation and coding method thereof |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |