CN113902814B - Unified calibration method for multiple cameras on automatic crane sling - Google Patents
Unified calibration method for multiple cameras on automatic crane sling Download PDFInfo
- Publication number
- CN113902814B CN113902814B CN202111480198.4A CN202111480198A CN113902814B CN 113902814 B CN113902814 B CN 113902814B CN 202111480198 A CN202111480198 A CN 202111480198A CN 113902814 B CN113902814 B CN 113902814B
- Authority
- CN
- China
- Prior art keywords
- camera
- coordinate system
- spreader
- hanger
- container
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 239000011159 matrix material Substances 0.000 claims abstract description 52
- 238000001514 detection method Methods 0.000 claims abstract description 15
- 238000012937 correction Methods 0.000 claims abstract description 9
- 230000009466 transformation Effects 0.000 claims description 14
- 238000013519 translation Methods 0.000 claims description 14
- 238000012795 verification Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000002156 mixing Methods 0.000 claims description 3
- 230000003287 optical effect Effects 0.000 claims description 3
- 230000036544 posture Effects 0.000 claims description 3
- 230000001131 transforming effect Effects 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 206010063385 Intellectualisation Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Control And Safety Of Cranes (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention provides a unified calibration method for multiple cameras on an automatic crane sling, which comprises the following steps: s1: correspondingly installing hanger cameras near lock heads of the crane hangers respectively to ensure that the view finding directions of the hanger cameras are vertically downward and are respectively aligned with lock holes at one end of the container far away from the ground; s2: constructing a camera coordinate system of each lifting appliance and a world coordinate system of the container; distortion correction is carried out on the keyhole images acquired by the four lifting appliance cameras respectively to obtain an internal reference matrix of each lifting appliance camera; s3: respectively carrying out keyhole detection on four keyhole images acquired by a hanger camera, and carrying out keyhole positioning; s4: extracting the edge of the lockhole by adopting an ellipse fitting algorithm, and acquiring the virtual circumscribed rectangle of the lockhole ellipse and extracting the image coordinates of four vertexes of the virtual circumscribed rectangle; s5: resolving an external parameter matrix of each lifting appliance camera relative to a container world coordinate system; s6: and solving the relative pose of each hanger camera coordinate system constructed by the hanger cameras.
Description
Technical Field
The invention relates to the technical field of port intelligent hoisting equipment, in particular to a unified calibration method for multiple cameras on an automatic crane sling.
Background
With the rapid development of port intellectualization, the demand of ports for automatic box stacking is increasingly urgent. However, in the automatic box stacking, subsystems such as first-layer box opening, automatic box grabbing, automatic box stacking and the like need to estimate the relative pose relationship between the lifting appliance cameras, and then the box grabbing and the box placing are achieved. The importance of external reference calibration among pinhole cameras on the lifting appliance is self-evident, how to quickly and accurately estimate the pose relationship among lifting appliance phases, and the efficiency and the effect of automatic box stacking are directly related. The traditional calibration method is mainly used for calibrating external parameters among cameras in pin holes on a lifting appliance in modes of a calibration plate, obvious markers placed on the ground and the like. This method is relatively cumbersome.
Aiming at the traditional multi-camera calibration method, the calibration process is necessary to be simplified, and the camera calibration efficiency and the automatic box stacking efficiency of a crane are improved.
Disclosure of Invention
In view of the above, the present invention provides a unified calibration method for multiphase external parameters on an automatic crane spreader.
The technical scheme of the invention is realized as follows: the invention provides a unified calibration method for multiple cameras on an automatic crane sling, which comprises the following steps:
s1: correspondingly installing a spreader camera near a lock head of a crane spreader respectively, enabling the view finding direction of each spreader camera to be vertically downward and to be respectively aligned with a lock hole at one end of a container far away from the ground, and respectively acquiring images corresponding to four different lock holes on the end surface of the same container by the four spreader cameras;
s2: constructing a coordinate system of each hanger camera, and constructing a world coordinate system of the container; distortion correction is carried out on the keyhole images acquired by the four lifting appliance cameras respectively to obtain an internal reference matrix of each lifting appliance camera;
s3: respectively carrying out keyhole detection on four keyhole images acquired by a hanger camera, and carrying out keyhole positioning;
s4: extracting the edge of the lock hole from the positioned graph of the lock hole by adopting an ellipse fitting algorithm, acquiring a virtual circumscribed rectangle of the ellipse of the lock hole, and extracting image coordinates of four vertexes of the virtual circumscribed rectangle from an image coordinate system corresponding to each hanger camera;
s5: extracting image coordinates of each vertex of the virtual circumscribed rectangle from the internal reference matrix of the spreader camera obtained in the step S2 and the image coordinate system obtained in the step S4, and calculating the external reference matrix of each spreader camera relative to the container world coordinate system;
s6: and solving the relative pose of each hanger camera coordinate system constructed by the hanger cameras according to a coordinate transformation theory.
Based on the above technical solution, preferably, the obtaining of the internal reference matrix of each spreader camera in step S2 is to establish a camera coordinate system of each spreader camera, respectively, and let four spreader cameras be A, B, C and D, and the corresponding camera coordinate systems be A, B, C and D, respectively、、And(ii) a The Z-axis direction of each camera coordinate system is the direction that the optical axis of the hanger camera points to the lock hole at one end of the container far away from the ground, and the X-axis and the Y-axis of each camera coordinate system are respectively vertical to the Z-axis direction; constructing a container world coordinate system by using the geometric center of the upper surface of the container as an origin and the length extension direction, the width extension direction and the vertical downward direction of the container as coordinate axes(ii) a Distortion correction is carried out on the keyhole images acquired by the four lifting appliance cameras respectively by adopting a Zhang friend calibration method: transforming the keyhole image in the world coordinate system of the container into a point in the pixel coordinate system of each hanger camera by each hanger camera to enable the internal reference matrix of each hanger cameraWherein, in the step (A),,,andthe number of pixels representing a unit distance in two axial directions of a two-dimensional coordinate in an image coordinate system;is the focal length of each sling camera,andis the focal lengthBlending with pixel aspect ratio;the radial distortion parameter indicates the included angle of the board edge calibrated by the chessboard adopted by the calibration method of shooting in the image coordinate system;andthe coordinates of the center of the camera light-sensitive plate of the lifting appliance in a pixel coordinate system; the corresponding internal reference matrix is obtained for each of the spreader cameras A, B, C and D.
Preferably, in the step S3, the detection of the four keyhole images acquired by the spreader camera is performed by using a target detection algorithm YOLO V5 to detect and identify the region where the keyhole is located.
Preferably, the extracting of the image coordinates of the four vertexes of the virtual circumscribed rectangle is to select the image coordinates of points located at the edge of the keyhole area in an image coordinate system, construct an ellipse in a binomial fitting manner, and solve the central position, the major axis and the minor axis of the ellipse; and respectively offsetting the axial directions of the long axis and the short axis by the distances of the semi-short axis and the semi-long axis by taking the center of the ellipse as a reference, wherein coordinates of four vertexes of the virtual circumscribed rectangle enclosed by offsetting under the image coordinate system are the image coordinates of the vertexes to be extracted.
Preferably, the external reference matrix of each lifting appliance camera relative to the container world coordinate system is solved, and the extracted image coordinate of each keyhole virtual external rectangle vertex is、、And16 sets of coordinates in total; the 16 groups of image coordinates correspond to a container world coordinate systemIs defined as a three-dimensional coordinate of、、And(ii) a According to the hanger camera pinhole model, the following relationship exists for the hanger camera A:
since the internal reference matrix of each spreader camera has been obtained in step S2, the first term on the right side of the above equations 1, 2, 3 and 4、、、Andare all known in the art and are all known,andrespectively represent two-dimensional image coordinates of the vertex of a virtual circumscribed rectangle of the lock hole corresponding to the hanger camera A,、andrespectively represent the three-dimensional coordinates of the vertex of the virtual circumscribed rectangle of the lock hole corresponding to the hanger camera A under the world coordinate system of the container,;scale factors from the container world coordinate system to the spreader camera; the equations are solved by a PnP algorithm to obtain the pose of the spreader camera A relative to the containerAnd(ii) a In the same way, the positions and postures of the spreader cameras B, C and D relative to the container are respectively obtainedAnd、andandand,is the transpose of the zero matrix.
Preferably, the equation set is solved by adopting a PnP algorithm, namely, a P3P algorithm is adopted, that is, 3 of the image coordinates of the virtual circumscribed rectangle vertexes of each lock hole are selected, three-dimensional coordinates of the virtual circumscribed rectangle vertexes of the lock hole corresponding to the three points under a container world coordinate system are selected, three groups of corresponding image coordinates and three-dimensional coordinates are formed as feature points for calculation, and results of solving four groups of poses of the spreader camera relative to the container are formed, and the remaining 1 virtual circumscribed rectangle vertexes of the lock hole and the three-dimensional coordinates of the vertexes under the corresponding container world coordinate system are used as verification points; and respectively calculating the reprojection errors of the verification points according to the calculated result of each pose, and selecting the result of the pose with the minimum reprojection error as the pose of the spreader camera relative to the container.
Further preferably, the calculation of the relative pose of each spreader camera coordinate system in step S6 adopts the following method: according to the coordinate transformation theory, a point exists in the world coordinate system of the containerThen, the coordinate transformation relationship of the point in the spreader camera a is as follows:,andthe same can obtain the point for the pose of the spreader camera A relative to the containerCoordinate transformation relationships among spreader cameras B, C and D are,,;、、Andis a pointThree-dimensional coordinates in a coordinate system corresponding to spreader cameras A, B, C and D; the above equations are combined, and the conversion relation between the hanger camera coordinate system corresponding to the hanger camera B and the hanger camera coordinate system corresponding to the hanger camera A is as follows:then, the external reference matrix of the spreader camera B relative to the spreader camera a is: rotation matrixTranslation vectorWhereinIs composed ofThe inverse matrix of (d); similarly, the transformation relationship between the spreader camera C and the spreader camera coordinate system of the spreader camera B is:,is thatThe inverse matrix of (d); the conversion relation between the coordinate systems of the hanger camera D relative to the hanger camera C is as follows:,is thatThe inverse matrix of (c).
Compared with the prior art, the unified calibration method for the multiple cameras on the automatic crane lifting appliance has the following beneficial effects:
(1) according to the scheme, the hanger camera is correspondingly arranged at the position of the hanger lock head, images of each lock hole of the container are obtained, and target detection is realized on the lock holes through a deep learning algorithm; then accurately extracting boundary points of the lock hole through ellipse fitting, constructing an ellipse virtual circumscribed rectangle and a vertex thereof, solving the pose of each hanger camera relative to the container through the actual size of the lock hole, further acquiring the relative pose of each hanger camera, simplifying the calibration process of external parameters of the multi-phase machine, avoiding arranging auxiliary marks on the ground, and improving the efficiency of automatic container stacking of the container;
(2) solving an internal reference matrix of each spreader camera, and then solving the pose of the most reasonable spreader camera with the minimum error relative to the container by combining the projection relation between the virtual circumscribed rectangle vertex coordinate of the lock hole under the image coordinate system and the coordinate under the container world coordinate system;
(3) the method combining the image distortion correction, the keyhole elliptical contour fitting, the PnP algorithm and other solving means is adopted, so that the calculation process has better efficiency and precision.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a unified calibration method for multiple cameras on an automated crane spreader according to the present invention;
FIG. 2 is a layout plan view of spreader cameras on the spreader in the unified calibration method for multiple cameras on the spreader of the automated crane according to the present invention;
FIG. 3 is a schematic diagram of a lock hole image acquired by a spreader camera of the unified calibration method for multiple cameras on an automatic crane spreader of the present invention;
FIG. 4 is a schematic diagram of the coordinate systems of the cameras of the unified calibration method for multiple cameras on the lifting appliance of the automatic crane according to the present invention
FIG. 5 is a schematic diagram of a world coordinate system of a container, lock holes, and a virtual rectangle circumscribing each lock hole according to the unified calibration method for multiple cameras on an automated crane spreader of the present invention;
FIG. 6 is a schematic diagram of the unified calibration method for multiple cameras on the lifting appliance of the automatic crane according to the present invention, wherein 20-foot cabinets are used for calibration;
FIG. 7 is a schematic diagram of the unified calibration method for multiple cameras on the automatic crane spreader according to the present invention, wherein a 40-foot cabinet is used for calibration verification.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1-5, the present invention provides a unified calibration method for multiple cameras on an automatic crane spreader, comprising the following steps:
s1: correspondingly installing a spreader camera near a lock head of a crane spreader respectively, enabling the view finding direction of each spreader camera to be vertically downward and to be respectively aligned with a lock hole at one end of a container far away from the ground, and respectively acquiring images corresponding to four different lock holes on the end surface of the same container by the four spreader cameras;
s2: constructing a coordinate system of each hanger camera, and constructing a world coordinate system of the container; distortion correction is carried out on the keyhole images acquired by the four lifting appliance cameras respectively to obtain an internal reference matrix of each lifting appliance camera;
the specific method comprises the following steps: as shown in fig. 4, the camera coordinate systems of the spreader cameras are respectively established, the four spreader cameras are A, B, C and D, and the corresponding camera coordinate systems are respectively、、And(ii) a The Z-axis direction of each camera coordinate system is the direction that the optical axis of the hanger camera points to the lock hole at one end of the container far away from the ground, and the X-axis and the Y-axis of each camera coordinate system are respectively vertical to the Z-axis direction; as shown in fig. 5, a container world coordinate system is constructed with the geometric center of the upper surface of the container as the origin and the length extending direction, the width extending direction, and the vertically downward direction of the container as coordinate axes(ii) a Distortion correction is carried out on the keyhole images acquired by the four lifting appliance cameras respectively by adopting a Zhang friend calibration method: transforming the keyhole image in the world coordinate system of the container into a point in the pixel coordinate system of each hanger camera by each hanger camera to enable the internal reference matrix of each hanger cameraWherein, in the step (A),,,andthe number of pixels representing a unit distance in two axial directions of a two-dimensional coordinate in an image coordinate system;is the focal length of each sling camera,andis the focal lengthBlending with pixel aspect ratio;the radial distortion parameter indicates the included angle of the board edge calibrated by the chessboard adopted by the calibration method of shooting in the image coordinate system;andthe coordinates of the center of the camera light-sensitive plate of the lifting appliance in a pixel coordinate system; the corresponding internal reference matrix is obtained for each of the spreader cameras A, B, C and D. Such as、、、Andare respectively provided withThe internal parameters of the internal parameter matrix of the hanger camera A are represented, different cameras are distinguished by different footmarks, and the marking method of the internal parameters of the hanger cameras B, C is similar to that of the hanger camera D. Distortion correction is performed by adopting a Zhangyingyou calibration method, and belongs to the technical means known by the technical personnel in the field.
S3: respectively carrying out keyhole detection on four keyhole images acquired by a hanger camera, and carrying out keyhole positioning; in this embodiment, the four keyhole images acquired by the spreader camera are used for keyhole detection, and a target detection algorithm YOLO V5 is used for detecting and identifying the areas where the keyholes are located. The target detection algorithm YOLO is an abbreviation of You Only Look one, and the core idea is to predict the position and the type of a detected target, divide an image into a plurality of grids, enable each grid to be responsible for target detection in the grid, and predict the positioning confidence coefficient and the type probability vector of the target contained in all the grids at one time to complete the detection and the identification of the target at one time. The target detection algorithm YOLO V5 is an open source algorithm, and can obtain codes at websites such as gitubs, and belongs to the prior art known by those skilled in the art, and is not described herein again.
S4: extracting the edge of the lock hole from the positioned graph of the lock hole by adopting an ellipse fitting algorithm, acquiring a virtual circumscribed rectangle of the ellipse of the lock hole, and extracting image coordinates of four vertexes of the virtual circumscribed rectangle from an image coordinate system corresponding to each hanger camera;
after identifying the lockhole area, selecting the image coordinates of points positioned at the edge of the lockhole area in an image coordinate system, constructing an ellipse by a binomial fitting mode, fitting an elliptic curve according to the known image coordinates, and selecting an nlinfit function for fitting in MATLAB; solving the central position, the major axis and the minor axis of the ellipse; and respectively offsetting the distances of the semi-short axis and the semi-long axis of the long axis and the short axis to the axial direction of the image coordinate system symmetrically by taking the center of the ellipse as a reference, wherein the coordinates of four vertexes of the virtual circumscribed rectangle surrounded by offset under the image coordinate system are the image coordinates of the vertexes to be extracted.
S5: extracting image coordinates of each vertex of the virtual circumscribed rectangle from the internal reference matrix of the spreader camera obtained in the step S2 and the image coordinate system obtained in the step S4, and calculating the external reference matrix of each spreader camera relative to the container world coordinate system;
the specific method comprises the following steps: in step S4, the extracted image coordinates of the vertices of the virtual circumscribed rectangle for each keyhole are set to、、And16 sets of coordinates in total; the 16 groups of image coordinates correspond to a container world coordinate systemIs defined as a three-dimensional coordinate of、、And(ii) a According to the hanger camera pinhole model, the following relationship exists for the hanger camera A:
since the internal reference matrix of each spreader camera has been obtained in step S2, the first term on the right side of the above equations 1, 2, 3 and 4、、、Andare all known in the art and are all known,andrespectively represent two-dimensional image coordinates of the vertex of a virtual circumscribed rectangle of the lock hole corresponding to the hanger camera A,、andrespectively represent the three-dimensional coordinates of the vertex of the virtual circumscribed rectangle of the lock hole corresponding to the hanger camera A under the world coordinate system of the container,;scale factors from the container world coordinate system to the spreader camera; the equations are solved by a PnP algorithm to obtain the pose of the spreader camera A relative to the containerAnd(ii) a In the same way, the positions and postures of the spreader cameras B, C and D relative to the container are respectively obtainedAnd、andandandobtaining an external reference matrix of each sling camera,is the transpose of the zero matrix.
As a preferred mode, the PnP algorithm is a P3P algorithm, that is, 3 of the image coordinates of the vertices of the virtual circumscribed rectangles of each keyhole are selected, three-dimensional coordinates of the vertices of the virtual circumscribed rectangles of the keyhole corresponding to the three points in the world coordinate system of the container are selected, three sets of corresponding image coordinates and three-dimensional coordinates are formed as feature points for calculation, the results of four sets of poses of the spreader camera relative to the container are solved, and the remaining vertices of the virtual circumscribed rectangles of the keyhole and the three-dimensional coordinates of the vertices in the world coordinate system of the container corresponding to the three sets of corresponding image coordinates and three-dimensional coordinates are used as verification points; and respectively calculating the reprojection errors of the verification points according to the calculated result of each pose, and selecting the result of the pose with the minimum reprojection error as the pose of the spreader camera relative to the container.
S6: solving the relative pose of each hanger camera coordinate system constructed by hanger cameras according to a coordinate transformation theory; the method specifically comprises the following steps: let a point exist in the world coordinate system of the containerThen, the coordinate transformation relationship of the point in the spreader camera a is as follows:,andthe same can obtain the point for the pose of the spreader camera A relative to the containerCoordinate transformation relationships among spreader cameras B, C and D are,,;、、Andis a pointThree-dimensional coordinates in a coordinate system corresponding to spreader cameras A, B, C and D; the above equations are combined, and the conversion relation between the hanger camera coordinate system corresponding to the hanger camera B and the hanger camera coordinate system corresponding to the hanger camera A is as follows:then, the external reference matrix of the spreader camera B relative to the spreader camera a is: rotation matrixTranslation vectorWhereinIs composed ofThe inverse matrix of (d); similarly, the transformation relationship between the spreader camera C and the spreader camera coordinate system of the spreader camera B is:,in order to be a vector of rotation,in order to translate the vector, the vector is translated,is thatThe inverse matrix of (d); the conversion relation between the coordinate systems of the hanger camera D relative to the hanger camera C is as follows:,in order to be a matrix of rotations,in order to translate the vector, the vector is translated,is thatThe inverse matrix of (c).
As shown in fig. 6-7, the multi-camera unified calibration method of the present embodiment is now verified, and the above calibration process is completed by using 20 containers, and the 20 containers are placed in the central position of the world coordinate system of the container, so that the external parameters of the spreader camera B relative to the spreader camera a are: rotation matrixTranslation vector(ii) a Making the external parameters of the hanger camera C relative to the hanger camera B as follows: rotation matrixTranslation vector(ii) a Making the external parameters of the hanger camera D relative to the hanger camera C as follows: rotation matrixTranslation vector;
Then, the calibration verification is carried out by using 40-foot containers, and the 40-foot containers are arranged at the central position of the world coordinate system of the containers: the width of the flexible both wings of hoist removes the length of matching the container, when current 40 chi container calibration is verified, makes hoist camera B be for hoist camera A's external parameter: rotation matrixTranslation vector(ii) a Making the external parameters of the hanger camera C relative to the hanger camera B as follows: rotation matrixTranslation vector(ii) a Making the external parameters of the hanger camera D relative to the hanger camera C as follows: rotation matrixTranslation vector;
The four spreader cameras A, B, C and D only generate horizontal displacement, and do not generate relative rotation between the spreader cameras, the spreader camera A or C at one end of the spreader in the horizontal direction is only in the X of the container world coordinate system relative to the spreader camera B or D at the other endWTranslating in the axial direction; the rotation matrix in the extrinsic parameters is substantially unchanged; x of translation vector of spreader camera A or C relative to spreader camera B or D in world coordinate system of containerWThe direction is twice of the translation vector when the 20-foot container is calibrated, and the translation amount in other axial directions is unchanged; therefore, the following relationship exists:
and the suffix of each translation vector respectively represents the components of the translation vector in the directions of three coordinate axes of the container world coordinate system. If the above relations are met, the calibration verification is successful, otherwise, the verification fails, and the verification needs to be performed again from the steps S2 to S6, and then the verification is performed again between the 20-size container and the 40-size container. The deviation of two sides of the approximate equal sign in the relation is not more than 5 percent, and the requirement can be considered to be met.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (2)
1. The unified calibration method for the multiple cameras on the automatic crane sling is characterized by comprising the following steps of: the method comprises the following steps:
s1: correspondingly installing a spreader camera near a lock head of a crane spreader respectively, enabling the view finding direction of each spreader camera to be vertically downward and to be respectively aligned with a lock hole at one end of a container far away from the ground, and respectively acquiring images corresponding to four different lock holes on the end surface of the same container by the four spreader cameras;
s2: constructing a coordinate system of each hanger camera, and constructing a world coordinate system of the container; distortion correction is carried out on the keyhole images acquired by the four lifting appliance cameras respectively to obtain an internal reference matrix of each lifting appliance camera;
s3: respectively carrying out keyhole detection on four keyhole images acquired by a hanger camera, and carrying out keyhole positioning;
s4: extracting the edge of the lock hole from the positioned graph of the lock hole by adopting an ellipse fitting algorithm, acquiring a virtual circumscribed rectangle of the ellipse of the lock hole, and extracting image coordinates of four vertexes of the virtual circumscribed rectangle from an image coordinate system corresponding to each hanger camera;
s5: extracting image coordinates of each vertex of the virtual circumscribed rectangle from the internal reference matrix of the spreader camera obtained in the step S2 and the image coordinate system obtained in the step S4, and calculating the external reference matrix of each spreader camera relative to the container world coordinate system;
s6: solving the relative pose of each hanger camera coordinate system constructed by hanger cameras according to a coordinate transformation theory;
in the step S2, the obtaining of the internal reference matrix of each spreader camera is to establish a camera coordinate system of each spreader camera, where the four spreader cameras are A, B, C and D, and the corresponding camera coordinate systems are A, B, C and D, respectively、、And(ii) a The Z-axis direction of each camera coordinate system is the direction that the optical axis of the hanger camera points to the lock hole at one end of the container far away from the ground, and the X-axis and the Y-axis of each camera coordinate system are respectively vertical to the Z-axis direction; constructing a container world coordinate system by using the geometric center of the upper surface of the container as an origin and the length extension direction, the width extension direction and the vertical downward direction of the container as coordinate axes(ii) a Distortion correction is carried out on the keyhole images acquired by the four lifting appliance cameras respectively by adopting a Zhang friend calibration method: transforming the keyhole image in the world coordinate system of the container into a point in the pixel coordinate system of each hanger camera by each hanger camera to enable the internal reference matrix of each hanger cameraWherein,,Andthe number of pixels representing a unit distance in two axial directions of a two-dimensional coordinate in an image coordinate system;is the focal length of each sling camera,andis the focal lengthBlending with pixel aspect ratio;the radial distortion parameter indicates the included angle of the board edge calibrated by the chessboard adopted by the calibration method of shooting in the image coordinate system;andthe coordinates of the center of the camera light-sensitive plate of the lifting appliance in a pixel coordinate system; respectively solving corresponding internal reference matrixes for the sling cameras A, B, C and D;
in the step S3, the detection of the four keyhole images acquired by the spreader camera is performed by using a target detection algorithm YOLO V5 to detect and identify the region where the keyhole is located;
the extraction of the image coordinates of the four vertexes of the virtual circumscribed rectangle is to select the image coordinates of points positioned at the edge of the lockhole area in an image coordinate system, construct an ellipse in a binomial fitting mode, and solve the central position, the major axis and the minor axis of the ellipse; respectively offsetting the axial directions of the long axis and the short axis by the distances of the semi-short axis and the semi-long axis by taking the center of the ellipse as a reference, wherein coordinates of four vertexes of a virtual circumscribed rectangle enclosed by offsetting under an image coordinate system are image coordinates of vertexes to be extracted;
each lifting appliance is solvedThe camera makes the image coordinate of the vertex of the virtual circumscribed rectangle of each keyhole as the extracted image coordinate of the external reference matrix of the world coordinate system of the container in step S4、、And16 sets of coordinates in total; the 16 groups of image coordinates correspond to a container world coordinate systemIs defined as a three-dimensional coordinate of、、And(ii) a According to the hanger camera pinhole model, the following relationship exists for the hanger camera A:
since the internal reference matrix of each spreader camera has been obtained in step S2, the first term on the right side of the above equations 1, 2, 3 and 4、、、Andare all known in the art and are all known,andrespectively represent two-dimensional image coordinates of the vertex of a virtual circumscribed rectangle of the lock hole corresponding to the hanger camera A,、andrespectively represent the three-dimensional coordinates of the vertex of the virtual circumscribed rectangle of the lock hole corresponding to the hanger camera A under the world coordinate system of the container,;scale factors from the container world coordinate system to the spreader camera; the equations are solved by a PnP algorithm to obtain the pose of the spreader camera A relative to the containerAnd(ii) a In the same way, the positions and postures of the spreader cameras B, C and D relative to the container are respectively obtainedAnd、andandand,is the transpose of the zero matrix;
in the step S6, the calculation of the relative pose of each spreader camera coordinate system is performed by the following method: according to the coordinate transformation theory, a point exists in the world coordinate system of the containerThen, the coordinate transformation relationship of the point in the spreader camera a is as follows:,andthe same can obtain the point for the pose of the spreader camera A relative to the containerCoordinate transformation relationships among spreader cameras B, C and D are,,;、、Andis a pointThree-dimensional coordinates in a coordinate system corresponding to spreader cameras A, B, C and D; the above equations are combined, and the conversion relation between the hanger camera coordinate system corresponding to the hanger camera B and the hanger camera coordinate system corresponding to the hanger camera A is as follows:then, the external reference matrix of the spreader camera B relative to the spreader camera a is: rotation matrixTranslation vectorWhereinIs composed ofThe inverse matrix of (d); similarly, the transformation relationship between the spreader camera C and the spreader camera coordinate system of the spreader camera B is:,is thatThe inverse matrix of (d); the conversion relation between the coordinate systems of the hanger camera D relative to the hanger camera C is as follows:,is thatThe inverse matrix of (c).
2. The method for unified calibration of multiple cameras on an automated crane spreader according to claim 1, wherein: the equation set is solved by adopting a PnP algorithm, namely, a P3P algorithm is adopted, namely 3 image coordinates of the vertexes of the virtual circumscribed rectangles of the lock holes are selected, three-dimensional coordinates of the vertexes of the virtual circumscribed rectangles of the lock holes corresponding to the three points under a container world coordinate system are selected, three groups of corresponding image coordinates and three-dimensional coordinates are formed as feature points for calculation, the result of solving the pose of the spreader camera relative to the container is obtained, and the remaining 1 vertex of the virtual circumscribed rectangles of the lock holes and the three-dimensional coordinates of the vertexes under the corresponding container world coordinate system are used as verification points; and respectively calculating the reprojection errors of the verification points according to the calculated result of each pose, and selecting the result of the pose with the minimum reprojection error as the pose of the spreader camera relative to the container.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111480198.4A CN113902814B (en) | 2021-12-07 | 2021-12-07 | Unified calibration method for multiple cameras on automatic crane sling |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111480198.4A CN113902814B (en) | 2021-12-07 | 2021-12-07 | Unified calibration method for multiple cameras on automatic crane sling |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113902814A CN113902814A (en) | 2022-01-07 |
CN113902814B true CN113902814B (en) | 2022-03-15 |
Family
ID=79025525
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111480198.4A Active CN113902814B (en) | 2021-12-07 | 2021-12-07 | Unified calibration method for multiple cameras on automatic crane sling |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113902814B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115578237A (en) * | 2022-09-22 | 2023-01-06 | 中车资阳机车有限公司 | Lock hole positioning system and method for split container spreader |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101251381A (en) * | 2007-12-29 | 2008-08-27 | 武汉理工大学 | Dual container positioning system based on machine vision |
WO2019188521A1 (en) * | 2018-03-28 | 2019-10-03 | 京セラ株式会社 | Image capture device, moving body, and image capture method |
CN111704036A (en) * | 2020-07-03 | 2020-09-25 | 上海驭矩信息科技有限公司 | Lifting equipment alignment system and method |
CN113012235A (en) * | 2021-03-18 | 2021-06-22 | 武汉港迪智能技术有限公司 | Port crane lifting appliance attitude control system and control method thereof |
JP2021099722A (en) * | 2019-12-23 | 2021-07-01 | 京セラ株式会社 | Calibration device, imaging apparatus, movable body, and calibration method |
-
2021
- 2021-12-07 CN CN202111480198.4A patent/CN113902814B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101251381A (en) * | 2007-12-29 | 2008-08-27 | 武汉理工大学 | Dual container positioning system based on machine vision |
WO2019188521A1 (en) * | 2018-03-28 | 2019-10-03 | 京セラ株式会社 | Image capture device, moving body, and image capture method |
JP2021099722A (en) * | 2019-12-23 | 2021-07-01 | 京セラ株式会社 | Calibration device, imaging apparatus, movable body, and calibration method |
CN111704036A (en) * | 2020-07-03 | 2020-09-25 | 上海驭矩信息科技有限公司 | Lifting equipment alignment system and method |
CN113012235A (en) * | 2021-03-18 | 2021-06-22 | 武汉港迪智能技术有限公司 | Port crane lifting appliance attitude control system and control method thereof |
Non-Patent Citations (1)
Title |
---|
基于机器视觉的吊具位姿检测系统;倪菲;《起重运输机械》;20111031;43-47 * |
Also Published As
Publication number | Publication date |
---|---|
CN113902814A (en) | 2022-01-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019200837A1 (en) | Method and system for measuring volume of parcel, and storage medium and mobile terminal | |
CN106249881B (en) | Augmented reality view field space and virtual three-dimensional target dynamic method for registering | |
US10846844B1 (en) | Collaborative disparity decomposition | |
US8600192B2 (en) | System and method for finding correspondence between cameras in a three-dimensional vision system | |
CN108734744A (en) | A kind of remote big field-of-view binocular scaling method based on total powerstation | |
CN113902814B (en) | Unified calibration method for multiple cameras on automatic crane sling | |
CN105096317A (en) | Fully automatic calibration method for high performance camera under complicated background | |
JP2004213332A (en) | Calibration device, calibration method, program for calibration, and calibration mending tool | |
JP5432835B2 (en) | How to calibrate the camera | |
KR20130026741A (en) | Method and apparatus for providing automated detection of calibration | |
CN103049731B (en) | Decoding method for point-distributed color coding marks | |
CN104766309A (en) | Plane feature point navigation and positioning method and device | |
CN109784250A (en) | The localization method and device of automatically guiding trolley | |
Liu et al. | Pose estimation in heavy clutter using a multi-flash camera | |
WO2023273108A1 (en) | Monocular distance measurement method and apparatus, and intelligent apparatus | |
CN115880372A (en) | Unified calibration method and system for external hub positioning camera of automatic crane | |
CN116077184A (en) | Positioning device and method of AR operation navigation system | |
CN104881641B (en) | Mobile device-based questionnaire and table Digital identification method and system | |
CN110223356A (en) | A kind of monocular camera full automatic calibration method based on energy growth | |
US20230245346A1 (en) | Method and device for corner marking and parameter calibration | |
WO2023005195A1 (en) | Map data processing method and apparatus, and household appliance and readable storage medium | |
CN108205641A (en) | Images of gestures processing method and processing device | |
Karimi et al. | A new method for automatic and accurate coded target recognition in oblique images to improve augmented reality precision | |
WO2023077827A1 (en) | Three-dimensional tower-type checkerboard for multi-sensor calibration, and lidar-camera joint calibration method based on checkerboard | |
CN103177416B (en) | A kind of QR code image position method based on least square method |
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 |