A binocular vision positioning method and system based on a four-circle ring calibration board

By using a binocular vision positioning method with a four-ring calibration plate, and leveraging binocular cameras and mathematical calculations, the problem of insufficient positioning accuracy and speed in traditional robots is solved, enabling rapid and accurate positioning in harsh factory environments.

CN115861437BActive Publication Date: 2025-11-07XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211551745.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2025-11-07
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

Traditional robots cannot accurately locate flexible and changeable installation positions in real time in harsh factory environments, resulting in low production efficiency.

Method used

A binocular vision positioning method based on a four-ring calibration plate is adopted, which achieves rapid and accurate target positioning through binocular camera photography, distortion correction, ROI processing, grayscale processing, circle center detection and triangulation.

Benefits of technology

It improves positioning accuracy and efficiency, reduces computation and matching time, avoids mismatch problems, and achieves rapid and accurate target positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861437B_ABST
    Figure CN115861437B_ABST
Patent Text Reader

Abstract

The application discloses a binocular vision positioning method and system based on a four-circle ring calibration board, calibrates a binocular camera through Zhang Zhengyou's calibration method, acquires a target image and carries out stereoscopic correction; carries out region of interest processing on the image, carries out gray processing on the acquired region of interest image, carries out center detection on left and right gray ROI images through a circle ring detection algorithm, and four center coordinates are acquired respectively; the four centers are matched, and the disparity of left and right images is calculated; three-dimensional coordinates of the four centers are obtained; finally, a plane equation of the four points is solved through a least square method according to the three-dimensional coordinates, and the pose of the target object in a left camera coordinate system is acquired. The application reduces the stereoscopic matching operation amount through matching of the four-circle ring center coordinates, improves the algorithm operation rate, realizes fast positioning of the target, avoids the mismatching problem caused by binocular vision to no texture and repeated area on the matching result, improves the matching precision, and realizes accurate positioning.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of image processing, and particularly relates to a binocular vision positioning method and system based on a four-circle ring calibration board. BACKGROUND

[0002] With the development of industrial intelligence, industrial robots are used to realize tool clamping, installation and disassembly on specific targets, such as clamping and assembling a ladle hydraulic cylinder water gap by using a special working robot on a continuous casting production line. However, due to the poor factory environment, the installation position of the hydraulic cylinder changes greatly each time, resulting in poor precision. Traditional robots cannot respond in real time to the flexible and changeable installation position, and manual alignment and installation are required, which greatly reduces the production efficiency.

[0003] At present, sensors such as distance sensors and camera sensors are used to quickly and accurately position specific targets, providing guidance for the movement of the robot, so that the movement of the robot can actively adapt to the change of the installation position and improve the production efficiency. Binocular vision technology is widely used in various working conditions due to its simple structure and low cost. SUMMARY

[0004] The technical problem to be solved by the application is to provide a binocular vision positioning method and system based on a four-circle ring calibration board to solve the technical problem that traditional positioning precision and speed cannot be considered, and to quickly and accurately position the target based on the geometric characteristics of the four-circle ring calibration board under the premise of ensuring precision.

[0005] The application adopts the following technical solutions:

[0006] A binocular vision positioning method based on a four-circle ring calibration board comprises the following steps:

[0007] S1, a binocular camera is used to take a picture of a specific target to obtain two high-resolution left / right camera images;

[0008] S2, distortion correction is performed on the two high-resolution left / right camera images obtained in step S1 to obtain real imaging images, and then Bouguet epipolar correction is performed on the real imaging images to make the height of the image points on the left and right images consistent;

[0009] S3, ROI processing is performed on the left / right camera real imaging images obtained in step S2, then gray processing is performed on the left / right camera real imaging images after ROI processing, left / right ROI gray images are obtained, threshold operation processing is performed on the left / right ROI gray images, and finally, left / right ROI binary images are obtained by performing inversion operation on the left / right ROI gray images;

[0010] S4, multiple center of circle detections are performed on the left and right ROI binary images obtained in step S3, and the results are weighted and averaged to obtain four center coordinates of the left and right ROI binary images respectively, and the disparity values of the four centers are calculated after matching;

[0011] S5, three-dimensional coordinates of the four centers obtained in step S4 in the left / right camera coordinate system are calculated; the obtained three-dimensional coordinates of the four centers are used to obtain the pose of the four-circle ring calibration board plane in the left / right camera coordinate system by the least square fitting method, so as to realize the fast and accurate positioning of the target object based on the four-circle ring calibration board under the binocular camera.

[0012] Specifically, in the left / right camera image with high resolution in step S1, the actual distance represented by each pixel point is less than the required accuracy of the grasping target.

[0013] Specifically, in step S2, the radial distortion is eliminated as follows in the distortion correction:

[0014]

[0015] x 01 =x(1+k1r 2 +k2r 4 +k3r 6 )

[0016] y 01 =y(1+k1r 2 +k2r 4 +k3r 6 )

[0017] The tangential distortion is eliminated as follows:

[0018]

[0019] x 02 =x+[2p1y+p2(r 2 +2x 2 )]

[0020] y 02 =y+[2p1x+p2(t 2 +2y 2 )]

[0021] Wherein, k1, k2, k3, p1, p2 are distortion coefficients, (x, y) is the coordinate before correction, (x 01 , y 01 ) and (x 02 , y 02 ) are the coordinates after correction, and r is the distance to the center of the camera coordinate system.

[0022] Specifically, in step S3, the left / right camera real imaging image after ROI processing is respectively subjected to gray processing, which is specifically as follows:

[0023] S3011, for the RGB image, the mean value of R, G and B components of each pixel point is calculated, and the mean value is taken as the gray value;

[0024] S3012, in the YUV color space, the physical meaning of the Y component is the brightness of the point, which reflects the brightness level, and the corresponding relationship between the brightness Y and the three color components R, G and B is established according to the change relationship between the RGB and YUV color spaces: Y=0.3R+0.59G+0.11B, and the brightness value is the gray value of the image.

[0025] Specifically, in step S3, the left / right ROI gray image is subjected to threshold operation processing, and then the left / right ROI gray image is subjected to inversion operation, which is specifically as follows:

[0026] According to the threshold value of the circular ring feature, the gray value in the ROI gray image is converted to 0 or 255, and the result after threshold processing is an ROI binary image with black circular ring and white background; the gray value after inversion is obtained by subtracting 255 from the gray value.

[0027] Specifically, in step S4, the disparity value dis of the four center coordinates is specifically as follows:

[0028] dis=u l -u r

[0029] Wherein, u l is the horizontal coordinate of the center in the left camera image, and u r is the horizontal coordinate of the center in the right camera image.

[0030] Specifically, in step S5, according to the camera base distance B and the focal length f of the left / right camera obtained by binocular camera calibration, the three-dimensional coordinates (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4) of the four centers of the four circular ring calibration plates in the left / right camera coordinate system are obtained according to the principle of triangulation, and the three-dimensional coordinates (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4) of the four centers are brought into the plane equation z=a0x+a1y+a2 to be converted into The values of a0, a1 and a2 are obtained by least square method, and the pose of the plane in the left / right camera coordinate system is obtained.

[0031] In the second aspect, the embodiment of the present application provides a binocular vision positioning system based on a four-circular ring calibration plate, which comprises:

[0032] The acquisition module uses a binocular camera to take a picture of a specific target, and obtains two high-resolution left / right camera images;

[0033] The correction module corrects the distortion of the two high-resolution left / right camera images obtained by the acquisition module, and obtains real imaging images, and then performs Bouguet epipolar correction on the real imaging images to make the height of the image points on the left and right images consistent;

[0034] The processing module performs ROI processing on the left / right camera real imaging images obtained by the correction module, respectively; then performs gray processing on the left / right camera real imaging images after ROI processing, respectively, to obtain left / right ROI gray images, and then performs threshold operation processing on the left / right ROI gray images, and finally performs inversion operation on the left / right ROI gray images to obtain left / right ROI binary images;

[0035] The weighting module performs multiple center detection on the left / right ROI binary images obtained by the processing module, and performs weighted average on the results to obtain four center coordinates in the left / right ROI binary images, respectively, and calculates the parallax values of the four centers after matching;

[0036] The positioning module calculates the three-dimensional coordinates of the four centers in the left / right camera coordinate system obtained by the weighting module, and obtains the pose of the four-circle ring calibration board plane in the left / right camera coordinate system through the least square fitting method, and realizes the fast and accurate positioning of the target object based on the four-circle ring calibration board under the binocular camera.

[0037] In a third aspect, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned binocular vision positioning method based on the four-circle ring calibration board when executing the computer program.

[0038] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium including a computer program, and the computer program implements the steps of the above-mentioned binocular vision positioning method based on the four-circle ring calibration board when executed by a processor.

[0039] Compared with the prior art, the present application has at least the following beneficial effects:

[0040] The application discloses a binocular vision positioning method based on a four-circle ring calibration board.

[0041] Further, in subsequent circle center feature extraction, the existing circle center feature extraction algorithm reaches a sub-pixel level, but extraction errors still exist, and thus the obtained parallax has errors.

[0042] Further, when the camera has a large field of view, the image obtained by the camera has an aberration from a theoretical image, and eliminating the aberration is to eliminate or reduce the aberration, so that the accuracy of subsequent circle center feature extraction can be improved.

[0043] Further, after ROI is extracted from the image, only the ROI region needs to be calculated in subsequent circle center detection, and the whole high-resolution image does not need to be calculated, so that the calculation time is reduced, and the target is quickly positioned.

[0044] Further, the four circle rings in the image and the background thereof are different in gray characteristics, and threshold processing is used to determine whether each pixel point in the image belongs to the circle ring or the background, the threshold processing is intuitive, simple to realize and fast in calculation speed.

[0045] Further, the binocular vision positioning of the target utilizes a triangulation principle, and three-dimensional coordinates in a camera coordinate system are calculated according to the following formula: X = (B * f * X u , Y u ) is a coordinate in an image coordinate system.

[0046] Further, one plane can be determined by three non-collinear points, so the target pose positioning is determined by three points, but in order to improve the calculation precision, a redundant point is added to improve the calculation precision.

[0047] It can be understood that the beneficial effects of the above-mentioned second aspect to the fourth aspect can be referred to the related description in the above-mentioned first aspect, which will not be repeated here.

[0048] In summary, the present application improves the positioning accuracy of the target by positioning the center of the four circular rings through image stereoscopic correction; at the same time, the calculation amount is compressed by extracting ROI and threshold processing, and the algorithm efficiency is improved, and the target is quickly positioned.

[0049] The technical solutions of the present application will be further described in detail below by means of the drawings and examples. BRIEF DESCRIPTION OF DRAWINGS

[0050] Figure 1 The flowchart of the present application is shown in the figure.

[0051] Figure 2 The four circular ring calibration plate of the present application is shown in the figure. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described clearly and completely below by combining the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0053] In the description of the present application, it should be understood that the terms "include" and "contain" indicate the existence of described features, whole, steps, operations, elements and / or components, but do not exclude the existence or addition of one or more other features, whole, steps, operations, elements, components and / or sets thereof.

[0054] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0055] It should also be further understood that the term "and / or" used in the specification and the appended claims herein, refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations, for example, A and / or B can mean: A alone, A and B together, B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.

[0056] It should be understood that, although the terms first, second, third, etc. can be used in embodiments of the present application to describe a certain range, etc., these ranges should not be limited to these terms. These terms are only used to distinguish the ranges from each other. For example, the first preset range can also be referred to as the second preset range, and similarly, the second preset range can also be referred to as the first preset range, without departing from the scope of embodiments of the present application.

[0057] Depending on the context, the word "if" as used herein can be interpreted to mean "when" or "while" or "in response to determining" or "in response to detecting". Similarly, the phrase "if determined" or "if detecting (a stated condition or event)" can be interpreted to mean "when determined" or "in response to determining" or "when detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)", depending on the context.

[0058] Various structural diagrams according to the disclosed embodiments of the present application are shown in the accompanying drawings. These drawings are not drawn to scale, in which certain details are exaggerated for the purpose of clarity and certain details can be omitted. The shapes of various regions, layers and their relative size and positional relationship shown in the drawings are only exemplary, and in actuality, there can be deviations due to manufacturing tolerances or technical limitations, and a person skilled in the art can additionally design regions / layers with different shapes, sizes, relative positions according to actual needs.

[0059] The application provides a binocular vision positioning method based on a four-circle ring calibration board, first, a binocular camera is calibrated through Zhang Zhengyou calibration method, second, a target image is acquired from the binocular camera; third, the image is rectified in stereo; then, the image is processed in a region of interest (ROI), the obtained ROI image is processed in gray scale, and the center of the circle is detected through a circle ring detection algorithm, and four center coordinates are obtained; then, the four centers of the left and right images are matched, and the disparity of the left and right images is calculated; then, three-dimensional coordinates of the four centers are obtained according to the triangulation principle; finally, the plane equation is obtained through the least square method according to the three-dimensional coordinates of the four points, and the pose of the target object in the left camera coordinate system is obtained. The method reduces the stereo matching operation amount through the matching of the four-circle ring center coordinates, improves the algorithm running rate, realizes the rapid positioning of the target, avoids the mismatching problem caused by the binocular vision to the textureless and repeated area, improves the matching precision, and realizes the accurate positioning.

[0060] Please refer to Figure 1 The application provides a binocular vision positioning method based on a four-circle ring calibration board, and the method comprises the following steps:

[0061] S1, according to the pinhole imaging principle, the binocular camera is double-calibrated through the Zhang Zhengyou calibration method, the internal parameter matrix, the external parameter matrix, the distortion coefficient of the left / right camera, and the rotation and translation matrix between the left / right cameras are calculated, the binocular camera is used to take a picture of a specific target, and two high-resolution left / right camera images are obtained;

[0062] The double calibration specifically comprises a Zhang Zhengyou calibration board and two cameras, in order to reduce the calibration error, the distance between the calibration board and the camera should be similar to the distance between the grasped target and the camera, the pose of the calibration board is adjusted, the number of pictures of different poses of the calibration board should be controlled to be between 25 and 30, the included angle between the calibration board and the imaging angle should be gradually increased, and the included angle is increased to the maximum limit angle of the four-circle ring calibration board in the actual working condition, single calibration and binocular stereo calibration are performed through the Zhang Zhengyou calibration method, the internal parameter matrix, the external parameter matrix and the distortion coefficient of the monocular camera, the internal parameter pixel focal length f of the monocular camera, the principal point coordinates (u0, v0), the rotation R and the translation matrix T between the binocular cameras, and the base distance B between the optical centers of the two cameras are obtained.

[0063] The high-resolution image refers to the actual distance represented by each pixel point being less than the required precision of the grasped target.

[0064] S2, the two high-resolution left / right camera images are rectified, the real imaging image is obtained, and the image is rectified through the Bouguet epipolar line to make the height of the image points on the left and right images consistent;

[0065] S201, correct the radial distortion and tangential distortion generated in the binocular camera imaging process, eliminate the distortion through the distortion coefficient obtained by camera calibration, and obtain the real image;

[0066] The camera calibration adopts a pinhole imaging model, and the ideal pinhole model is a linear model. However, due to the lens manufacturing precision, the image is radially distorted; or the lens is not completely parallel to the imaging plane during installation, resulting in tangential distortion of the image. Distortion correction is to eliminate the radial distortion according to formula (1-3) and eliminate the tangential distortion according to formula (4-6) through the distortion coefficient obtained by camera calibration, and obtain the real image.

[0067]

[0068] x 01 =x(1+k1r 2 +k2r 4 +k3r 6 ) (2)

[0069] y 01 =y(1+k1r 2 +k2r 4 +k3r 6 ) (3)

[0070]

[0071] x 02 =x+[2p1y+p2(r 2 +2x 2 )] (5)

[0072] y 02 =y+[2p1x+p2(r 2 +2y 2 )] (6)

[0073] Wherein, k1, k2, k3, p1, p2 are distortion coefficients obtained by camera calibration in step S1, (x, y) is the coordinate before correction, (x 01 ,y 01 ) and (x 02 ,y 02 ) are the coordinates after correction.

[0074] S202, Bouguet epipolar correction is performed on the binocular image to make the height of the image point on the left and right images consistent, the target of Bouguet epipolar correction is to make the optical axes of the two cameras parallel, and the height of the image point on the left and right images consistent, which makes the center feature point stereo matching only need to be matched on the same row, and follows the consistency principle, greatly improves the matching efficiency and matching success rate.

[0075] S3, respectively, the left / right camera image corrected in step S2 is subjected to ROI processing, and the part of the image that is of interest, i.e., the image part containing the four annular calibration plates, is selected, and the coordinates of the upper left vertex thereof in the left and right images are recorded; the left and right ROI images are subjected to gray scale processing, respectively, to obtain left and right ROI gray scale images, and then the left and right ROI gray scale images are subjected to threshold value operation processing, and then the images are subjected to inversion operation to obtain left and right ROI binary images;

[0076] The rectangular ROI region is selected according to the extreme positions of the four annular calibration plates in the left / right camera. Selecting a suitable ROI can reduce the size of the annular detection image region in the following step, improve the overall running rate of the algorithm, and secondly, can remove the influence of the background environment on the annular detection algorithm, and reduce the false matching rate. The accuracy and success rate of the algorithm are improved.

[0077] S301, the left and right ROI images are subjected to gray scale processing;

[0078] S3011, for an RGB image, the mean value of the R, G and B components of each pixel point is calculated, and then the mean value is the gray scale value thereof;

[0079] S3012, in the YUV color space, the physical meaning of the Y component is the brightness of the point, and the brightness level is reflected by the value. According to the change relationship between RGB and YUV color spaces, the correspondence between the brightness Y and the three color components R, G and B can be established: Y=0.3R+0.59G+0.11B. This brightness value is the gray scale value of the image.

[0080] S302, the left and right ROI gray scale images are subjected to threshold value processing;

[0081] Please refer to Figure 2 , according to the annular feature, a suitable threshold value is set to convert the gray scale value in the ROI gray scale image to 0 or 255. Because the annular calibration plate in the four annular calibration plate is black, the result after threshold value processing is a ROI binary image in which the annular is black and the background is white. Binaryzation of the image can reduce the data amount in the image, so as to highlight the outline of the target.

[0082] S303, the left and right ROI binary images are subjected to inversion operation.

[0083] Subtracting 255 from the gray scale value thereof is the gray scale value after inversion. Setting the gray scale value of the annular part to 255 and the background gray scale value to 0 can better utilize the annular detection algorithm to detect the annular feature of the image.

[0084] S4, the left and right ROI binary image is detected by the circular ring detection algorithm, and the results of multiple processing are weighted and averaged to calculate the four accurate center coordinates (u l1 ,v l1 ), (u l2 ,v l2 ), (u l3 ,v l3 ), (u l4 ,v l4 ) and (u r1 ,v r1 ), (u r2 ,v r2 ), (u r3 ,v r3 ), (u r4 ,v r4 ) in the left and right ROI binary image, and the obtained center coordinates in the left and right ROI binary image are matched and the disparity values of the four centers are calculated.

[0085] The four center coordinates are matched according to the order consistency principle, that is, the points on the epipolar line in the image pair should satisfy the order consistency, and then the disparity values of the four center coordinates are obtained.

[0086] dis=u l -u r

[0087] S5, according to the principle of triangulation, the three-dimensional coordinates of the four centers in the left / right camera coordinate system are calculated; the obtained four center three-dimensional coordinates are obtained by the least square fitting method to obtain the pose of the four circle ring calibration board plane in the left / right camera coordinate system, and the fast and accurate positioning of the target object based on the four circle ring calibration board under the binocular camera is realized.

[0088] According to the camera base distance B and the focal length f of the left / right camera obtained by the binocular camera calibration, then according to the principle of triangulation, the four center three-dimensional coordinates (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4) in the left / right camera coordinate system of the four circle ring calibration board are obtained.

[0089] The principle of triangulation is as follows:

[0090]

[0091]

[0092]

[0093] Put the three-dimensional coordinates of the four circle centers (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4) into the plane equation z = a0x + a1y + a2

[0094]

[0095] The values of a0, a1 and a2 are obtained by the least square method, that is, the pose of the plane in the left / right camera coordinate system is obtained, and the fast and accurate positioning of the target object is realized according to the relationship between the four-circle ring calibration board and the whole target.

[0096] In another embodiment of the present application, a binocular vision positioning system based on a four-circle ring calibration board is provided, which can be used to realize the binocular vision positioning method based on the four-circle ring calibration board.

[0097] The acquisition module uses a binocular camera to take a picture of a specific target, and obtains two high-resolution left / right camera images.

[0098] The correction module corrects the distortion of the two high-resolution left / right camera images obtained by the acquisition module to obtain real imaging images, and then performs Bouguet epipolar correction on the real imaging images to make the height of the image points in the left and right images consistent.

[0099] The processing module performs ROI processing on the left / right camera real imaging images obtained by the correction module, respectively.

[0100] The weighting module performs multiple circle center detection on the left / right ROI binary images obtained by the processing module, and performs weighted averaging on the results to obtain four circle center coordinates in the left / right ROI binary images, respectively.

[0101] The positioning module calculates the three-dimensional coordinates of the four circle centers in the left / right camera coordinate system.

[0102] In still another embodiment of the present application, a terminal device is provided, which comprises a processor and a memory, the memory being configured to store a computer program, the computer program comprising program instructions, and the processor being configured to execute the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are particularly suitable for loading and executing one or more instructions to implement a corresponding method flow or a corresponding function; the processor in the embodiments of the present application can be used for the operation of the binocular vision positioning method based on the four-circle ring calibration board, comprising:

[0103] A specific target is photographed using a binocular camera to obtain two high-resolution left / right camera images; distortion correction is performed on the two high-resolution left / right camera images to obtain real imaging images, and then Bouguet epipolar correction is performed on the real imaging images to make the height of the image points consistent on the left and right images; ROI processing is performed on the left / right camera real imaging images, and then gray processing is performed on the ROI-processed left / right camera real imaging images to obtain left / right ROI gray images; threshold operation processing is performed on the left / right ROI gray images, and finally, inversion operation is performed on the left / right ROI gray images to obtain left / right ROI binary images; multiple center detection is performed on the left / right ROI binary images, the results are weighted and averaged, four center coordinates in the left / right ROI binary images are obtained respectively, and the disparity values of the four centers are calculated after matching; the three-dimensional coordinates of the four centers in the left / right camera coordinate system are calculated; the obtained four center three-dimensional coordinates are used to obtain the pose of the four-circle ring calibration board plane in the left / right camera coordinate system through the least square fitting method, and fast and accurate positioning of a target object under a binocular camera based on a four-circle ring calibration board is realized.

[0104] In still another embodiment of the present application, the present application also provides a storage medium, specifically a computer readable storage medium (Memory), which is a memory device in the terminal device, used for storing programs and data. It can be understood that the computer readable storage medium herein can include the built-in storage medium in the terminal device, and of course can also include the expansion storage medium supported by the terminal device. The computer readable storage medium provides a storage space, which stores the operating system of the terminal. Moreover, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory.

[0105] The one or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the binocular vision positioning method based on the four-circle ring calibration board in the above embodiments; the one or more instructions in the computer readable storage medium are loaded and executed by the processor as follows:

[0106] A specific target is photographed by using a binocular camera to obtain two high-resolution left / right camera images; distortion correction is performed on the two high-resolution left / right camera images to obtain real imaging images, and then Bouguet epipolar correction is performed on the real imaging images to make the height of the image points consistent on the left and right images; ROI processing is performed on the left / right camera real imaging images, and then gray processing is performed on the ROI-processed left / right camera real imaging images to obtain left / right ROI gray images; threshold operation processing is performed on the left / right ROI gray images, and finally, inversion operation is performed on the left / right ROI gray images to obtain left / right ROI binary images; multiple center detection is performed on the left / right ROI binary images, the results are weighted and averaged, four center coordinates in the left / right ROI binary images are obtained respectively, and the disparity values of the four centers are calculated after matching; the three-dimensional coordinates of the four centers in the left / right camera coordinate system are calculated; the obtained four center three-dimensional coordinates are used to obtain the pose of the four-circle ring calibration board plane in the left / right camera coordinate system by the least square fitting method, and fast and accurate positioning of the target object under the binocular camera based on the four-circle ring calibration board is realized.

[0107] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Generally, the components of the embodiments of the present application described herein and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is only intended to represent the selected embodiments of the present application and is not intended to limit the scope of the claimed present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0108] Through laboratory equipment verification, the maximum error of the repeated positioning accuracy of binocular vision is 0.169 mm, and the positioning accuracy of monocular vision using the same circle center can only reach 0.906 mm. The absolute positioning accuracy is related to the distance between the camera and the four-circle ring. When the distance is 700 mm, the maximum error of positioning is 1.17 mm, and the error is 1.6%, which is less than 2% of the current binocular vision positioning technology error. And the average time of positioning is 0.8 s.

[0109] In summary, the binocular vision positioning method and system based on the four-circle ring calibration board of the present application reduces the stereo matching operation amount through the four-circle ring center coordinate matching, improves the algorithm running rate, realizes the rapid positioning of the target. And avoids the mismatching problem caused by the matching result of the binocular vision on the textureless and repeated area, improves the matching accuracy, and realizes the accurate positioning.

[0110] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit or module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit or module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, which will not be described here.

[0111] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in a certain embodiment can be referred to the related description of other embodiments.

[0112] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0113] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / terminal and method can be implemented in other ways. For example, the apparatus / terminal embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or in other forms.

[0114] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0115] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0116] The integrated module / unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of each method embodiment when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the computer-readable medium can include or exclude contents according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0117] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The flow or flows and / or blocks Figure 1 The apparatus that performs the functions specified in the flow or flows and / or blocks.

[0118] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the functions specified in the flow or flows and / or blocks. Figure 1 The flow or flows and / or blocks Figure 1 The apparatus that performs the functions specified in the flow or flows and / or blocks.

[0119] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate a computer implemented process, so that the instructions executed on the computer or other programmable data processing devices provide a process for implementing the flowchart Figure 1 one flow or a plurality of flows and / or the functions specified in the block Figure 1 one block or a plurality of blocks.

[0120] The above is only to illustrate the technical idea of the present application, and cannot limit the protection scope of the present application. Any modification made according to the technical idea of the present application on the basis of the technical scheme falls within the protection scope of the claims of the present application.

Claims

1. A binocular vision positioning method based on a four-circle annular calibration board, characterized in that, The method comprises the following steps: S1, using a binocular camera to take a picture of a specific target, obtaining two high-resolution left / right camera images; S2, performing distortion correction on the two high-resolution left / right camera images obtained in step S1 to obtain real imaging images, and then performing Bouguet epipolar correction on the real imaging images to make the height of the image points on the left and right images consistent; S3, performing ROI processing on the left / right camera real imaging images obtained in step S2 respectively, then performing gray processing on the ROI-processed left / right camera real imaging images respectively to obtain left / right ROI gray images, then performing threshold operation processing on the left / right ROI gray images, and finally performing inversion operation on the left / right ROI gray images to obtain left / right ROI binary images; S4, performing multiple center detection on the left / right ROI binary images obtained in step S3, and then performing weighted average on the results to obtain four center coordinates in the left / right ROI binary images respectively, and then calculating the disparity value of the four centers after matching; S5, calculating the three-dimensional coordinates of the four centers obtained in step S4 in the left / right camera coordinate system, and then obtaining the pose of the four-ring calibration board plane in the left / right camera coordinate system through the least square fitting method, so as to realize the fast and accurate positioning of the target object based on the four-ring calibration board under the binocular camera.

2. The four-circular-ring calibration plate based binocular vision positioning method according to claim 1, characterized in that, In the high-resolution left / right camera images of step S1, the actual distance represented by each pixel point is smaller than the required accuracy size of the grasped target.

3. The four-circular-ring calibration plate based binocular vision positioning method according to claim 1, characterized in that, In step S2, the radial distortion is eliminated as follows: x 01 = (1 + k1r 2 + 2r 4 + 3r 6 ) y 01 = (1 + k1r 2 + 2r 4 + 3r 6 ) The tangential distortion is eliminated as follows: x 02 = x + [2p1y + p2(r 2 + 2x 2 )] y 02 = y + [2p1x + p2(r 2 + 2y 2 )] wherein k1, k2, k3, p1, p2 are distortion coefficients, (x, y) is the coordinate before correction, (x 01 ,y 01 ) and (x 02 ,y 02 ) are the coordinates after correction, and r is the distance to the center of the camera coordinate system.

4. The four-circular-ring calibration plate based binocular vision positioning method according to claim 1, characterized in that, In step S3, the gray processing on the ROI-processed left / right camera real imaging images is specifically as follows: S3011, for the RGB image, the mean value of the R, G and B components of each pixel point is calculated as the gray value; S3012, in the YUV color space, the physical meaning of the Y component is the brightness of the point, which reflects the brightness level. According to the change relationship between the RGB and YUV color spaces, the corresponding relationship between the brightness Y and the R, G and B color components is established: Y=0.3R+0.59G+0.11B, and the brightness value is the gray value of the image.

5. The four-circular-ring calibration plate based binocular vision positioning method according to claim 1, characterized in that, In step S3, the threshold operation processing on the left / right ROI gray images and the inversion operation on the left / right ROI gray images are specifically as follows: The threshold value is set according to the ring feature, the gray value in the ROI gray image is converted to 0 or 255, the result after threshold processing is an ROI binary image in which the ring is black and the background is white, and the inversion gray value is obtained by subtracting the gray value by 255.

6. The four-circular-ring calibration plate based binocular vision positioning method according to claim 1, characterized in that, In step S4, the disparity value dis of the four center coordinates is specifically as follows: dis = u l - u r where u l is the horizontal coordinate of the circle center in the left camera image, u r is the horizontal coordinate of the circle center in the right camera image.

7. The four-circular-ring calibration plate based binocular vision positioning method according to claim 1, characterized in that, In step S5, the camera base distance B and the focal length f of the left / right cameras obtained according to the binocular camera calibration are used to obtain the three-dimensional coordinates (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4) of the four circle centers in the left / right camera coordinate system according to the triangulation principle, and the three-dimensional coordinates (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4) of the four circle centers are brought into the plane equation z=a0x+a1y+a2 to be converted into The values of a0, a1, and a2 are obtained by the least square method, and the pose of the plane in the left / right camera coordinate system is obtained.

8. A binocular vision positioning system based on a four-circular ring calibration board, characterized in that, The method comprises the following steps: The acquisition module uses a binocular camera to take a picture of a specific target, obtaining two high-resolution left / right camera images; The correction module performs distortion correction on the two high-resolution left / right camera images obtained by the acquisition module to obtain real imaging images, and then performs Bouguet epipolar correction on the real imaging images to make the height of the image points on the left and right images consistent; The processing module respectively processes the left / right camera real imaging images obtained by the correction module in ROI; then respectively processes the left / right camera real imaging images processed in ROI in gray scale to obtain left / right ROI gray scale images, and performs threshold operation on the left / right ROI gray scale images, and finally performs inversion operation on the left / right ROI gray scale images to obtain left / right ROI binary images; The weighting module performs multiple center detection on the left / right ROI binary images obtained by the processing module, and performs weighted average on the results to obtain four center coordinates in the left / right ROI binary images respectively, and calculates the disparity values of the four centers after matching; The positioning module calculates the three-dimensional coordinates of the four centers obtained by the weighting module in the left / right camera coordinate system; obtains the pose of the four-circle ring calibration board plane in the left / right camera coordinate system through the least square fitting method based on the obtained four center three-dimensional coordinates, and realizes the fast and accurate positioning of the target object based on the four-circle ring calibration board under the binocular camera.

9. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions that when executed by a computer cause the computer to perform a method of any of claims 1-8. The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform the method of any one of claims 1-7.

10. A computing device, comprising: comprise: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs comprise steps for performing the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Multi-target identification tracking resolving method

    CN111932565A

  • Three-dimensional reconstruction method and apparatus for monocular endoscope image, and terminal device

    WO2021115071A1