Image registration calibration method for binocular vision system

By integrating image processing algorithms, optical measurement principles and intelligent optimization strategies in binocular vision systems, designing special targets and adopting registration strategies from coarse to fine, the time-consuming and accuracy improvement of binocular measurement system calibration process is solved. The problem has achieved the effect of shortening calibration cycle, reducing workload and improving accuracy.

CN119444809APending Publication Date: 2025-02-14CANG JIAN KE JI (CANG ZHOU) YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411574215.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The calibration process of the existing binocular measurement system takes a long time, has a large workload, and the accuracy improvement is limited, making it difficult to significantly shorten the calibration cycle and reduce the workload while ensuring calibration accuracy.

Method used

Using a binocular vision system image registration calibration method, combined with advanced image processing algorithms, precise optical measurement principles and intelligent optimization strategies, the calibration process is realized by designing special targets and high-precision registration strategies from coarse to fine Acceleration and accuracy improvement.

Benefits of technology

It significantly shortens the calibration cycle, reduces the workload, improves calibration efficiency and accuracy, and achieves faster and more accurate binocular camera parameter calibration and high-precision registration of binocular images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444809A_ABST
    Figure CN119444809A_ABST
Patent Text Reader

Abstract

The invention discloses a binocular vision system image registration calibration method. The method comprises the following steps: 1) constructing a binocular image acquisition system; 2) designing a special target for binocular system calibration; 3) calibrating the R and T relation of the binocular camera by using a special target to realize coarse registration; 4) actually acquiring a binocular image of the to-be-measured piece, and extracting edge contour information of the binocular image; and 5) realizing high-precision registration of the binocular image from coarse to fine according to an optimization strategy. According to the binocular vision system image registration calibration method, an advanced image processing algorithm, a precise optical measurement principle and an intelligent optimization strategy are ingeniously integrated, and remarkable acceleration of the calibration process and remarkable improvement of the calibration precision are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of computer vision and measurement technology, and in particular to a binocular vision system image registration and calibration method. Background Art

[0002] The accuracy of the binocular measurement system depends largely on the accuracy of its calibration process. In order to achieve high-precision calibration, traditional calibration methods usually require multiple adjustments to the target's posture and angle in the measurement space to ensure that the calibration feature points can fully cover the entire measurement area. However, this method not only has a large workload, but also a long calibration cycle, making the entire calibration process time-consuming and laborious.

[0003] In the field of binocular image registration, feature-based methods stand out among many applications due to their strong robustness and efficient computing power. According to the difference in feature sources, these methods can be divided into two categories: one category relies on the natural features of the image itself, which are automatically generated by the image content without any external intervention; the other category uses artificial auxiliary features to enhance or supplement the feature information in the image; however, in practical applications, the surface of the object to be measured often lacks stable and easy-to-identify natural feature points, which leads to poor results of registration methods that rely solely on natural features; taking the textile field as an example, for cloth with different textures on the front and back surfaces, it is usually necessary to take images of both sides, and only after high-precision registration of the two sides can the image be recognized. Only by using a surface image can the key characteristics of the fabric, such as density, weave structure and color texture, be accurately evaluated, thereby guiding process design; however, in the process of textile front and back image registration, due to the significant difference in the surface texture of the front and back of the fabric, there is a lack of sufficient contrast and consistency, and it is difficult to form stable and easily recognizable feature points. Therefore, the registration method that only relies on the natural features of the image is not effective; although the method of artificial auxiliary features has improved the problem of feature point extraction difficulties to a certain extent by introducing known and clear marking points as external references, its calibration accuracy is still restricted by multiple factors such as the number of auxiliary marking points, distribution position and angle, making it difficult to fully cover and accurately calibrate all potential measurement areas, and there are certain limitations.

[0004] In order to overcome the above problems, it is urgent to provide a binocular vision system image registration and calibration method that can significantly shorten the calibration cycle, reduce workload and improve calibration efficiency while ensuring calibration accuracy. Summary of the invention

[0005] In view of the core problems of the binocular system calibration process in the prior art, such as time-consuming and lengthy operation, cumbersome operation and limited accuracy improvement, the present invention proposes a binocular vision system image registration and calibration method; this method cleverly integrates advanced image processing algorithms, precise optical measurement principles and intelligent optimization strategies, and achieves significant acceleration of the calibration process and significant improvement of calibration accuracy.

[0006] The present invention provides a binocular vision system image registration and calibration method, comprising the following steps:

[0007] 1) Build a binocular image acquisition system;

[0008] 2) Design a dedicated target for binocular system calibration;

[0009] 3) Use a dedicated target to calibrate the R, T relationship of the binocular camera to achieve coarse registration;

[0010] 4) Actually collect the binocular image of the object to be tested and extract its edge contour information;

[0011] 5) Achieve high-precision registration of binocular images from coarse to fine based on the optimization strategy.

[0012] Furthermore, the method for constructing the binocular image acquisition system in step 1) is to place the binocular cameras on the same side of the object to be tested or on both sides of the object to be tested, and the object to be tested is placed in the public field of view of the binocular cameras.

[0013] Furthermore, the design method of the special target in step 2) is to set circular marking points on a transparent base medium to obtain a circular target with double-sided co-viewing property.

[0014] Furthermore, in step 3), a dedicated target is used to calibrate the R, T relationship of the binocular camera to achieve rough registration, which includes the following steps:

[0015] 1) Controlling the special target to move within the public field of view of the binocular camera, and capturing images through the binocular image acquisition system to obtain target images; after each acquisition, the placement position or angle of the special target needs to be changed;

[0016] 2) constructing a reference point set and a point set to be registered by extracting circular marking points in the target image;

[0017] 3) Bring the point set corresponding to the target image into the affine transformation model H initial In the calculation, the model H initial Used to describe the coarse registration relationship between binocular cameras.

[0018] Furthermore, in step 4), the binocular image of the object to be tested is actually collected, and its edge contour information is extracted, including the following steps:

[0019] 1) Place the object to be tested flatly in the public field of view of the binocular camera, control the binocular camera to collect images, and obtain a binocular image;

[0020] 2) performing Gaussian filtering on the binocular image to remove noise;

[0021] 3) Use the grayscale-gradient co-occurrence matrix to locate the area where the DUT is located and achieve foreground and background segmentation;

[0022] 4) Use the Canny edge detection operator to extract the edges of the segmented image of the test piece;

[0023] 5) Use the contour search algorithm to traverse the results of Canny edge detection, identify and extract the binocular image I of the object to be tested d and I u , binocular image I d and I u The contour feature point sets are D and U respectively.

[0024] Furthermore, in step 5), high-precision registration of binocular images from coarse to fine is achieved according to the optimization strategy, and the specific steps are as follows:

[0025] 1) Based on the coarse registration transformation model H initial Transform the point set U to obtain the roughly registered contour feature point set U';

[0026] 2) Take I d The contour feature point set D is used to establish a kd-tree;

[0027] 3) According to the nearest neighbor principle, search the kd-tree for the point that is closest to the contour feature point set U', that is, for each point d in the contour feature point set D i Find its nearest neighbor u in U' i , forming a common point pair (d i ,u i ), these common points are (d i ,u i ) constitutes the key matching features on the contours of the two images of the binocular image;

[0028] 4) Construct a precise registration model, as follows:

[0029] After high-precision registration, the point (x ui ,y ui ) and the point (x di ,y di ) has the following relationship:

[0030]

[0031] Where: (x di ,y di ) and (x ui ,y ui ) are the coordinates of the i-th corresponding points in the point sets D and U', respectively, and the function f(x ui ,y ui) and g(x ui ,y ui ) represents the mapping relationship from U' to D;

[0032] 5) Use the common points to center the points (x di ,y di ) and (x ui ,y ui ) constructs the loss function Loss, the formula is as follows:

[0033]

[0034] Where: Loss is the loss function, N is the total number of point pairs;

[0035] 6) Iterative optimization is performed through the Levenberg-Marquardt algorithm to gradually reduce the error and achieve high-precision registration of the binocular images.

[0036] Furthermore, the method for establishing the kd-tree tree comprises the following steps:

[0037] 1) Calculate the variance of the x and y dimensions of the sample points in the contour feature point set D;

[0038] 2) Select the feature with the largest variance as the segmentation dimension, and use the midpoint of the feature value corresponding to the selected segmentation dimension as the segmentation threshold;

[0039] 3) For each node in the tree, the value of the sample point contained in the split dimension is compared with the split point to determine the belonging of the sample point; if the value of the sample point is less than or equal to the split point, it is assigned to the left child node; otherwise, if it is greater than the split point, it is divided into the right child node;

[0040] 4) When all nodes are split and constructed according to the above rules, the entire kd-tree is constructed.

[0041] Furthermore, the grayscale-gradient co-occurrence matrix positioning method comprises the following steps:

[0042] 1) Assuming that the image has a total number of gray levels G and a total number of gradient levels S, a gray-gradient co-occurrence matrix of G×S is constructed to capture the statistical relationship between the gray value and gradient value of the pixels in the image;

[0043] 2) Directly read the grayscale value of each pixel and use Sobel to calculate the gradient vector G of the pixel in the horizontal and vertical directions x and G y , and calculate its gradient magnitude M(x,y) by the following modulus formula:

[0044]

[0045] 3) The grayscale-gradient co-occurrence matrix is ​​updated by the Dirac function:

[0046] M(g,s)=Σ x,y δ(I(x,y)=g)·δ(M(x,y)=s)

[0047] Where M(g,s) represents the number of pixels with gray value g and gradient value s, I(x,y) is the gray value of the pixel (x,y), and δ is the Dirac function;

[0048] 4) By setting a grayscale threshold T g and a gradient threshold T s , by selecting the gray-gradient co-occurrence matrix that satisfies g>T g And s>T s The pixel points corresponding to the matrix elements are used as part of the object area to locate the object and achieve foreground and background segmentation.

[0049] Furthermore, the binocular camera has a single camera system that operates independently and has exactly the same configuration.

[0050] Furthermore, under the premise of ensuring light transmittance, the thickness of the base medium is selected to be a thin material to reduce the influence of light deflection on the position of the feature point.

[0051] Compared with the prior art, the beneficial effects of the present invention are:

[0052] The binocular vision system image registration and calibration method of the present invention cleverly integrates advanced image processing algorithms, precise optical measurement principles and intelligent optimization strategies, achieves significant acceleration of the calibration process and significant improvement of calibration accuracy, and enables it to have better performance in the field of binocular measurement; in addition, by designing dedicated targets and adopting a coarse-to-fine registration strategy, the present invention can significantly improve the calibration efficiency and accuracy of the binocular camera system; compared with traditional methods, the present invention can achieve faster and more accurate binocular camera parameter calibration and high-precision registration of binocular images, with the advantages of significant time cost savings and improved measurement accuracy.

[0053] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0055] Figure 1 Flowchart of the calibration method for a fast and high-precision binocular measurement system;

[0056] Figure 2 Dedicated target images acquired for the acquisition system:

[0057] in, Figure 2 a) is the front image of the target image, and 2b) is the back image of the target image;

[0058] Figure 3 Extract flow chart for image contour;

[0059] Figure 4 The registration effect of fabric image No. 1 is shown below:

[0060] in, Figure 4 a) is the front image of fabric No. 1, Figure 4 b) is the checkerboard fusion image of the front image and the back registration image of fabric No. 1 under the proposed method;

[0061] Figure 5 The registration effect of fabric image No. 2 is shown below:

[0062] in, Figure 5 a) is the front image of fabric No. 2, Figure 5 b) is the checkerboard fusion image of the front image and the back registration image of fabric No. 2 under the proposed method. DETAILED DESCRIPTION

[0063] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0064] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0065] Please refer to Figures 1 to 5 The embodiment of the present invention provides a binocular vision system image registration and calibration method, comprising the following steps:

[0066] 1) Build a binocular image acquisition system;

[0067] The method for constructing a binocular image acquisition system is to place the binocular cameras on the same side of the object to be tested or on both sides of the object to be tested, or in other placement methods, and the object to be tested is placed in the public field of view of the binocular cameras; the binocular cameras have the characteristics of independent operation and a single camera system with exactly the same configuration.

[0068] 2) Design a dedicated target for binocular system calibration;

[0069] The design of the dedicated target depends on the position of the binocular camera relative to the object to be tested. Two possibilities are proposed:

[0070] First, the binocular cameras are placed on the same side of the test piece, left and right.

[0071] Second: The binocular cameras are placed on both sides of the test piece.

[0072] For the first case, traditional two-dimensional targets such as chessboards, circular array targets, etc. can be used;

[0073] For the second case, the traditional two-dimensional target is difficult to meet the requirements due to its planar characteristics and single-viewing angle imaging capability, so it is necessary to design a double-sided co-viewing target.

[0074] Among them, the design method of the special target in this scheme is to set circular marking points on a transparent base medium to obtain a circular target with double-sided common visibility; the light transmittance of the transparent base medium is utilized so that the circular marking points can be captured by reflection on one side of the camera and by transmission imaging on the other side, thereby achieving the simultaneous visibility of the reference points in the fields of view of two cameras.

[0075] The inherent properties of the base medium, such as thickness, transparency, and refractive index, will not only affect the brightness of the transmitted image, but also have a significant impact on the geometric fidelity of the image, resulting in subtle to significant distortions in the shape and size of objects in the image.

[0076] Assuming that the refractive index of the substrate medium used is n1 and the refractive index of air is n2 = 1.0; when the light is incident on the surface of the substrate medium at an incident angle θ1, according to Snell's law, the refraction angle θ2 after entering the substrate medium can be calculated by the following formula:

[0077] n1 sin(θ1)=n2 sin(θ2)

[0078] Then, it can be deduced that for a medium with a thickness of t, the light deviation caused by refraction along the x and y directions is Δx and Δy, and the expression for Δx is as follows:

[0079] Δx=t×(tan(θ1)-tan(θ2))

[0080] Among them, since the thickness of the medium used in this experiment is small, it means that the change of the propagation path of the light in the vertical direction is relatively small. In order to simplify the analysis process, Δy can be ignored;

[0081] Therefore, the base medium should preferably be made of thinner material while ensuring light transmittance to reduce the impact of light deflection on the position of feature points.

[0082] 3) Use a dedicated target to calibrate the R, T relationship of the binocular camera to achieve coarse registration;

[0083] Specifically, the following steps are included:

[0084] a) controlling the special target to move within the public field of view of the binocular camera, and capturing an image through a binocular image acquisition system to obtain a target image; the placement position or angle of the special target needs to be changed after each acquisition;

[0085] b) constructing a reference point set and a point set to be registered by extracting circular marking points in the target image;

[0086] c) Bring the point set corresponding to the target image into the affine transformation model H initial In the calculation, the model H initial Used to describe the coarse registration relationship between binocular cameras.

[0087] Construct affine transformation model H initial Used to describe the R, T relationship of the binocular camera, the model calculation formula is as follows:

[0088]

[0089] Where a and d represent parameters related to image rotation, scaling, etc., b and c represent parameters related to image rotation, shearing, etc., t x ,t y are the translations in the x and y directions respectively, is the two-dimensional coordinate of the pixel in the image to be registered, yes The corresponding two-dimensional coordinates of the pixel point after transformation.

[0090] 4) Actually collect the binocular image of the object to be tested and extract its edge contour information;

[0091] The steps include:

[0092] a) Place the test piece flatly in the public field of view of the binocular camera, control the binocular camera to collect images, and obtain a binocular image;

[0093] b) After acquiring the binocular image, the environmental noise is first filtered out by image preprocessing, that is, Gaussian filtering is performed on the binocular image to filter out the noise;

[0094] c) Using the grayscale-gradient co-occurrence matrix to locate the parts with higher grayscale values ​​and higher gradient values, the area where the DUT is located is obtained, thereby achieving the segmentation of the foreground and background;

[0095] The grayscale-gradient co-occurrence matrix positioning method includes the following steps:

[0096] i) Assuming that the image has a total number of gray levels G and a total number of gradient levels S, a G×S gray-gradient co-occurrence matrix (GLGCM) is constructed to capture the statistical relationship between the gray value and gradient value of the pixels in the image;

[0097] ii) Then for each pixel, directly read the gray value of each pixel, and use Sobel to calculate the gradient vector G of the pixel in the horizontal and vertical directions x and G y , and calculate its gradient magnitude M(x,y) by the following modulus formula:

[0098]

[0099] iii) The gray-level gradient co-occurrence matrix (GLGCM) is updated by the Dirac function (δ):

[0100] M(g,s)=Σ x,y δ(I(x,y)=g)·δ(M(x,y)=s)

[0101] Where M(g,s) represents the number of pixels with gray value g and gradient value s, I(x,y) is the gray value of the pixel (x,y), and δ is the Dirac function (1 when the condition is met, otherwise 0);

[0102] iiii) By setting a grayscale threshold T g and a gradient threshold T s , by selecting the gray-gradient co-occurrence matrix that satisfies g>T g And s>T s The pixel points corresponding to the matrix elements are used as part of the object area to locate the object and achieve foreground and background segmentation.

[0103] d) Subsequently, after the image segmentation is completed, the Canny edge detection operator is further used to extract the edge of the segmented image of the test piece; the Canny operator can effectively detect the strong edges in the image, and reduce the number of false edges and connect the broken edges through double threshold processing and edge connection strategy;

[0104] e) Finally, the contour search algorithm is used to traverse the results of Canny edge detection to identify and extract the binocular image I of the object to be tested. d and I u , binocular image Id and I u The contour feature point sets are D and U respectively.

[0105] 5) Achieve high-precision registration of binocular images from coarse to fine based on the optimization strategy.

[0106] The specific steps are as follows:

[0107] a) Obtain binocular image I d and I u After the contour feature point set D and U are obtained, the rough registration transformation model H initial Transform the point set U to obtain the roughly registered contour feature point set U';

[0108] b) In order to speed up the subsequent common point pair matching process, I d The contour feature point set D is used to establish a kd-tree;

[0109] The method for establishing the kd-tree tree comprises the following steps:

[0110] i) The contour feature point set D is a two-dimensional data set, and each point has two features: x and y; calculate the variance of the x and y dimensions of the sample points in the contour feature point set D;

[0111] ii) Select the feature with the largest variance as the segmentation dimension, and use the midpoint of the feature value corresponding to the selected segmentation dimension as the segmentation threshold;

[0112] iii) The data points in the contour feature point set D are divided into two parts according to whether the value of a certain dimension is less than or equal to the segmentation threshold, and are used as the data of the left child node and the right child node respectively; that is, for each node in the tree, the value of the sample point contained in it on the segmentation dimension is compared with the segmentation point to determine the belonging of the sample point; if the value of the sample point is less than or equal to the segmentation point, it is classified as the left child node; otherwise, if it is greater than the segmentation point, it is divided into the right child node;

[0113] iiii) When all nodes are split and constructed according to the above rules, the entire kd-tree is constructed.

[0114] c) According to the nearest neighbor principle, search the kd-tree for the point that is closest to the contour feature point set U', that is, for each point d in the contour feature point set D i Find its nearest neighbor u in U' i , forming a common point pair (d i ,u i ), these common points are (d i ,u i ) constitutes the key matching features on the contours of the two images of the binocular image;

[0115] d) Construct a precise registration model, as follows:

[0116] Ideally, after high-precision registration, the points (x ui ,y ui ) and the point (x di ,y di ) has the following relationship:

[0117]

[0118] Where: (x di ,y di ) and (x ui ,y ui ) are the coordinates of the i-th corresponding points in the point sets D and U', respectively, and the function f(x ui ,y ui ) and g(x ui ,y ui ) represents the mapping relationship from U' to D;

[0119] e) Use the common points to center the points (x) in the contour feature point set D di ,y di ) and (x ui ,y ui ) constructs the loss function Loss, the formula is as follows:

[0120]

[0121] Where: Loss is the loss function, N is the total number of point pairs;

[0122] f) Iterative optimization is performed through the Levenberg-Marquardt algorithm to gradually reduce the error and achieve high-precision registration of the binocular images.

[0123] By minimizing the distance error between the reference point and the corresponding point to be registered, the parameter configuration of the transformation model is optimized, thereby achieving high-precision registration of the binocular image.

[0124] Example 1

[0125] Take the double-sided (front and back) image acquisition and image registration of two pieces of textile fabrics with the same front and back as an example. The steps are as follows: Figure 1 As shown, the specific process is:

[0126] The steps include:

[0127] S1: Build a binocular image acquisition system:

[0128] The binocular cameras are placed on both sides of the fabric to be tested, and the fabric to be tested is placed in the common field of view of the binocular cameras. The two cameras are respectively aimed at the front and back sides of the fabric to be tested;

[0129] S2: Design a dedicated target for binocular system calibration:

[0130] According to the formula in step 2) above, a PVC transparent plastic substrate with a thickness of 0.05 mm is preferred.

[0131] Then, three-dimensional circular marking points were precisely arranged on the above-mentioned PVC transparent plastic substrate, and a circular target with double-sided co-visibility was successfully obtained; the center coordinates of the circle were accurately extracted from the front and back images of the target, and the reference point set and the point set to be registered were constructed. The one-to-one mapping relationship between the point sets is as follows: Figure 2 shown.

[0132] S3: According to the method in step 3) above, use a dedicated target to calibrate the R, T relationship of the binocular camera to achieve coarse alignment.

[0133] S4: Actually collect the binocular image of the test piece and extract its edge contour information.

[0134] Place the fabric to be tested flatly in the public field of view of the binocular camera and control the camera to collect images. Since the collected images contain a lot of environmental noise, Figure 3 The process shown in the figure performs a 5×5 Gaussian filter on the image to filter out noise; then the grayscale-gradient co-occurrence matrix is ​​used to locate the parts with lower grayscale values ​​and higher gradient values ​​to obtain the area where the fabric is located; wherein the grayscale-gradient co-occurrence matrix positioning method is performed according to the method in step 4) above;

[0135] Subsequently, after completing the segmentation of fabric image information and background texture information, the Canny edge detection operator is further used to extract the edge of the segmented fabric image. Finally, the contour search algorithm is used to traverse the results of the Canny edge detection to identify and extract the front and back images of the fabric (I d ,I u )’s contour feature point set D, U.

[0136] S5: A coarse-to-fine high-precision registration of the binocular images is achieved according to the optimization strategy, wherein the coarse-to-fine high-precision registration method is performed according to the method in step 5) above.

[0137] By minimizing the distance error between the reference point and the corresponding point to be registered, the parameter configuration of the transformation model is optimized, thereby achieving high-precision registration of the front and back images of the fabric.

[0138] Figure 4 In Figure 4a) shows the front image of fabric No. 1, whose surface has a diamond pattern composed of a mesh structure; Figure 4 In Figure 4 In b), it is observed that the mesh structure of the diamond lattice corners in region ①' and the mesh arrangement structure in the region ②'-③' are well aligned, showing a clear and complete diamond lattice pattern. Figure 4 The pattern in the front image in a) is consistent.

[0139] For fabric No. 2, see Figure 5 , Figure 5 In Figure 5 a) shows the front image of the fabric surface, which has a diamond pattern composed of meshes and a stripe pattern. Figure 5 In Figure 5 The meshes in the ④'-⑥' region in b) also achieve precise alignment.

[0140] In the description of this specification, the terms "connection", "installation", "fixation" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0141] In the description of this specification, the description of the terms "one embodiment", "some embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0142] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A binocular vision system image registration and calibration method, characterized in that: The steps include: 1) Build a binocular image acquisition system; 2) Design a dedicated target for binocular system calibration; 3) Use a dedicated target to calibrate the R, T relationship of the binocular camera to achieve coarse registration; 4) Actually collect the binocular image of the object to be tested and extract its edge contour information; 5) Achieve high-precision registration of binocular images from coarse to fine based on the optimization strategy.

2. The binocular vision system image registration and calibration method according to claim 1, characterized in that: The method for constructing the binocular image acquisition system in step 1) is to place the binocular cameras on the same side of the object to be tested or on both sides of the object to be tested, and the object to be tested is placed in the public field of view of the binocular cameras.

3. The binocular vision system image registration and calibration method according to claim 2, characterized in that: The design method of the special target in step 2) is to set circular marking points on a transparent base medium to obtain a circular target with double-sided co-viewing property.

4. The binocular vision system image registration and calibration method according to claim 3, characterized in that: In step 3), a dedicated target is used to calibrate the R and T relationship of the binocular camera to achieve rough registration, which includes the following steps: 1) Controlling the special target to move within the public field of view of the binocular camera, and capturing images through the binocular image acquisition system to obtain target images; after each acquisition, the placement position or angle of the special target needs to be changed; 2) constructing a reference point set and a point set to be registered by extracting circular marking points in the target image; 3) Bring the point set corresponding to the target image into the affine transformation model H initial In the calculation, the model H initial Used to describe the coarse registration relationship between binocular cameras.

5. The binocular vision system image registration and calibration method according to claim 4, characterized in that: In step 4), the binocular image of the object to be tested is actually collected, and its edge contour information is extracted, including the following steps: 1) Place the object to be tested flatly in the public field of view of the binocular camera, control the binocular camera to collect images, and obtain a binocular image; 2) performing Gaussian filtering on the binocular image to remove noise; 3) Use the grayscale-gradient co-occurrence matrix to locate the area where the DUT is located and achieve foreground and background segmentation; 4) Use the Canny edge detection operator to extract the edges of the segmented image of the test piece; 5) Use the contour search algorithm to traverse the results of Canny edge detection, identify and extract the binocular image I of the object to be tested d and I u , binocular image I d and I u The contour feature point sets are D and U respectively.

6. The binocular vision system image registration and calibration method according to claim 5, characterized in that: In step 5), high-precision registration of binocular images from coarse to fine is achieved according to the optimization strategy, and the specific steps are as follows: 1) Based on the coarse registration transformation model H initial Transform the point set U to obtain the roughly registered contour feature point set U'; 2) With I d The contour feature point set D is used to establish a kd-tree; 3) According to the nearest neighbor principle, search the kd-tree for the point that is closest to the contour feature point set U', that is, for each point d in the contour feature point set D i Find its nearest neighbor u in U' i , forming a common point pair (d i ,u i ), these common points are (d i ,u i ) constitutes the key matching features on the contours of the two images of the binocular image; 4) Construct a precise registration model, as follows: After high-precision registration, the point (x ui ,y ui ) and the point (x di ,y di ) has the following relationship: Where: (x di ,y di ) and (x ui ,y ui ) are the coordinates of the i-th corresponding points in the point sets D and U', respectively, and the function f(x ui ,y ui ) and g(x ui ,y ui ) represents the mapping relationship from U' to D; 5) Use the common points to center the points (x di ,y di ) and (x ui ,y ui ) constructs the loss function Loss, the formula is as follows: Where: Loss is the loss function, N is the total number of point pairs; 6) Iterative optimization is performed through the Levenberg-Marquardt algorithm to gradually reduce the error and achieve high-precision registration of the binocular images.

7. The binocular vision system image registration and calibration method according to claim 6, characterized in that: The method for establishing the kd-tree tree comprises the following steps: 1) Calculate the variance of the x and y dimensions of the sample points in the contour feature point set D; 2) Select the feature with the largest variance as the segmentation dimension, and use the midpoint of the feature value corresponding to the selected segmentation dimension as the segmentation threshold; 3) For each node in the tree, the value of the sample point contained in the split dimension is compared with the split point to determine the belonging of the sample point; if the value of the sample point is less than or equal to the split point, it is assigned to the left child node; otherwise, if it is greater than the split point, it is divided into the right child node; 4) When all nodes are split and constructed according to the above rules, the entire kd-tree is constructed.

8. The binocular vision system image registration and calibration method according to claim 5, characterized in that: The grayscale-gradient co-occurrence matrix positioning method comprises the following steps: 1) Assuming that the image has a total number of gray levels G and a total number of gradient levels S, a gray-gradient co-occurrence matrix of G×S is constructed to capture the statistical relationship between the gray value and gradient value of the pixels in the image; 2) Directly read the grayscale value of each pixel and use Sobel to calculate the gradient vector G of the pixel in the horizontal and vertical directions x and G y , and calculate its gradient magnitude M(x,y) by the following modulus formula: 3) The grayscale-gradient co-occurrence matrix is ​​updated by the Dirac function: M(g,s)=Σ x,y δ(I(x,y)=g)·δ(M(x,y)=s) Where M(g,s) represents the number of pixels with gray value g and gradient value s, I(x,y) is the gray value of the pixel (x,y), and δ is the Dirac function; 4) By setting a grayscale threshold T g and a gradient threshold T s , by selecting the gray-gradient co-occurrence matrix that satisfies g>T g And s>T s The pixel points corresponding to the matrix elements are used as part of the object area to locate the object and achieve foreground and background segmentation.

9. The binocular vision system image registration and calibration method according to claim 2, characterized in that: The binocular camera has a single camera system that operates independently and has exactly the same configuration.

10. The binocular vision system image registration and calibration method according to claim 3, characterized in that: The base medium is made of thin material while ensuring light transmittance, so as to reduce the influence of light deflection on the position of the feature point.