CN113160329A - Coding plane target for camera calibration and decoding method thereof - Google Patents

Coding plane target for camera calibration and decoding method thereof Download PDF

Info

Publication number
CN113160329A
CN113160329A CN202110397468.9A CN202110397468A CN113160329A CN 113160329 A CN113160329 A CN 113160329A CN 202110397468 A CN202110397468 A CN 202110397468A CN 113160329 A CN113160329 A CN 113160329A
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.)
Granted
Application number
CN202110397468.9A
Other languages
Chinese (zh)
Other versions
CN113160329B (en
Inventor
殷玉龙
朱华炳
杨昭辉
杨霈
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
Original Assignee
Hefei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei University of Technology filed Critical Hefei University of Technology
Publication of CN113160329A publication Critical patent/CN113160329A/en
Application granted granted Critical
Publication of CN113160329B publication Critical patent/CN113160329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

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 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 connected by any opposite angles as the 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

Coding plane target for camera calibration and decoding method thereof
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 primary and fundamental problem to be solved by the computer vision is 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 the calibration of the camera, the calibration needs to be realized through a calibration target, for example, a camera calibration algorithm based on radial constraint proposed by Roger Tsai in 1896, the algorithm is based on a three-dimensional target, and although the 3D three-dimensional target can realize the calibration of the camera and solve the internal and external parameters of the camera, the 3D three-dimensional target has a large volume, lacks certain flexibility and 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.
Arbitrarily take one of the encoding plane targetsMarking the parallelogram coding unit as a coding plane target vector determination coding unit gammavArbitrarily taking a coding plane target vector to determine a coding unit gammavOne vertex of the vector determination coding unit is marked as a first vertex o ″ of the vector determination coding unit1Determining a coding unit gamma in the coding plane target vectorvWherein the intersections form a vector defining a first vertex o ″' of the coding unit1Any one edge of the first edge is marked as a vector to determine first edge Ν of the coding unitv1Determining the first edge Ν of the coding unit in the vectorv1Upward orientation amount determination encoding unit ΓvThe vertex of (a) is marked as the first point o' on the first side of the vector-determined coding unit2Wherein the vector determines a first point o' on a first side of the coding unit2And vector determines the first vertex o ″ "of the coding unit1Are 2 points which are not coincident with each other, and the vector is recorded
Figure BDA0003019081030000021
To specify a vector
Figure BDA0003019081030000022
And 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 unit
Figure BDA0003019081030000023
Are in the same direction;
marking the plane where the coding plane target is as a target plane PtDetermining the first vertex o' of the coding unit by the vector1Making a prescribed vector for the starting point
Figure BDA0003019081030000024
The unit vector in the same direction is denoted as the 1 st predetermined unit vector
Figure BDA0003019081030000025
When the person looks at the target plane PtThen, the first vertex o' of the coding unit is determined by the vector1Is a center of rotationAt the target plane PtDefining the 1 st unit vector
Figure BDA0003019081030000026
Counterclockwise rotation by an angle beta '(0 DEG < beta' < 90 DEG) to obtain a 2 nd prescribed unit vector
Figure BDA0003019081030000027
Determining the first vertex o' of the coding unit in space as a vector1As a starting point, an
Figure BDA0003019081030000028
The unit vectors with the same direction are recorded as positive vectors
Figure BDA0003019081030000029
Determining a coding unit gamma by using a coding plane target vectorvUpper distance coding plane target vector determination coding unit gammavThe two nearest vertexes of the orientation pattern in (1) are respectively marked as the 1 st temporary vertex o ″3And the 2 nd temporary vertex o ″4(ii) a If it is
Figure BDA00030190810300000210
Direction of the resulting vector and the forward vector
Figure BDA00030190810300000211
Are in the same direction, they will be recorded as vectors
Figure BDA00030190810300000212
Auxiliary vector
Figure BDA00030190810300000213
If it is
Figure BDA00030190810300000214
Direction of the resulting vector and the forward vector
Figure BDA00030190810300000215
Are in the same direction, then vector will be generated
Figure BDA00030190810300000216
Is recorded as an auxiliary vector
Figure BDA00030190810300000217
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;
the position relationship between the positioning pattern and the orientation pattern in each parallelogram coding unit in the coding plane target is as follows, the direction pointing from the orientation pattern centroid to the positioning pattern centroid in the same parallelogram coding unit and the specified vector
Figure BDA0003019081030000031
Are 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 zvThe 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 targetp(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 P1(ii) a Wherein, the planar target gray image P is coded1Is 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 P1In the method, a checkerboard corner extraction algorithm based on growth is utilized to extract a coding plane target gray image P1The 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 extraction1No change occurred;
step 4, in the said coded plane target gray image P1In 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 assigned1The image obtained by the processing is recorded as a gray image P without a complex background target1′;
Step 5, aiming at the gray image P of the target without the complex background1' binarization processing is carried out, and a target gray level image P without complex background is obtained1' the image obtained by binarization processing is marked as a binarized image P without a complex background target2(ii) a Make the target binarized image P without complex background2The 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 target1The 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 background2Performing black connected domain corrosion treatment to ensure that no complex background target binaryzation image P2All the parallelogram coding units are disconnected at the diagonal positions, and the complex background-free target binary image P is obtained2The 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 background2When 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'2Searching 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 domainmJudging according to a formula (3);
Figure BDA0003019081030000051
(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 step 8 is executed;
(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'2And the mu maximum black connected domains in the image are respectively marked as grid connected domains omega1Grid connected domain omega2…, grid connected domain omegaμTaking an integerA variable i is given an initial value i which is 1;
binarizing corrosion image P 'at target'2Calculating the square connected domain omega in the above stepsiPixel coordinate of centroid (x)i,yi)iAnd 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'2Upper square connected domain omega1Grid connected domain omega2…, grid connected domain omegaμCentroid pixel coordinate (x)1,y1)1、(x2,y2)2、…、(xμ,yμ)μAnd will be (x)1,y1)1、(x2,y2)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'2In (1), calculating the distance grid connected domain omegaiCentroid pixel coordinate value (x)i,yi)iThe nearest black connected domain is recorded as a target binary corrosion image P'2Of (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'2Of (1) ring center connected region omega'1And 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'2In (1), calculating the distance grid connected domain omegaiCentroid pixel coordinate value (x)i,yi)iThe nearest black connected domain is recorded as a target binary corrosion image P'2Of (1) ring center connected region omega'i(ii) a The step is continuously executed after i +1 is reassigned to i until i > mu(ii) a Thus obtaining target binaryzation corrosion images P'2Of (1) ring center connected region omega'1And omega 'of circular ring center connected region'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'2In (1), calculating the target binaryzation corrosion image P'2Of (1) ring center connected region omega'iCentroid 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'2Of (1) ring center connected region omega'1And 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'2In, will remove square connected domain omega1Grid connected domain omega2…, grid connected domain omegaμAnd a circular ring center connected region omega'1And 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'2The image obtained by the processing is recorded as a decoded binary image P3
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 the Zeta th no-complexUnit binary image E with miscellaneous 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 P3Copying 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ζ,4Taking 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ζ,4The 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ζ,4In the method, the coordinate value (x ″) of the pixel of the center of mass of the ring is searchedd,ζ,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ζ,4In the above, the Zeta th calibration corner point quadrangle SζAll except imagesThe gray values of the pixel points are all 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 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ζ,EAnd 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 contour
Figure BDA0003019081030000081
Coded marker circle profile
Figure BDA0003019081030000082
Coded marker circle profile
Figure BDA0003019081030000083
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 mark
Figure BDA0003019081030000084
Centroid pixel coordinates of
Figure BDA0003019081030000085
This 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 of
Figure BDA0003019081030000086
Coded marker circle profile
Figure BDA0003019081030000087
Coded marker circle profile
Figure BDA0003019081030000088
Centroid pixel coordinates of
Figure BDA0003019081030000089
Figure BDA00030190810300000810
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 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ζ)ζOfDirection vectors in a parallelogram coding unit
Figure BDA00030190810300000811
Can 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
Figure BDA0003019081030000091
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 of
Figure BDA0003019081030000092
And 2 nd decision vector
Figure BDA0003019081030000093
And calculating the area division sine value 1sin alpha by the formulas (7) and (8)ζSum region dividing sine value 2sin betaζ
Figure BDA0003019081030000094
Figure BDA0003019081030000095
Figure BDA0003019081030000096
Figure BDA0003019081030000097
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ζ)ζC for the 1 st coding region in the parallelogram coding unitζ,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 for 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, no complicated background at the ζ thUnit binary image E ofζ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 vector
Figure BDA0003019081030000098
And 4 th judgment vector
Figure BDA0003019081030000099
Figure BDA00030190810300000910
Figure BDA0003019081030000101
Step 14.10, judging the vector according to the No. 3
Figure BDA0003019081030000102
And 4 th judgment vector
Figure BDA0003019081030000103
The area division sine value 3sin omega can be obtained by the formula (11) and the formula (12)ζSum region dividing sine value 4sin xiζ
Figure BDA0003019081030000104
Figure BDA0003019081030000105
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) Coordinate values ofIs 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 an angular point C of the 1 st 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, obtaining the coordinate value of the centroid pixel as (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
Figure BDA0003019081030000106
Figure BDA0003019081030000107
Unit binary image E without complex background at zeta thζIn terms of centroid pixel coordinatesA value of (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 point
Figure BDA0003019081030000108
Parallel and co-directional unit vectors, denoted as
Figure BDA0003019081030000109
And recording unit vector
Figure BDA00030190810300001010
The straight line is lζ,1(ii) a The coordinate value of the centroid pixel is (x)ζ,yζ)ζOf parallelogram-shaped coding units of (1)'d,ζ(x′d,ζ,y′d,ζ) Make a 5 th decision vector as a starting point
Figure BDA0003019081030000111
Parallel and co-directional unit vectors, denoted as
Figure BDA0003019081030000112
And 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
Figure BDA0003019081030000113
Figure BDA0003019081030000114
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 variables
Figure BDA0003019081030000115
And it is initialized by the computer system to be initialized,
Figure BDA0003019081030000116
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 of
Figure BDA0003019081030000117
Centroid pixel coordinates of
Figure BDA00030190810300001131
Respectively with the center o 'of the positioning circle'l,ζAnd a directional ring center o'd,ζThe formed ith group of 1 st quadrant vectors
Figure BDA0003019081030000118
And ith group of 2 nd quadrant vectors
Figure BDA0003019081030000119
Figure BDA00030190810300001110
Figure BDA00030190810300001111
According to the calculated 1 st quadrant vector of the ith group
Figure BDA00030190810300001112
And ith group of 2 nd quadrant vectors
Figure BDA00030190810300001113
Unit vector
Figure BDA00030190810300001114
And
Figure BDA00030190810300001115
and a direction vector
Figure BDA00030190810300001116
Calculated by the following equations (16), (17), (18) and (19)
Figure BDA00030190810300001117
cosγζ、cosηζ、cosθζ
Figure BDA00030190810300001118
Figure BDA00030190810300001119
Figure BDA00030190810300001120
Figure BDA00030190810300001121
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 if
Figure BDA00030190810300001122
Coded marker circle profile
Figure BDA00030190810300001123
The pixel falling on the centroid has a coordinate value of (x)ζ,yζ)ζOf the parallelogram coding unit1 in the coding region; order to
Figure BDA00030190810300001124
Figure BDA00030190810300001125
Then hold
Figure BDA00030190810300001126
Is assigned to
Figure BDA00030190810300001127
Reassign 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 if
Figure BDA00030190810300001128
Coded marker circle profile
Figure BDA00030190810300001129
The 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
Figure BDA00030190810300001130
Figure BDA0003019081030000121
Then hold
Figure BDA0003019081030000122
Is assigned to
Figure BDA0003019081030000123
Reassign 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 if
Figure BDA0003019081030000124
Coded marker circle profile
Figure BDA0003019081030000125
The 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
Figure BDA0003019081030000126
Figure BDA0003019081030000127
Then hold
Figure BDA0003019081030000128
Is assigned to
Figure BDA0003019081030000129
Reassign 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, if
Figure BDA00030190810300001210
Coded marker circle profile
Figure BDA00030190810300001211
The 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
Figure BDA00030190810300001212
Figure BDA00030190810300001213
Then hold
Figure BDA00030190810300001214
Is assigned to
Figure BDA00030190810300001215
Reassign 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, if
Figure BDA00030190810300001216
Coded marker circle profile
Figure BDA00030190810300001217
The 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
Figure BDA00030190810300001218
Figure BDA00030190810300001219
Then hold
Figure BDA00030190810300001220
Is assigned to
Figure BDA00030190810300001221
Reassign 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 if
Figure BDA00030190810300001222
Coded marker circle profile
Figure BDA00030190810300001223
The 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
Figure BDA00030190810300001224
Figure BDA00030190810300001225
Then hold
Figure BDA00030190810300001226
Is assigned to
Figure BDA00030190810300001227
Reassign 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, define
Figure BDA00030190810300001228
The 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),
Figure BDA00030190810300001229
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 if
Figure BDA00030190810300001230
Then
Figure BDA00030190810300001231
Assigning 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 if
Figure BDA00030190810300001232
Recording coordinate points
Figure BDA00030190810300001233
To a straight line lζ,1A distance of
Figure BDA00030190810300001234
To a straight line lζ,3A distance of
Figure BDA00030190810300001235
If it is
Figure BDA00030190810300001236
And order
Figure BDA00030190810300001237
If it is
Figure BDA00030190810300001238
Then order
Figure BDA00030190810300001239
Assigning 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 if
Figure BDA0003019081030000131
Recording coordinate points
Figure BDA0003019081030000132
To a straight line lζ,1A distance of
Figure BDA0003019081030000133
To a straight line lζ,3A distance of
Figure BDA0003019081030000134
If it is
Figure BDA0003019081030000135
Then order
Figure BDA0003019081030000136
If it is
Figure BDA0003019081030000137
Order to
Figure BDA0003019081030000138
Assigning 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, if
Figure BDA0003019081030000139
Then order
Figure BDA00030190810300001310
Assigning 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 if
Figure BDA00030190810300001311
Then
Figure BDA00030190810300001312
Assigning 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 if
Figure BDA00030190810300001313
Recording coordinate points
Figure BDA00030190810300001314
To a straight line lζ,2A distance of
Figure BDA00030190810300001340
To a straight line lζ,3A distance of
Figure BDA00030190810300001315
If it is
Figure BDA00030190810300001316
And order
Figure BDA00030190810300001317
If it is
Figure BDA00030190810300001318
Then order
Figure BDA00030190810300001319
Assign i +1 toGiving i, when i is more than 4, continuing to execute the next step 15.6; otherwise, returning to execute the step 15.5;
case 3 if
Figure BDA00030190810300001320
Recording coordinate points
Figure BDA00030190810300001321
To a straight line lζ,2A distance of
Figure BDA00030190810300001322
To a straight line lζ,3A distance of
Figure BDA00030190810300001323
If it is
Figure BDA00030190810300001324
Then order
Figure BDA00030190810300001325
If it is
Figure BDA00030190810300001326
Order to
Figure BDA00030190810300001327
Assigning 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, if
Figure BDA00030190810300001328
Then order
Figure BDA00030190810300001329
Assigning 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 if
Figure BDA00030190810300001330
Then
Figure BDA00030190810300001331
Assigning 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 if
Figure BDA00030190810300001332
Recording coordinate points
Figure BDA00030190810300001333
To a straight line lζ,1A distance of
Figure BDA00030190810300001334
To a straight line lζ,3A distance of
Figure BDA00030190810300001335
If it is
Figure BDA00030190810300001336
And order
Figure BDA00030190810300001337
If it is
Figure BDA00030190810300001338
Then order
Figure BDA00030190810300001339
Assigning 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 if
Figure BDA0003019081030000141
Recording coordinate points
Figure BDA0003019081030000142
To a straight line lζ,1A distance of
Figure BDA0003019081030000143
To a straight line lζ,3A distance of
Figure BDA0003019081030000144
If it is
Figure BDA0003019081030000145
Then order
Figure BDA0003019081030000146
If it is
Figure BDA0003019081030000147
Order to
Figure BDA0003019081030000148
Assigning 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, if
Figure BDA0003019081030000149
Then order
Figure BDA00030190810300001410
Assigning 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)
Wherein, the column vector U is (20, 2)1,22,...211)TColumn vector
Figure BDA00030190810300001411
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);
zeta-th unit binary image E without complex backgroundζThe upper centroid pixel coordinate value 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) is
Figure BDA00030190810300001412
Wherein the lower foot mark WζFor calibrating angular points
Figure BDA00030190810300001413
The coding number of the parallelogram coding unit, and the value of the upper corner mark sigma represents the calibration corner point
Figure BDA00030190810300001414
The 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
Figure BDA00030190810300001415
(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 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:
obtaining the Zeth unit binary image E without complex backgroundζThe upper centroid pixel coordinate value is (x)ζ,yζ)ζ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、Δ′ζ,2_σ′ζ,2、Δ′ζ,3_σ′ζ,3、Δ′ζ,4_σ′ζ,4Respectively 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、σ′ζ,4Are 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 of
Figure BDA0003019081030000153
This step can be divided into the following cases:
case 1, if σζ,i1 or σζ,iWhen W is equal to 6, the product is put inζValue of to delta'ζ,iWill σζ,iValue of to σ'ζ,iThen 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 Δ'ζ,iAssigning 6 to σ'ζ,iThen 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'ζ,iAssigning 1 to σ'ζ,iThen 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 of
Figure BDA0003019081030000151
This step can be divided into the following cases:
case 1, if σζ,i1 or σζ,iWhen W is equal to 6, the product is put inζValue of to delta'ζ,iWill σζ,iValue of to σ'ζ,iThen calibrating the corner point Cζ,i(xζ,i,yζ,i) Is delta 'as the unique code number'ζ,i_σ′ζ,i
Case 2, if σζ,iWhen the value is 3, the following two cases are divided into:
(1) when phi ispWhen being equal to 1, will(WζValue of- Δ ') to Δ'ζ,iAssigning 6 to σ'ζ,iThen 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),
Figure BDA0003019081030000152
wherein Δ ″ ═ 2 (W)ζ-zv) V (N +1) +1 (integers only retained);
(2) when phi ispWhen being equal to 2, (W) isζValue of- Δ '") to Δ'ζ,iAssigning 6 to σ'ζ,iThen 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),
Figure BDA0003019081030000161
wherein Δ ″ ═ 2 (W)ζ-zv+1)/(N +1) +1 (integers only retained);
case 3, if σζ,iThe following two cases are divided into two cases:
(1) when phi ispWhen the value is 1, (W) isζValue of- Δ ') to Δ'ζ,iAssigning 1 to σ'ζ,iThen calibrating the corner point Cζ,i(xζ,i,yζ,i) Is delta 'as the unique code number'ζ,i_σ′ζ,iWherein Δ' can be derived from formula (23);
Figure BDA0003019081030000162
wherein Δ ″ ═ 2 (W)ζ-zv) V (N +1) +1 (integers only retained);
(2) when phi ispWhen being equal to 2, (W) isζ- Δ' ") is assigned to Δ′ζ,iAssigning 1 to σ'ζ,iThen 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),
Figure BDA0003019081030000163
wherein Δ ″ ═ 2 (W)ζ-zv+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 delta'ζ,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 Ot-XtYtZt(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 phipThen can be according to phipThe numerical values are classified into the following two cases:
case 1 when phipWhen 1, the 1 st parallelogram coding unit in the 1 st line is denoted
Figure BDA0003019081030000164
In as the origin calibration corner point alpha'1At the moment, an origin is selected to mark the angular point alpha'1Origin O as target coordinate systemtTo assist the vector
Figure BDA0003019081030000165
As a target coordinate system XtThe direction of the axis;
case 2 when phipWhen 2, the 1 st parallelogram coding unit in the 1 st row is respectively marked
Figure BDA0003019081030000171
Is epsilon 'as two calibration corner points'3And ε3According to the calibrated corner point epsilon'3And ε3The positional relationship of (c) can be further classified into the following cases:
(1) when vector
Figure BDA0003019081030000172
Direction and auxiliary vector of
Figure BDA0003019081030000173
Is the same, the calibration corner point epsilon 'is selected at the moment'3Origin O as target coordinate systemtTo assist the vector
Figure BDA0003019081030000174
Is taken as X of a target coordinate systemtThe direction of the axis;
(2) when vector
Figure BDA0003019081030000175
Direction and auxiliary vector of
Figure BDA0003019081030000176
When the directions of the two points are different, the calibration corner point epsilon' is selected at the moment3Origin O as target coordinate systemtTo assist the vector
Figure BDA0003019081030000177
Is taken as X of a target coordinate systemtThe direction of the axis;
step 18.2, with forward vector
Figure BDA0003019081030000178
As Z of the target coordinate systemtDirection of axis, X of target coordinate systemtAxis, ZtAxis and YtThe axis meets the right-hand criterion, so as to establish a target coordinate system Ot-XtYtZt
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_σ′ζ,iOf σ'ζ,i1 ═ 1; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure BDA0003019081030000179
wherein when
Figure BDA00030190810300001710
When taken, when
Figure BDA00030190810300001711
Taking-;
case 2, if Δ'ζ,i_σ′ζ,iOf σ'ζ,i6; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure BDA00030190810300001712
wherein when
Figure BDA00030190810300001713
When taken, when
Figure BDA00030190810300001714
Taking-;
in this step 19.2, the process is now described,
Figure BDA00030190810300001715
when in use
Figure BDA00030190810300001716
In the case of an odd number of the groups,
Figure BDA00030190810300001717
when in use
Figure BDA00030190810300001718
In the case of an even number, the number of the first,
Figure BDA00030190810300001719
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_σ′ζ,iOf σ'ζ,i1 ═ 1; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure BDA0003019081030000181
wherein when
Figure BDA0003019081030000182
When taken, when
Figure BDA0003019081030000183
Taking-;
case 2, if Δ'ζ,i_σ′ζ,iOf σ'ζ,i6; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure BDA0003019081030000184
wherein when
Figure BDA0003019081030000185
When taken, when
Figure BDA0003019081030000186
Taking-;
in this step 19.3
Figure BDA0003019081030000187
(the result retains only integer bits);
when in use
Figure BDA0003019081030000188
In the case of an odd number of the groups,
Figure BDA0003019081030000189
when in use
Figure BDA00030190810300001810
In the case of an even number, the number of the first,
Figure BDA00030190810300001811
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_σ′ζ,1Pixel 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_σ′ζ,2Pixel 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_σ′ζ,3Pixel 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_σ′ζ,4Pixel 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.
Therefore, according to all the steps, the gray image P of the plane target can be obtained and coded1Target coordinates corresponding to the pixel coordinates of all calibration corner points in the polygon L with the maximum number of the middle 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, thereby completing the coding of the planar targetAnd (4) decoding.
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 encoding planar target in an embodiment of the present invention;
FIG. 2 is a block diagram of an embodiment of the present inventionPrescribed vector of face target
Figure BDA0003019081030000191
And an auxiliary vector
Figure BDA0003019081030000192
A 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 performing 8-bit grayscale processing on a captured coded planar target image1A schematic diagram of (a);
FIG. 5 is a target gray scale image P of the ablation target1Complex background-free target gray level image P obtained by calibrating complex background outside polygon L with maximum angular point number1' schematic view;
FIG. 6 is a gray scale image P of a target without a complex background1' binarization image P without complex background target obtained by binarization processing2A schematic diagram of (a);
FIG. 7 is a unit binary image E without complex background1A 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 unit1The vector determines a first point o' on a first side of the coding unit2Specifying the vector
Figure BDA0003019081030000201
And an auxiliary vector
Figure BDA0003019081030000202
As 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 unit
Figure BDA0003019081030000203
Are 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 positioned in the space comprises 8 rows multiplied by 12 columns of calibration angular points, the code number of an initial parallelogram coding unit of the coding plane target is 0, and the number phi of the calibration angular points in 4 vertexes of a 1 st parallelogram coding unit of a 1 st row on the coding plane targetp==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 P1(ii) a Wherein, the planar target gray image P is coded1An 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, wherein the x-axis direction of the pixel coordinate system of the calibration corner point is from left to right, and the y-axis direction of the pixel coordinate system of the calibration corner point is from top to bottom; thereby establishing a pixel coordinate system o-xy of the calibration corner point;
using a growth-based checkerboard corner extraction algorithm (checkerboard detection algorithm proposed by Automatic Camera and Range Sensor Calibration using a single Shot)Method) extracting a coded planar target grayscale image P1The 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 extraction1No change occurred;
step 4, in the said coded plane target gray image P1In the method, the gray values of all the pixels inside the polygon L with the maximum number of the calibration angle points in the step 3 are kept unchanged by using a digital image processing method, the gray values of all the pixels outside the polygon L are assigned to be 255, and the gray image P of the coding plane target is processed1The image obtained by the processing is recorded as a gray image P without a complex background target1', as shown in FIG. 5;
step 5, aiming at the gray image P of the target without the complex background1' binarization processing is carried out, and a target gray level image P without complex background is obtained1' the image obtained by binarization processing is marked as a binarized image P without a complex background target2So that the image P is binarized on the target without complex background2The 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 target1The 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 parallelogram coding sheetThe element number judgment threshold value L' is 0.2; target binary image P without complex background2Performing black connected domain corrosion treatment on the image to ensure that no complex background target binaryzation image P2All the parallelogram coding units are disconnected at the diagonal positions, and the complex background-free target binary image P is obtained2The image obtained by the processing is marked as a target binaryzation corrosion image P'2
Binarizing corrosion image P 'at target'2Searching 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 pixel point chi contained in the tail end black connected domainmChi in the present embodimentm164, 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'211 maximum black connected domains in the image are respectively marked as grid connected domains omega1Grid connected domain omega2…, grid connected domain omega11(ii) a Taking an integer variable i, and giving an initial value i to 1;
binarizing corrosion image P 'at target'2Calculating the square connected domain omega in the above stepsiPixel coordinate of centroid (x)i,yi)iAnd (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'2Upper square connected domain omega1Grid connected domain omega2…, grid connected domain omega11Centroid pixel coordinates (1154,696)1、…、(x11,y11)11And will (1154,696)1、…、(x11,y11)11Sequentially 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'2In (1), calculating the distance grid connected domain omegaiCentroid pixel coordinate (x)i,yi)iThe nearest black connected domain is recorded as a target binary corrosion image P'2Of (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'2Of (1) ring center connected region omega'1And 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;
binarizing corrosion image P 'at target'2In (1), calculating the target binaryzation corrosion image P'2Of (1) ring center connected region omega'iCentroid 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'2Of (1) ring center connected region omega'1And omega 'of circular ring center connected region'2…, ring center connected region omega'11Centroid 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'2In, will remove square connected domain omega1Grid connected domain omega2…, grid connected domain omega11And a circular ring center connected region omega'1And omega 'of circular ring center connected region'2…, ring center connected region omega'11The 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'2The image obtained by the processing is recorded as a decoded binary image P3
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 background1The method comprises the following specific steps:
step 13.1, decoding the binary image P3Copying and backing up, and recording the copied image as a 1 st backup binary image P1,4
Step 13.2, backup binarization image P at 1 st1,4Taking the 1 st centroid coordinate value in the parallelogram coding unit centroid pixel coordinate set A (1154,696)1Finding the coordinate value of distance centroid in the set of calibration corner points Q (1154,696)1Pixel coordinate values of the nearest 4 calibration corner points, and the binarization image P at the 1 st backup1,4Respectively marking 4 pixel points corresponding to the pixel coordinate values of the 4 calibration angular points as C1,1(1333,546.2)、C1,2(1333,790.8)、C1,3(1088,790.8)、C1,4(1087,546.2); and taking the 4 pixel points as the 1 st calibration angular point quadrangle S1And connecting the 4 vertexes to form a 1 st calibration corner point quadrangle S1
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)1A corresponding circle centroid pixel coordinate of circle 1 (1211,715);
step 13.4, backup binarization image P at 1 st1,4Searching 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 st1,4In the above, the 1 st calibration corner point quadrangle S1Except that the gray values of all the pixel points are assigned to be 255, and the 1 st calibration corner point quadrangle S1Keeping the gray values of all internal pixel points unchanged, and marking the obtained image as the 1 st unit binary image E without complex background1As 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 background1In the method, a unit binary image E with the maximum black connected domain and marked as the 1 st no complex background is searched1Maximum black connected component Ω in1,E(ii) a Extracting the 1 st unit binary image E without complex background1Maximum black connected component Ω in1,EAnd is recorded as the centroid pixel coordinate value of (1154,696)1Of a parallelogram-shaped coding unit D1
Step 14.2, the coordinate value of the centroid pixel is (1154,696)1Of a parallelogram-shaped coding unit D1In 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 background1The pixel coordinate value of the middle mass center is (1154,696)1In a parallelogram coding unit of (2) an outline G of a positioning circle1Calculating the positioning circle profile G1And is recorded as the 1 st unit binary image without complex background1The coordinate value of the upper centroid pixel is (1154,696)1Positioning 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)1Of a parallelogram-shaped coding unit D1In (1), the 2 contours with the largest number of pixels are removed, and the remaining k1(wherein κ10,1,2, 3.) contours, in this example κ1If 2, the 2 contours are the 1 st unit binarized image E without complex background1The coordinate of the upper mass center is (1154,696)1The coding mark circle contour in the parallelogram coding unit is respectively marked as the coding mark circle contour
Figure BDA0003019081030000251
Coded marker circle profile
Figure BDA0003019081030000252
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 background1Calculating the contour of the coding mark circle
Figure BDA0003019081030000253
Centroid pixel coordinates of
Figure BDA0003019081030000254
Assigning i +1 to i again and continuing to execute the step until i is greater than 2; can obtain the corresponding coding mark circular contour
Figure BDA0003019081030000255
Coded marker circle profile
Figure BDA0003019081030000256
Centroid pixel coordinates of
Figure BDA0003019081030000257
Figure BDA0003019081030000258
Step 14.6, binarizing the image E in the 1 st unit without complex background1And recording the pixel point with the pixel coordinate value of (1211,715) as the centroid coordinate value of (1154,696)1Of 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 background1In 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 background1Upper, get C1,1(x1,1,y1,1)、C1,2(x1,2,y1,2)、C1,3(x1,3,y1,3)、C1,4(x1,4,y1,4) Respectively representing a centroid pixel coordinate value of (1154,696)1The 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)1In a parallelogram coding unit
Figure BDA0003019081030000261
This can be derived from equation (4):
Figure BDA0003019081030000262
simultaneously recording through the center of mass o 'of the positioning circle'l,1And a directional ring centroid o'd,1Is a straight line of1,3
Step 14.8, binarizing the image E in the 1 st unit without complex background1Last, 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 C1,1min(x1,1min,y1,1min) And C1,2min(x1,2min,y1,2min) (ii) a In this embodiment, C1,1min(x1,1min,y1,1min) Is C'1,1(1333,546.2),C1,2min(x1,2min,y1,2min) Is C'1,4(1087,546.2) calculating the centroid pixel coordinate value (1154,696) by the formulas (5) and (6)11 st decision vector in a parallelogram coding unit of
Figure BDA0003019081030000263
And 2 nd decision vector
Figure BDA0003019081030000264
Respectively as follows:
Figure BDA0003019081030000265
Figure BDA0003019081030000266
the area division sine value 1sin alpha is calculated by the formula (7) and the formula (8)1Sum region dividing sine value 2sin beta1Respectively as follows:
Figure BDA0003019081030000267
Figure BDA0003019081030000268
due to sin alpha1<0,sinβ1If greater than 0, then C1,1min(1333,546.2) the centroid pixel coordinate value is (1154,696)1C for the 1 st coding region in the parallelogram coding unit1,1min(1333,546.2) assigning a pixel coordinate value to C1,1(x1,1,y1,1);C1,2min(1088,546.2) the centroid pixel coordinate value is (1154,696)1C of the 6 th coding region in the parallelogram coding unit1,2min(1088,546.2) assigning a pixel coordinate value to C1,4(x1,4,y1,4);
Step 14.9, binarizing the image E in the 1 st unit without complex background1The coordinate value of the centroid pixel is found to be (1154,696)1The calibration corner points C of the 1 st coding region and the 6 th coding region in the parallelogram coding unit1,1(1333,546.2) and C1,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)1The 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)1Of the parallelogram coding unit of (3) th decision vector
Figure BDA0003019081030000271
And 4 th judgment vector
Figure BDA0003019081030000272
Respectively as follows:
Figure BDA0003019081030000273
Figure BDA0003019081030000274
step 14.10, according to the calculated 3 rd judgment vector
Figure BDA0003019081030000275
And 4 th judgment vector
Figure BDA0003019081030000276
The area division sine value 3sin omega can be obtained by the formula (11) and the formula (12)1Sum region dividing sine value 4sin xi1Respectively as follows:
Figure BDA0003019081030000277
Figure BDA0003019081030000278
due to sin omega1==0,sinξ1Not equal to 0, then C'1,5(1333,790.8) the centroid pixel coordinate value is (1154,696)1C 'to the index corner point of the 3 rd coding region in the parallelogram coding unit of (1)'1,5(1333,790.8) to C1,2(x1,2,y1,2);C′1,6(1088,790.8) the centroid pixel coordinate value is (1154,696)1C 'to the index corner point of the 4 th coding region in the parallelogram coding unit of'1,6(1088,790.8) to C1,3(x1,3,y1,3);
So far, the image E is binarized in the 1 st unit without complex background1In the above, the centroid pixel coordinate value is found to be (1154,696)1Is marked with an angular point C of the 1 st coding region in the parallelogram coding unit1,1(1333,546.2) and a 3 rd coding region calibration corner point C1,2(1333,790.8) and a calibration corner point C of the 4 th encoding region1,3(1088,790.8) and the calibration corner point C of the 6 th encoding region1,4(1088,546.2);
Step 15, according to the obtained barycenter pixel coordinate value (1154,696)1The 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 background1The pixel coordinate value of the middle mass center is (1154,696)1The coding number W of the parallelogram coding unit on the coding plane target placed in the actual space corresponding to the parallelogram coding unit1The method comprises the following specific steps:
step 15.1, binarizing the image E in the 1 st unit without complex background1According to the obtained coordinate value of the pixel at the centroid as (1154,696)1Is marked with an angular point C of the 1 st coding region in the parallelogram coding unit1,1(1333,546.2), calibration corner point C of the 6 th encoding region1,4(1088,546.2) the centroid coordinate is (1154,696) from equation (13)1The 5 th decision vector in the parallelogram coding unit of
Figure BDA0003019081030000279
Comprises the following steps:
Figure BDA0003019081030000281
while recording the vector
Figure BDA0003019081030000282
The straight line is l1,3
Binarizing image E in 1 st unit without complex background1The coordinate value of the centroid pixel is (1154,696)1Positioning circle center of mass o 'of parallelogram encoding unit'l,1(1211,621) as a starting point with a 5 th decision vector
Figure BDA0003019081030000283
Parallel and co-directional unit vectors, denoted as
Figure BDA0003019081030000284
And recording unit vector
Figure BDA0003019081030000285
The straight line is l1,1The coordinate value of the centroid pixel is (1154,696)1Of parallelogram-shaped coding units of (1)'d,1(1211,715) as a starting point with a 5 th decision vector
Figure BDA0003019081030000286
Parallel and co-directional unit vectors, denoted as
Figure BDA0003019081030000287
And recording the straight line of the unit vector as l1,2(ii) a Re-assigning the integer variable i to 1;
step 15.2, defining 6 floating point type two-dimensional arrays Cr1 1[2][2]、Cr1 2[2][2]、Cr1 3[2][2]、Cr1 4[2][2]、Cr1 5[2][2]、Cr1 6[2][2]For storing the pixel coordinate value of centroid as(1154,696)1The 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 background1Initializing all elements in the 6 two-dimensional arrays according to the pixel coordinates, and assigning the values to be-1; taking 6 integer variables
Figure BDA0003019081030000288
And it is initialized by the computer system to be initialized,
Figure BDA0003019081030000289
re-assigning the integer variable i to 1;
step 15.3, binarizing the image E in the 1 st unit without complex background1Calculating the centroid pixel coordinate value is (1154,696)1In a parallelogram coding unit of
Figure BDA00030190810300002810
Centroid pixel coordinates of
Figure BDA00030190810300002811
And
Figure BDA00030190810300002812
respectively with the center of mass o 'of the positioning circle'l,1Oriented ring centroid o'd,1Formed 1 st group of 1 st quadrant vectors
Figure BDA00030190810300002813
And group 1,2 nd quadrant vector
Figure BDA00030190810300002814
And group 2 quadrant 1 vectors
Figure BDA00030190810300002815
And group 2 quadrant 2 vectors
Figure BDA00030190810300002829
Figure BDA00030190810300002817
Figure BDA00030190810300002818
According to the calculated 1 st group of 1 st quadrant vectors
Figure BDA00030190810300002819
And group 1,2 nd quadrant vector
Figure BDA00030190810300002820
Group 2, quadrant 1 vectors
Figure BDA00030190810300002821
And group 2 quadrant 2 vectors
Figure BDA00030190810300002822
Unit vector
Figure BDA00030190810300002823
And
Figure BDA00030190810300002824
and a direction vector
Figure BDA00030190810300002825
Calculated by the following equations (16), (17), (18) and (19)
Figure BDA00030190810300002826
And
Figure BDA00030190810300002827
the results are as follows:
Figure BDA00030190810300002828
Figure BDA0003019081030000291
Figure BDA0003019081030000292
Figure BDA0003019081030000293
Figure BDA0003019081030000294
Figure BDA0003019081030000295
Figure BDA0003019081030000296
Figure BDA0003019081030000297
the pixel coordinate value at the mass center is (1154,696)1In the parallelogram coding unit of (1), the judgment result of the coding region to which the coding flag circle belongs is as follows:
Figure BDA0003019081030000298
coded marker circle profile
Figure BDA0003019081030000299
The coordinate value of the pixel falling on the centroid is (1154,696)1The 1 st coding region of the parallelogram coding unit of (1); order to
Figure BDA00030190810300002910
Figure BDA00030190810300002911
Figure BDA00030190810300002912
Coded marker circle profile
Figure BDA00030190810300002913
The coordinate value of the pixel falling on the centroid is (1154,696)1The 2 nd coding region of the parallelogram coding unit of (1); order to
Figure BDA00030190810300002914
Figure BDA00030190810300002915
Step 15.4, define
Figure BDA00030190810300002916
The coordinate value of the representative centroid pixel is (1154,696)1The 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),
Figure BDA00030190810300002917
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:
Figure BDA00030190810300002918
and is
Figure BDA00030190810300002919
Satisfy the requirement of
Figure BDA00030190810300002920
Then
Figure BDA00030190810300002921
Figure BDA00030190810300002922
And is
Figure BDA00030190810300002923
Satisfy the requirement of
Figure BDA00030190810300002924
Then
Figure BDA00030190810300002925
Step 15.6, in this embodiment, the following steps can be obtained:
Figure BDA00030190810300002926
then
Figure BDA00030190810300002927
Figure BDA00030190810300002928
Then
Figure BDA00030190810300002929
Step 15.7, in a specific embodiment, this step can result in:
Figure BDA00030190810300002930
then
Figure BDA00030190810300002931
Figure BDA00030190810300002932
Then
Figure BDA00030190810300002933
Step 15.8, the coordinate value of the centroid pixel obtained by the steps is (1154,696)1The 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 background1The center of mass pixel coordinate is a value (1154,696)1The coding number W of the parallelogram coding unit on the coding plane target placed in the actual space corresponding to the parallelogram coding unit1Comprises the following steps: w1=V1 TU ═ 10; wherein, the column vector U is (2)0,21,22,...211)TColumn vector V1=(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 background1The coordinate value of the upper centroid pixel is (1154,696)1The 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 L10 σWherein the lower foot mark 10 is a calibration corner point L10 σThe coding number of the parallelogram coding unit, the value of the upper corner mark sigma represents the calibration corner point L10 σThe sigma-th coding region; that is, the coordinates of the centroid pixel are obtained as (1154,696)14 calibration angular points C on the parallelogram coding unit1,1(1333,546.2)、C1,2(1333,790.8)、C1,3(1088,790.8)、C1,4(1088,546.2) the non-unique code numbers are each
Figure BDA0003019081030000301
Figure BDA0003019081030000302
(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 background1The coordinate value of the upper centroid pixel is (1154,696)1On 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,4Respectively used for storing the coordinates of the mass center as (1154,696)14 calibration angular points C on the parallelogram coding unit1,1(1333,546.2)、C1,2(1333,790.8)、C1,3(1088,790.8)、C1,4(1088,546.2) a unique code number, wherein Δ'1,1、Δ′1,2、Δ′1,3、Δ′1,4、σ′1,1、σ′1,2、σ′1,3、σ′1,4Are 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 calibrated1,i(x1,i,y1,i) Non-unique code number of
Figure BDA0003019081030000303
This step can be divided into the following cases:
case 1, if σ1,i1 or σ1,iTo 6, 10 is assigned to Δ'1,iWill σ1,iValue of to σ'1,iThen calibrating the corner point C1,i(x1,i,y1,i) Is 10_ σ'1,i
Case 2, if σ1,iTo 3,4 is assigned to Δ'1,iAssigning 6 to σ'1,iThen calibrating the corner point C1,i(x1,i,y1,i) The unique code number of (2) is 4_ 6;
case 3, if σ1,iTo 4, assign 3 to Δ'1,iAssigning 1 to σ'1,iThen calibrating the corner point C1,i(x1,i,y1,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 obtained1The upper centroid pixel coordinate is (1154,696)1The 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 C1,1(1333,546.2) the corresponding unique code number is 10_ 1;
calibrating angular point C1,2(1333,790.8) the corresponding unique code number is 4_ 6;
calibrating angular point C1,3(1088,790.8) the corresponding unique code number is 3_ 1;
calibrating angular point C1,4(1088,546.2) the corresponding unique code number is 10_ 6;
step 18, establishing a target coordinate system Ot-XtYtZt(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 phipThen can be according to phipThe numerical values are classified into the following two cases:
case 1 when phipWhen 1, the 1 st parallelogram coding unit in the 1 st line is denoted
Figure BDA0003019081030000311
In as the origin calibration corner point alpha'1At the moment, an origin is selected to mark the angular point alpha'1Origin O as target coordinate systemtTo assist the vector
Figure BDA0003019081030000312
As a target coordinate system XtThe direction of the axis;
case 2 when phipWhen 2, the 1 st parallelogram coding unit in the 1 st row is respectively marked
Figure BDA0003019081030000313
Is epsilon 'as two calibration corner points'3And ε3According to the calibrated corner point epsilon'3And ε3The positional relationship of (c) can be further classified into the following cases:
(1) when vector
Figure BDA0003019081030000314
Direction and auxiliary vector of
Figure BDA0003019081030000315
Is the same, the calibration corner point epsilon 'is selected at the moment'3Origin O as target coordinate systemtTo assist the vector
Figure BDA0003019081030000316
Is taken as X of a target coordinate systemtThe direction of the axis;
(2) when vector
Figure BDA0003019081030000317
Direction and auxiliary vector of
Figure BDA0003019081030000318
When the directions of the two points are different, the calibration corner point epsilon' is selected at the moment3Origin O as target coordinate systemtTo assist the vector
Figure BDA0003019081030000319
Is taken as X of a target coordinate systemtThe direction of the axis;
step 18.2, with forward vector
Figure BDA00030190810300003110
As Z of the target coordinate systemtDirection of axis, X of target coordinate systemtAxis, ZtAxis and YtThe axis meets the right-hand criterion, so as to establish a target coordinate system Ot-XtYtZt
Step 19, at the known centroid pixelThe coordinate is (1154,696)14 calibration angular points C on the parallelogram coding unit1,1(1333,546.2)、C1,2(1333,790.8)、C1,3(1088,790.8)、C1,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_11,1(1333,546.2) the target coordinate is (X)1,1,Y1,1,0)=(168,24,0);
Pixel coordinate C of calibration corner point with unique code serial number of 4_61,2(1333,790.8) the target coordinate is (X)1,2,Y1,2,0)=(168,0,0);
Pixel coordinate C of calibration corner point with unique code serial number of 3_11,3(1088,790.8) the target coordinate is (X)1,3,Y1,3,0)=(144,0,0);
Pixel coordinate C of calibration corner point with unique code serial number of 10_61,4(1088,546.2) the target coordinate is (X)1,4,Y1,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 coded1And 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 implementationIn the example, a 1 st unit binary image E without complex background is obtained by using a target coordinate calculation method of a calibration corner point on a coding plane target1The coordinate value of the upper centroid pixel is (1154,696)1The 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,iOf σ'1,i1 ═ 1; then the code number is delta'1,i_σ′1,iThe target coordinates corresponding to the calibration corner points are as follows: (24. rho.)10,24·δ10,0);
Case 2, if Δ'1,i_σ′1,iOf σ'1,i6; then the code number is delta'1,i_σ′1,iThe target coordinates corresponding to the calibration corner points are as follows: (24. (. rho.)10-1),24·δ10,0);
In this step, δ10=2Δ′1,i13 (the result retains only integer bits);
when delta10When it is odd, ρ10={Δ′1,i-[12·δ10/2+(δ10+1)/2]}·2+1;
When delta10When 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,Y1,1,0)、(X1,2,Y1,2,0)、(X1,3,Y1,3,0)、(X1,4,Y1,4,0);
In the bookIn the examples:
Figure BDA0003019081030000331
thereby obtaining a centroid pixel coordinate of (1154,696)1The 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 zvThe 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 targetp
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 P1
Step 3, establishingCalibrating the pixel coordinate system of the angular point, and coding the gray image P of the plane target1In the method, a checkerboard corner extraction algorithm is used for extracting a gray level image P of a coding plane target1The 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 P1In 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 assigned1The image obtained by the processing is recorded as a gray level image P 'without a complex background target'1
Step 5, carrying out gray level image P 'without complex background target'1Performing binarization processing, and obtaining a grayscale image P 'without a complex background target'1Marking the image obtained by binarization as a binary image P without a complex background target2
6, according to the gray image P of the coded plane target1The 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 background2Performing black connected domain corrosion treatment to ensure that no complex background target binaryzation image P2All the parallelogram coding units are disconnected at the diagonal positions, and the complex background-free target binary image P is obtained2The image obtained by the processing is marked as a target binaryzation corrosion image P'2
Step 8, finding binaryzation corrosion image P 'in target'2And the mu maximum black connected domains in the image are respectively marked as grid connected domains omega1Grid connected domain omega2…, grid connected domain omegaμCalculating to obtain a target binarization corrosion image P'2Upper square connected domain omega1Grid connected domain omega2…, grid connected domain omegaμCentroid pixel coordinate (x)1,y1)1、(x2,y2)2、…、(xμ,yμ)μAnd will be (x)1,y1)1、(x2,y2)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'2In the method, a target binarization corrosion image P 'is obtained through calculation'2Of (1) ring center connected region omega'1And omega 'of circular ring center connected region'2…, ring center connected region omega'μ
Step 10, binarizing the corrosion image P 'on the target'2In the method, a target binarization corrosion image P 'is obtained through calculation'2Of (1) ring center connected region omega'1And 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'2In, will remove square connected domain omega1Grid connected domain omega2…, grid connected domain omegaμAnd a circular ring center connected region omega'1And omega 'of circular ring center connected region'2…, ring center connected region omega'μGray values of other black connected domainsAssigning value to be 255, and binarizing the target to obtain a corrosion image P'2The image obtained by the processing is recorded as a decoded binary image P3
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ζ)ζ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ζ
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) Is only oneA code number;
step 18, establishing a target coordinate system Ot-XtYtZt
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_σ′ζ,1Pixel 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_σ′ζ,2Pixel 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_σ′ζ,3Pixel 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_σ′ζ,4Pixel 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 ζ th background-freeUnit binary image EζThe method comprises the following specific steps:
step 13.1, decoding the binary image P3Copying 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ζ,4Taking 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ζ,4The 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ζ,4In the method, the coordinate value (x ″) of the pixel of the center of mass of the ring is searchedd,ζ,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ζ,4In 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ζ,EAnd 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ζThe outline is a sheet without complex background at the zeta thMeta-binary image Eζ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 contour
Figure FDA0003019081020000041
Coded marker circle profile
Figure FDA0003019081020000042
… coded marker circle outline
Figure FDA0003019081020000043
Wherein κζ=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 mark
Figure FDA0003019081020000044
Centroid pixel coordinates of
Figure FDA0003019081020000045
This 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 of
Figure FDA0003019081020000046
Coded marker circle profile
Figure FDA0003019081020000047
… coded marker circle outline
Figure FDA0003019081020000048
Centroid pixel coordinates of
Figure FDA0003019081020000049
Figure FDA00030190810200000410
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 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; 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
Figure FDA0003019081020000051
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ζ)ζ1 st decision vector in a parallelogram coding unit of
Figure FDA0003019081020000052
And 2 nd decision vector
Figure FDA0003019081020000053
And 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 According to the calculated coordinate value of the centroid pixel as (x)ζ,yζ)ζOf the parallelogram coding unit of (3) th decision vector
Figure FDA0003019081020000054
And 4 th judgment vector
Figure FDA0003019081020000055
Step 14.10, judging the vector according to the No. 3
Figure FDA0003019081020000056
And 4 th judgment vector
Figure FDA0003019081020000057
Obtaining 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 natureThe coordinate value of the heart pixel is (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 of
Figure FDA0003019081020000061
The 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 point
Figure FDA0003019081020000062
Parallel and co-directional unit vectors
Figure FDA0003019081020000063
The 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 point
Figure FDA0003019081020000064
Parallel and co-directional unit vectors
Figure FDA0003019081020000065
Re-assigning the integer variable i to 1;
step 15.2, defining 6 floating point type two-dimensional arrays
Figure FDA0003019081020000066
Figure FDA0003019081020000067
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 variables
Figure FDA0003019081020000068
And it is initialized by the computer system to be initialized,
Figure FDA0003019081020000069
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 of
Figure FDA00030190810200000610
Centroid pixel coordinates of
Figure FDA00030190810200000611
Respectively with the center o 'of the positioning circle'l,ζAnd a directional ring center o'd,ζThe formed ith group of 1 st quadrant vectors
Figure FDA00030190810200000612
And ith group of 2 nd quadrant vectors
Figure FDA00030190810200000613
According to
Figure FDA00030190810200000614
And
Figure FDA00030190810200000615
unit vector
Figure FDA00030190810200000616
And
Figure FDA00030190810200000617
and a direction vector
Figure FDA00030190810200000618
Respectively calculate
Figure FDA00030190810200000619
And according to
Figure FDA00030190810200000620
Respectively 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 calculation
Figure FDA00030190810200000621
Determining 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 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) is
Figure FDA0003019081020000071
Wherein the lower foot mark WζFor calibrating angular points
Figure FDA0003019081020000072
The coding number of the parallelogram coding unit, and the value of the upper corner mark sigma represents the calibration corner point
Figure FDA0003019081020000073
The 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
Figure FDA0003019081020000074
(where σζ,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_σ′ζ,4Respectively 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、σ′ζ,4Are 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 of
Figure FDA0003019081020000075
This step 17.4 can be divided into the following cases:
case 1, if σζ,i1 or σζ,iWhen W is equal to 6, the product is put inζValue of to delta'ζ,iWill σζ,iValue of to σ'ζ,iThen 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 Δ'ζ,iAssigning 6 to σ'ζ,iThen 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'ζ,iAssigning 1 to σ'ζ,iThen 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 of
Figure FDA0003019081020000076
This step 17.5 can be divided into the following cases:
case 1, if σζ,i1 or σζ,iWhen W is equal to 6, the product is put inζValue of to delta'ζ,iWill σζ,iValue of to σ'ζ,iThen calibrating the corner point Cζ,i(xζ,i,yζ,i) Is delta 'as the unique code number'ζ,i_σ′ζ,i
Case 2, if σζ,iWhen the value is 3, the following two cases are divided into:
(1) when phi ispWhen the value is 1, (W) isζValue of- Δ ') to Δ'ζ,iAssigning 6 to σ'ζ,iThen calibrating the corner point Cζ,i(xζ,i,yζ,i) Is delta 'as the unique code number'ζ,i_σ′ζ,i(ii) a Wherein
Figure FDA0003019081020000081
Δ″=2(Wζ-zv) V (N +1) +1 (integers only retained);
(2) when phi ispWhen being equal to 2, (W) isζA value of- Δ' ")Is assigned to delta'ζ,iAssigning 6 to σ'ζ,iThen calibrating the corner point Cζ,i(xζ,i,yζ,i) Is delta 'as the unique code number'ζ,i_σ′ζ,i(ii) a Wherein
Figure FDA0003019081020000082
Δ″=2(Wζ-zv+1)/(N +1) +1 (integers only retained);
case 3, if σζ,iThe following two cases are divided into two cases:
(1) when phi ispWhen the value is 1, (W) isζValue of- Δ ') to Δ'ζ,iAssigning 1 to σ'ζ,iThen calibrating the corner point Cζ,i(xζ,i,yζ,i) Is delta 'as the unique code number'ζ,i_σ′ζ,iWherein
Figure FDA0003019081020000083
Δ″=2(Wζ-zv) V (N +1) +1 (integers only retained);
(2) when phi ispWhen being equal to 2, (W) isζValue of- Δ '") to Δ'ζ,iAssigning 1 to σ'ζ,iThen calibrating the corner point Cζ,i(xζ,i,yζ,i) Is delta 'as the unique code number'ζ,i_σ′ζ,iWherein
Figure FDA0003019081020000084
Δ″=2(Wζ-zv+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.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 Zeta th uncomplicated corner is obtained by using the target coordinate calculation method of the calibration corner point on the coding plane targetUnit binary image E of backgroundζ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_σ′ζ,iOf σ'ζ,i1 ═ 1; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure FDA0003019081020000091
wherein when
Figure FDA0003019081020000092
When taken, when
Figure FDA0003019081020000093
Taking-;
case 2, if Δ'ζ,i_σ′ζ,iOf σ'ζ,i6; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure FDA0003019081020000094
wherein when
Figure FDA0003019081020000095
When taken, when
Figure FDA0003019081020000096
Taking-;
in this step 19.2, the process is now described,
Figure FDA0003019081020000097
(the result retains only integer bits);
when in use
Figure FDA0003019081020000098
In the case of an odd number of the groups,
Figure FDA0003019081020000099
when in use
Figure FDA00030190810200000910
In the case of an even number, the number of the first,
Figure FDA00030190810200000911
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_σ′ζ,iOf σ'ζ,i1 ═ 1; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure FDA00030190810200000912
wherein when
Figure FDA00030190810200000913
When taken, when
Figure FDA00030190810200000914
Taking-;
case 2, if Δ'ζ,i_σ′ζ,iOf σ'ζ,i6; then the unique code number is delta'ζ,i_σ′ζ,iThe target coordinates corresponding to the calibration corner points are as follows:
Figure FDA00030190810200000915
wherein when
Figure FDA00030190810200000916
When taken, when
Figure FDA00030190810200000917
Taking-;
in this step 19.3
Figure FDA00030190810200000918
(the result retains only integer bits);
when in use
Figure FDA00030190810200000919
In the case of an odd number of the groups,
Figure FDA00030190810200000920
when in use
Figure FDA0003019081020000101
In the case of an even number, the number of the first,
Figure FDA0003019081020000102
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 calculating target coordinate values of 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: in each parallelogram coding unit on the coding plane target, 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 encoded planar target of 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.
CN202110397468.9A 2020-12-23 2021-04-14 Coding plane target for camera calibration and decoding method thereof Active CN113160329B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2020115409331 2020-12-23
CN202011540933 2020-12-23

Publications (2)

Publication Number Publication Date
CN113160329A true CN113160329A (en) 2021-07-23
CN113160329B 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)

Cited By (2)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104867160A (en) * 2015-06-17 2015-08-26 合肥工业大学 Directional calibration target for camera inner and outer parameter calibration
CN104864807A (en) * 2015-04-10 2015-08-26 深圳大学 Manipulator hand-eye calibration method based on active binocular vision
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
FANXIU CHEN 等: "Full-field 3D measurement using multi-camera digital image correlation system", 《OPTICS AND LASERS IN ENGINEERING》 *
乔晓勇等: "双目立体视觉中靶标的设计与识别", 《电子技术》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114302173A (en) * 2021-12-31 2022-04-08 广东工业大学 Planar coding target and image splicing system and method applying same
CN114299172A (en) * 2021-12-31 2022-04-08 广东工业大学 Planar coding target for visual system and real-time pose measurement method thereof
CN114299172B (en) * 2021-12-31 2022-07-08 广东工业大学 Planar coding target for visual system and real-time pose measurement method thereof
CN114302173B (en) * 2021-12-31 2022-07-15 广东工业大学 Two-dimensional image splicing system and method for planar coding target
US11689737B1 (en) 2021-12-31 2023-06-27 Guangdong University Of Technology Plane coding target and image splicing system and method applying the same
US11699244B2 (en) 2021-12-31 2023-07-11 Guangdong University Of Technology Planar coding target for vision system and real-time pose measurement method thereof

Also Published As

Publication number Publication date
CN113160329B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN113160329B (en) Coding plane target for camera calibration and decoding method thereof
CN112097689B (en) Calibration method of 3D structured light system
CN109859226B (en) Detection method of checkerboard corner sub-pixels for graph segmentation
CN108573511B (en) Point-distributed cooperative coding mark and identification and positioning method thereof
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
CN113129385B (en) Binocular camera internal and external parameter calibration method based on multi-coding plane target in space
CN113129397B (en) Decoding method of parallelogram coding mark based on graphic geometric relation
CN111179360B (en) High-precision automatic calibration plate and calibration method
CN109345571B (en) Point cloud registration method based on extended Gaussian image
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
CN115222828A (en) Regular hexagon coding mark decoding method for visual positioning
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
CN114299172B (en) Planar coding target for visual system and real-time pose measurement method thereof
CN116468805A (en) Homography matrix determination method, system and equipment
Kim et al. Fast computation of a visual hull
CN113129388B (en) Coding stereo target for quickly calibrating internal and external parameters of camera and coding method thereof
CN113627548A (en) Planar workpiece template matching method, device, medium and computer equipment
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
CN115731312B (en) Annular coding mark point extraction and identification method based on multi-feature relaxation constraint

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