CN114255286B - Target size measuring method based on multi-view binocular vision perception - Google Patents
Target size measuring method based on multi-view binocular vision perception Download PDFInfo
- Publication number
- CN114255286B CN114255286B CN202210184835.1A CN202210184835A CN114255286B CN 114255286 B CN114255286 B CN 114255286B CN 202210184835 A CN202210184835 A CN 202210184835A CN 114255286 B CN114255286 B CN 114255286B
- Authority
- CN
- China
- Prior art keywords
- binocular
- formula
- groups
- coordinate system
- group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 230000004438 eyesight Effects 0.000 title claims abstract description 19
- 230000008447 perception Effects 0.000 title claims abstract description 11
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 14
- 238000005259 measurement Methods 0.000 claims abstract description 11
- 230000004927 fusion Effects 0.000 claims abstract description 5
- 238000012545 processing Methods 0.000 claims abstract description 4
- 239000011159 matrix material Substances 0.000 claims description 33
- 238000013519 translation Methods 0.000 claims description 19
- 150000001875 compounds Chemical class 0.000 claims description 12
- 230000011218 segmentation Effects 0.000 claims description 12
- 239000013598 vector Substances 0.000 claims description 10
- 239000000126 substance Substances 0.000 claims description 7
- 238000012937 correction Methods 0.000 claims description 6
- 230000003287 optical effect Effects 0.000 claims description 6
- 230000002776 aggregation Effects 0.000 claims description 5
- 238000004220 aggregation Methods 0.000 claims description 5
- 230000000007 visual effect Effects 0.000 claims description 5
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 claims description 4
- 230000006870 function Effects 0.000 claims description 4
- 208000006440 Open Bite Diseases 0.000 claims description 3
- 230000003044 adaptive effect Effects 0.000 claims description 2
- 230000004931 aggregating effect Effects 0.000 claims description 2
- 239000002131 composite material Substances 0.000 claims description 2
- 230000000694 effects Effects 0.000 claims description 2
- 238000001914 filtration Methods 0.000 claims description 2
- 238000009499 grossing Methods 0.000 claims description 2
- 238000003384 imaging method Methods 0.000 claims description 2
- 238000003064 k means clustering Methods 0.000 claims description 2
- 238000011524 similarity measure Methods 0.000 claims description 2
- 230000016776 visual perception Effects 0.000 claims 1
- 238000004364 calculation method Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012938 design process Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011017 operating method Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
- G06T7/85—Stereo camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G06T5/80—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30244—Camera pose
Abstract
The invention relates to the technical field of image processing, and discloses a target size measuring method for multi-view binocular vision perception, which comprises the following steps: acquiring two groups of binocular camera parameters based on a Zhang calibration method; shooting a target by using two groups of binocular cameras to obtain two groups of binocular images, and correcting the two groups of binocular images by using an improved Bouguet algorithm to enable the two groups of binocular images to meet epipolar constraint; performing stereo matching on the two groups of binocular images respectively to obtain the parallax of the two groups of binocular images; dividing the binocular image to obtain a target area of the binocular image and obtain two groups of target three-dimensional point clouds; carrying out three-dimensional data fusion on data points obtained from the two groups of local coordinate systems and unifying the data points to the same coordinate system; determining the contour of the target area, and utilizing the fused three-dimensional point cloud to realize the length measurement of the contour. The invention can improve the precision of target contour dimension measurement and has great application value in industry.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a target size measuring method based on multi-view binocular vision perception.
Background
The binocular vision simulates the mechanism of human eye vision, and the technology has high efficiency, simple equipment and lower cost, so the binocular vision simulation technology is widely applied in many fields. In the industrial field, the binocular vision technology can realize non-contact detection and monitoring of products without influencing the motion state of a target, so the technology is often used as an assistant to carry out three-dimensional reconstruction on the target, and further realizes the purposes of distance measurement, size measurement and the like;
at present, a single group of binocular cameras are mostly adopted for binocular vision-based three-dimensional reconstruction, binocular images are corrected by using camera parameter values obtained through calibration, and three-dimensional point cloud is obtained through stereo matching. The stereo matching and the three-dimensional reconstruction based on the single group of binocular cameras have low precision at the sheltering and shadow positions, neglect the possibility that the target object has different shape characteristics at each angle, have limitations on the target three-dimensional reconstruction, and are difficult to ensure the accuracy of the subsequent contour dimension measurement. According to the method for measuring the contour dimension of the binocular vision target with multiple visual angles, the target image is divided and subjected to stereo matching respectively, two groups of three-dimensional point clouds can be obtained, the two groups of data points are unified, the problem that target information obtained by a single camera is incomplete is solved, the precision of target three-dimensional reconstruction can be effectively improved, the precision of target contour dimension measurement is improved, and the method has important research value and significance in industry.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a target size measuring method based on multi-view binocular vision perception, which can effectively improve the precision of target three-dimensional reconstruction.
In order to achieve the purpose, the invention provides the following technical scheme: a target size measuring method for multi-view binocular vision perception comprises the following steps:
1. two groups of binocular camera parameters are obtained based on the Zhang calibration method, including internal reference matrixes of four cameras and three groups of cameras (And,andandand) A rotation matrix and a translation matrix of (a);
2. shooting a target by using two groups of binocular cameras to obtain two groups of binocular images, and correcting the two groups of binocular images by using an improved Bouguet algorithm to enable the two groups of binocular images to meet epipolar constraint;
3. performing stereo matching on the two groups of binocular images respectively to obtain the parallax of the two groups of binocular images;
4. dividing the binocular image to obtain a target area of the binocular image and obtain two groups of target three-dimensional point clouds;
5. carrying out three-dimensional data fusion on data points obtained from the two groups of local coordinate systems and unifying the data points to the same coordinate system;
6. determining the contour of the target area, and utilizing the fused three-dimensional point cloud to realize the length measurement of the contour.
The invention provides a target size measuring method based on multi-view binocular vision perception, which has the beneficial effects that:
1. in the design process of the camera model, the characteristics of high technical efficiency, simple equipment and low cost of binocular vision are utilized, the problem that the shooting range of a single group of binocular cameras is limited is considered, two groups of binocular cameras are arranged to shoot a target object in an all-round way, and the comprehensive appearance information of the target object is obtained;
2. the invention solves the problem of cooperation of three-dimensional data obtained by a multi-view camera, unifies a plurality of groups of three-dimensional point clouds obtained by the multi-view camera into a world coordinate system to generate a point cloud picture with a complete target, improves the precision of three-dimensional reconstruction and further improves the precision of contour dimension measurement.
Drawings
FIG. 1 is a schematic view of a multi-view binocular vision target contour dimension measurement algorithm of the present invention;
FIG. 2 is a schematic diagram of two binocular camera models according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1, please refer to fig. 1-2, the present invention provides a technical solution: a target size measuring method for multi-view binocular vision perception comprises the following steps:
step 11, the image acquisition device adopts four cameras with the same specification to form two groups of binocular cameras which compriseAndthe image acquisition device is used for acquiring images of the calibration plate from multiple angles and ensuring that the calibration plate is positionedClear and complete;
step 12, calibrating the four-eye camera by using a Zhang calibration method to obtain internal and external parameters of the camera;
(1b) respectively to two groups of camerasAndcalibrating to obtain rotation matrix and translation matrix of two groups of cameras, and definingIs composed ofAnd;
Step 21, acquiring a target image to be measured by using an image acquisition device to obtain two groups of binocular images, wherein the first group of camerasThe binocular image is taken asSecond group of camerasThe binocular image is taken as(ii) a Defining world coordinate systemFirst group of left eye camerasCoordinate system isAnd is andandcoincidence, second group left eye cameraCoordinate system is(ii) a First group of right eye camerasCoordinate system isSecond group of right eye camerasCoordinate system is;
Step 22, constructing a first group of binocular images by using a Bouguet algorithmOf the rotation matrixTo pairPerforming primary horizontal correction, and specifically comprising the following steps:
(2a) firstly, the first step is toA rotation matrix ofComposite matrix divided into left and right camerasWherein,;
First set of binocular cameras having rotation matrixThe rotation matrix is divided into two opposite direction matrixes, which is equivalent to that the left eye camera rotates towards one directionHalf of the right eye camera rotates in the opposite directionThe half of the image is converted into the same plane by the left camera and the right camera;
(2b) creatingA rotation matrix of translation vector directions in between such that the baseline is parallel to the imaging plane;
formula (1)
Wherein the content of the first and second substances,being the poles in the same direction as the translation vectors,,、andare respectively asAnda translation vector in a direction;a vector in the direction of an image plane;is perpendicular toAnd withThe vector of the plane in which the lens is located;
(2c) obtaining left and right cameras according to formula (2)Integral rotation matrix of(ii) a First set of left and right camera coordinate systems,Multiplying by the respectiveIntegral rotation matrixSo that the main optical axes of the left camera and the right camera are parallel, the image plane is parallel to the base line, and the coordinate systems of the first group of the left camera and the right camera are the same after rotation;
Formula (2)
Step 23, mixing,Rotate simultaneously about respective optical centersObtaining a new coordinate system,At this timeAndand world coordinatesOverlapping; obtaining a line alignment image after rotation;
Step 24, repeating step 22, and carrying out binocular image processing on the second group of binocular imagesPerforming primary correction to obtainIntegral rotation matrix ofThe coordinate system of the second group of left and right eye cameras after correction,;
Step 25, repeat step 23, will,Rotate simultaneously about respective optical centersObtaining a new coordinate system,Then, thenAndobtaining a line alignment image after overlapping and rotating。
Wherein, the step 24 and the step 25 correspond to the step 22 and the step 23 respectively; the operating method is completely identical, with the difference that step 24, step 25, is directed to a second set of binocular images; step 22, step 23 for a first set of binocular images;
for two groups of binocular imagesAndrespectively carrying out stereo matching to generate a disparity map,(ii) a An improved stereo matching algorithm based on AD-Census is adopted and divided into four steps of matching cost calculation, cost aggregation, parallax calculation and parallax optimization so as toFor example, the specific steps are as follows:
step 31, calculating initial matching cost, and defining Census matching costIs a pixel point in the representation shown in formula (3)Andmiddle corresponds to parallaxPixel point ofCensus transformation betweenA similarity measure;
formula (3)
Wherein the content of the first and second substances,andare respectively left eye imagesMiddle pixel pointAnd the right eye imageMiddle pixel pointThe Census-transformed code of (a),represents an exclusive or;
formula (4)
Wherein the content of the first and second substances,,are respectively left eye imagesMiddle pixel pointAnd the right eye imageMiddle pixel pointA mapped gray value in RGB space; final matching costAs shown in equation (5);
formula (5)
Wherein the content of the first and second substances,,respectively controlling Census matching cost and AD matching cost;
,these two values are control parameters, Census matching cost and AD matching cost are respectively expressed as:
equation (5) is equivalent to adding the two equations when,,,When both are positive values, C (p, d) of the formula (5) is controlled to [0, 2 ]]A range of (d);
step 32, smoothing the matching cost by guiding filtering, aggregating the matching cost by taking the filter and the function as adaptive weight, and defining a kernel function as shown in formula (6);
formula (6)
In the formula (I), the compound is shown in the specification,as a windowThe size of (a) is (b),andare respectively windowsThe mean and variance of the gray values of the inner pixels,to adjust the parameters, the matching cost after aggregation isP is a windowQ is a pixel point (terminating pixel point) at the corner of the window,andthe gray values of the two pixel points are respectively shown as a formula (7);
formula (7)
The cost aggregation method is based on a cross window, Np is the selected cross window, and q belongs to Np and represents that a termination pixel point q is in the selected cross window;
step 33, selecting the value corresponding to the lowest matching cost from the candidate disparity values as the disparity value of the pixel pointObtaining an initial disparity map corresponding to the first group of binocular imagesAs shown in equation (8);
formula (8)
In the formula (I), the compound is shown in the specification,representing a maximum disparity search range;
step 34, distinguishing shielded points and non-shielded points through left-right consistency check, as shown in formula (9);
formula (9)
In the formula (I), the compound is shown in the specification,is thatMiddle pixel pointThe value of the disparity of (a) to (b),is thatCorresponding pixel point inWhen the difference between the two is more than 1 pixel, the pixel point is a shielding point; distinguishing color segmentation areas after obtaining occlusion points and non-occlusion points, wherein the color segmentation areas are reliable areas when the following conditions are met, and are unreliable areas if the color segmentation areas are not met, as shown in a formula (10);
formula (10)
In the formula (I), the compound is shown in the specification,is the total number of pixels of the region,the number of non-occlusion points in the region,is a constant and is provided with a constant,is a proportionality coefficient; in order to obtain a better fitting effect, the plane fitting work is only adopted for the reliable area, and the parallax plane equation is defined as shown in a formula (11);
formula (11)
In the formula (I), the compound is shown in the specification,is the coordinate of the pixel point and is,as a result of the disparity value,is a parallax plane parameter, which can be obtained according to the weighted least squares method, as shown in formula (12);
formula (12)
Wherein, the formulas of the sum are respectively as shown in formula (13);
formula (13)
In the formula (I), the compound is shown in the specification,the plane parameters can be obtained from the formula (12) and the formula (13) for the number of correct matching points in the regionSubstituting the formula (11) to obtain the parallax value of each pixel in the reliable region, and finally obtaining the parallax map corresponding to the first group of binocular images;
Step 35, repeating the steps 31 to 34 to obtain a disparity map corresponding to the second group of binocular images。
For binocular imageAndsegmenting to obtain target areas of binocular images and obtain three-dimensional point clouds of two groups of target areas, and the method comprises the following specific steps:
step 41, performing fine segmentation on the target areas in the two groups of left and right eye images by using Grabcut algorithm and combining with manual frame selection of the target areas, and respectively obtaining image area segmentation results,The method comprises the following specific steps:
(4a) inputting images taken by a first group of left eye camerasThe user selects the marked area by adopting the rectangular areaThe foreground of the initialization is that the foreground of the display,the inner area is the foreground area,The outer area is the background area(ii) a For theEach of the pixels inIf, ifThen to the pixelDispensing label(ii) a If it isThen the label is assigned;
(4b) Using a K-means clustering algorithm to cluster the foreground regionAnd a background regionClustering K kinds of pixels respectively;
(4c) by using,The two label sets respectively initialize GMM parameters of the foreground and the background, and the foreground area is divided into a plurality of regionsEach pixel in the image is substituted into the two obtained GMMs to obtain the probability that the pixel belongs to the foreground area and the background area respectively, and the probability is in a negative logarithm form to obtain an area item;
(4d) computing foreground regionsObtaining boundary terms by Euclidean distances between all every two adjacent pixels, obtaining the minimum value of energy by adopting a maximum flow minimum cut algorithm, and giving the calculated result to the foreground region againThe pixels in the row are allocated with label sets;
(4f) Repeating the steps (4 a) to (4 e) to segment the target area in the rest of the binocular images, and finally obtaining the segmentation result of the two groups of binocular images,;
Step 42, based on the camera parameters obtained by the Zhang calibration method, setting the focal length of the four-eye camera as,Has a base line distance ofFirst group of left eye imagesHas principal point coordinates ofTo aMiddle pixel pointFrom a disparity mapWith a parallax value of(ii) a As shown in equation (14), it is possible to obtain from the principle of the triangular parallaxIn a first set of left eye camera coordinate systemsThe three-dimensional coordinates of(ii) a ComputingAll the pixels in the coordinate systemThe three-dimensional coordinates of the camera to obtain a first group of camerasAll three-dimensional point clouds of visible targets under the visual angle are recorded as a first group of three-dimensional point clouds,Representing a quantity of a first set of three-dimensional point clouds;
formula (14)
Step 43, set upHas a base line distance ofSecond group of left eye imagesHas principal point coordinates of(ii) a Same as step 41, calculateAll the pixels in the coordinate systemObtaining the three-dimensional coordinates of the second group of camerasAll three-dimensional point clouds of visible targets under the visual angle are recorded as a second group of three-dimensional point clouds,Representing the number of the second set of three-dimensional point clouds.
Three-dimensional point clouds obtained from two groups of local coordinate systems,Unifying three-dimensional data fusion to a world coordinate systemObtaining a group of target collaborative three-dimensional point clouds, which comprises the following steps:
step 51, because of the first group of the left eye camera coordinate systemWith a predetermined world coordinate systemCoincidence, then coordinate systemAnda rotation matrix ofTranslation matrix(ii) a (ii) Point cloud of the first set of three-dimensional points according to equation (15)All three-dimensional data in (a) are subjected to rotational translation to a world coordinate systemThen, a three-dimensional point cloud set under the world coordinate system is obtained;
Formula (15)
Step 52, second group of left eye camera coordinate systemWith the first group of left eye camera coordinate systemThe rotation matrix and the translation matrix in between are respectively,(ii) a (ii) the second set of three-dimensional point clouds according to equation (16)All three-dimensional data in (a) are subjected to rotational translation to a world coordinate systemThen, a three-dimensional point cloud set under the world coordinate system is obtained;
Formula (16)
Step 53, unifying the three-dimensional point clouds under all the local coordinate systems to the world coordinate system to obtain the three-dimensional point cloud with complete target。
Determining the outline of the target area, and realizing the dimension measurement of the outline by utilizing the fused three-dimensional point cloud.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (6)
1. A target size measuring method of multi-view binocular vision perception is characterized by comprising the following steps:
the method comprises the following steps of (1) acquiring two groups of binocular camera parameters based on a Zhang calibration method;
step (2), shooting a target by using two groups of binocular cameras to obtain two groups of binocular images, and correcting the two groups of binocular images by using an improved Bouguet algorithm to enable the two groups of binocular images to meet epipolar constraint;
step (3), performing stereo matching on the two groups of binocular images respectively to obtain the parallax of the two groups of binocular images;
the method comprises the following steps:
step 31, calculating initial matching cost, and defining Census matching costIs a pixel point in the representation shown in formula (3)Andmiddle corresponds to parallaxPixel point ofCensus transform similarity measure between;
formula (3)
Wherein, the first and the second end of the pipe are connected with each other,andare respectively left eye imagesMiddle pixel pointAnd the right eye imageMiddle pixel pointThe Census-transformed code of (a),represents an exclusive or;
formula (4)
Wherein the content of the first and second substances,,are respectively left eye imagesMiddle pixel pointAnd the right eye imageMiddle pixel pointA mapped gray value in RGB space; final matching costAs shown in equation (5);
formula (5)
Wherein the content of the first and second substances,,respectively controlling Census matching cost and AD matching cost;
,these two values are control parameters, Census matching cost and AD matching cost are respectively expressed as:
equation (5) is equivalent to adding the two equations;
step 32, smoothing the matching cost by guiding filtering, aggregating the matching cost by taking the filter and the function as adaptive weight, and defining a kernel function as shown in formula (6);
formula (6)
In the formula (I), the compound is shown in the specification,as a windowThe size of (a) is (b),andare respectively windowsThe mean and variance of the gray values of the inner pixels,to adjust the parameters, the matching cost after aggregation isP is a windowQ is the pixel point at the corner of the window,andthe gray values of the two pixel points are respectively shown as a formula (7);
formula (7)
The cost aggregation method is based on a cross window, Np is the selected cross window, and q belongs to Np and represents that a termination pixel point q is in the selected cross window;
step 33, selecting the value corresponding to the lowest matching cost from the candidate disparity values as the value of the pixel pointDisparity valueObtaining an initial disparity map corresponding to the first group of binocular imagesAs shown in equation (8);
formula (8)
In the formula (I), the compound is shown in the specification,representing a maximum disparity search range;
step 34, distinguishing shielded points and non-shielded points through left-right consistency check, as shown in formula (9);
formula (9)
In the formula (I), the compound is shown in the specification,is thatMiddle pixel pointThe value of the disparity of (a) to (b),is thatCorresponding pixel point inWhen the difference between the two is more than 1 pixel, the pixel point is a shielding point; distinguishing color segmentation areas after obtaining occlusion points and non-occlusion points, wherein the color segmentation areas are reliable areas when the following conditions are met, and are unreliable areas if the color segmentation areas are not met, as shown in a formula (10);
formula (10)
In the formula (I), the compound is shown in the specification,is the total number of pixels of the region,the number of non-occluded points in the area,is a constant number of times, and is,is a proportionality coefficient; in order to obtain a better fitting effect, the plane fitting work is only adopted for the reliable area, and the parallax plane equation is defined as shown in a formula (11);
formula (11)
In the formula (I), the compound is shown in the specification,is the coordinate of the pixel point and is,as a result of the disparity value,is a parallax plane parameter, which can be obtained according to the weighted least squares method, as shown in formula (12);
formula (12)
Wherein, the formulas of the sum are respectively as shown in formula (13);
formula (13)
In the formula (I), the compound is shown in the specification,the plane parameters can be obtained from the formula (12) and the formula (13) for the number of correct matching points in the regionSubstituting the formula (11) to obtain the parallax value of each pixel in the reliable region, and finally obtaining the parallax map corresponding to the first group of binocular images;
Step 35, repeating the steps 31 to 34 to obtain a disparity map corresponding to the second group of binocular images;
Dividing the binocular image to obtain a target area of the binocular image and obtain two groups of target three-dimensional point clouds;
step 5, carrying out three-dimensional data fusion on data points obtained from the two groups of local coordinate systems and unifying the data points to the same coordinate system;
and (6) determining the contour of the target area, and measuring the length of the contour by using the fused three-dimensional point cloud.
2. The method for measuring the size of the target based on the multi-view binocular vision perception according to claim 1, wherein the method comprises the following steps: in the step (1), two groups of binocular camera parameters are obtained based on a Zhang calibration method, and the method comprises the following steps:
step 11, the image acquisition device adopts four cameras with the same specification to form two groups of binocular cameras which compriseAndthe image acquisition device is used for acquiring images of the calibration plate from multiple angles and ensuring that the calibration plate is positionedClear and complete;
step 12, calibrating the four-eye camera by using a Zhang calibration method to obtain internal and external parameters of the camera;
(1b) respectively to two groups of camerasAndcalibrating to obtain rotation matrix of two groups of camerasAnd a translation matrix, defined asAnd;
3. The method for measuring the size of the target for the multi-view binocular visual perception according to claim 2, wherein the method comprises the following steps: in the step (2), shooting a target by using two groups of binocular cameras to obtain two groups of binocular images, and correcting the two groups of binocular images by using an improved Bouguet algorithm respectively to enable the two groups of binocular images to meet epipolar constraint, wherein the method comprises the following steps:
step 21, acquiring a target image to be measured by using an image acquisition device to obtain two groups of binocular images, wherein the first group of camerasThe binocular image is taken asSecond group of camerasTaken by shootingThe binocular image is(ii) a Defining world coordinate systemFirst group of left eye camerasCoordinate system isAnd is andand withCoincidence, second group left eye cameraCoordinate system is(ii) a First group of right eye camerasCoordinate system isSecond group of right eye camerasCoordinate system is;
Step 22, constructing a first group of binocular images by using a Bouguet algorithmOf the rotation matrixTo pairPerforming primary horizontal correction, and specifically comprising the following steps:
(2a) firstly, the first step is toA rotation matrix ofComposite matrix divided into left and right camerasWherein,;
(2b) CreatingA rotation matrix of translation vector directions in between such that the baseline is parallel to the imaging plane;
formula (1)
Wherein the content of the first and second substances,being the poles in the same direction as the translation vectors,,、andare respectively asAnda translation vector in a direction;a vector in the direction of an image plane;is perpendicular toAndthe vector of the plane in which the lens is located;
(2c) obtaining left and right cameras according to formula (2)Integral rotation matrix of(ii) a Left of the first groupCoordinate system of right camera,Multiplying by respective integral rotation matricesSo that the main optical axes of the left camera and the right camera are parallel, the image plane is parallel to the base line, and the coordinate systems of the first group of the left camera and the right camera are the same after rotation;
Formula (2)
Step 23, mixing,Rotate simultaneously about respective optical centersObtaining a new coordinate system,At this timeAndand world coordinatesOverlapping; obtaining a line alignment image after rotation;
Step 24, repeating step 22, and carrying out binocular image processing on the second group of binocular imagesPerforming primary correction to obtainIntegral rotation matrix ofThe coordinate system of the second group of left and right eye cameras after correction,;
4. The method for measuring the size of the target of the multi-view binocular vision perception according to claim 3, wherein the method comprises the following steps: in the step (4), the binocular image is segmented to obtain a target area of the binocular image, and two groups of target three-dimensional point clouds are obtained, which include:
step 41, performing fine segmentation on the target areas in the two groups of left and right eye images by using Grabcut algorithm and combining with manual frame selection of the target areas, and respectively obtaining image area segmentation results,The method comprises the following specific steps:
(4a) inputting images taken by a first group of left eye camerasThe user selects the marked area by adopting the rectangular areaThe foreground of the initialization is that the foreground of the display,the inner area is the foreground area,The outer area is the background area(ii) a For theEach of the pixels inIf, ifThen to the pixelDispensing label(ii) a If it isThen the label is assigned;
(4b) Using a K-means clustering algorithm to cluster the foreground regionAnd a background regionClustering K kinds of pixels respectively;
(4c) by using,The two label sets respectively initialize GMM parameters of the foreground and the background, and the foreground area is divided into a plurality of regionsEach pixel in the image is substituted into the two obtained GMMs to obtain the probability that the pixel belongs to the foreground area and the background area respectively, and the probability is in a negative logarithm form to obtain an area item;
(4d) computing foreground regionsObtaining boundary terms by Euclidean distance between every two adjacent pixels, obtaining the minimum value of energy by adopting a maximum flow minimum cut algorithm, and giving the calculated result to the foreground region againThe pixels in the row are assigned label sets;
(4f) Repeating the steps (4 a) to (4 e) to segment the target area in the rest of the binocular images, and finally obtaining the segmentation result of the two groups of binocular images,;
Step 42, based on the camera parameters obtained by the Zhang calibration method, setting the focal length of the four-eye camera as,Has a base line distance ofFirst group of left eye imagesHas principal point coordinates ofTo aMiddle pixel pointFrom a disparity mapWith a parallax value of(ii) a As shown in equation (14), acquisition is based on the principle of triangular parallaxIn a first set of left eye camera coordinate systemsThe three-dimensional coordinates of(ii) a ComputingAll the pixels in the coordinate systemThe three-dimensional coordinates of the camera to obtain a first group of camerasAll three-dimensional point clouds of visible targets under the visual angle are recorded as a first group of three-dimensional point clouds,Representing a quantity of a first set of three-dimensional point clouds;
formula (14)
Step 43, set upHas a base line distance ofSecond group of left eye imagesHas principal point coordinates of(ii) a Same as step 41, calculateAll the pixels in the coordinate systemObtaining the three-dimensional coordinates of the second group of camerasAll three-dimensional point clouds of visible targets under the visual angle are recorded as a second group of three-dimensional point clouds,Representing the number of the second set of three-dimensional point clouds.
5. The method of claim 4, wherein the method comprises: in the step (5), three-dimensional data fusion of data points obtained from the two sets of local coordinate systems is unified to the same coordinate system, which includes:
step 51, because of the first group of the left eye camera coordinate systemWith a defined world coordinate systemCoincidence, then coordinate systemAndbetween are rotatedRotating matrixTranslation matrix(ii) a (ii) Point cloud of the first set of three-dimensional points according to equation (15)All three-dimensional data in (1) are subjected to rotational translation to a world coordinate systemThen, a three-dimensional point cloud set under the world coordinate system is obtained;
Formula (15)
Step 52, second group of left eye camera coordinate systemWith the first group of left eye camera coordinate systemThe rotation matrix and the translation matrix in between are respectively,(ii) a (ii) the second set of three-dimensional point clouds according to equation (16)All three-dimensional data in (a) are subjected to rotational translation to a world coordinate systemThen, a three-dimensional point cloud set under the world coordinate system is obtained;
Formula (16)
6. The method of claim 5, wherein the method comprises: determining the outline of the target area, and realizing the dimension measurement of the outline by utilizing the fused three-dimensional point cloud.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210184835.1A CN114255286B (en) | 2022-02-28 | 2022-02-28 | Target size measuring method based on multi-view binocular vision perception |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210184835.1A CN114255286B (en) | 2022-02-28 | 2022-02-28 | Target size measuring method based on multi-view binocular vision perception |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114255286A CN114255286A (en) | 2022-03-29 |
CN114255286B true CN114255286B (en) | 2022-05-13 |
Family
ID=80800014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210184835.1A Active CN114255286B (en) | 2022-02-28 | 2022-02-28 | Target size measuring method based on multi-view binocular vision perception |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114255286B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112161997B (en) * | 2020-09-28 | 2022-09-27 | 南京工程学院 | Online precise visual measurement method and system for three-dimensional geometric dimension of semiconductor chip pin |
CN114842091B (en) * | 2022-04-29 | 2023-05-23 | 广东工业大学 | Binocular egg size assembly line measuring method |
CN114998532B (en) * | 2022-08-05 | 2022-11-01 | 中通服建设有限公司 | Three-dimensional image visual transmission optimization method based on digital image reconstruction |
CN115731303B (en) * | 2022-11-23 | 2023-10-27 | 江苏濠汉信息技术有限公司 | Large-span transmission conductor sag three-dimensional reconstruction method based on bidirectional binocular vision |
CN116129037B (en) * | 2022-12-13 | 2023-10-31 | 珠海视熙科技有限公司 | Visual touch sensor, three-dimensional reconstruction method, system, equipment and storage medium thereof |
CN116188558B (en) * | 2023-04-27 | 2023-07-11 | 华北理工大学 | Stereo photogrammetry method based on binocular vision |
CN116758026B (en) * | 2023-06-13 | 2024-03-08 | 河海大学 | Dam seepage area measurement method based on binocular remote sensing image significance analysis |
CN117190866B (en) * | 2023-11-08 | 2024-01-26 | 广东工业大学 | Polarity discrimination detection method, device and equipment for multiple stacked electronic components |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10205929B1 (en) * | 2015-07-08 | 2019-02-12 | Vuu Technologies LLC | Methods and systems for creating real-time three-dimensional (3D) objects from two-dimensional (2D) images |
CN111563921B (en) * | 2020-04-17 | 2022-03-15 | 西北工业大学 | Underwater point cloud acquisition method based on binocular camera |
CN111750806B (en) * | 2020-07-20 | 2021-10-08 | 西安交通大学 | Multi-view three-dimensional measurement system and method |
CN112991369B (en) * | 2021-03-25 | 2023-11-17 | 湖北工业大学 | Method for detecting outline size of running vehicle based on binocular vision |
-
2022
- 2022-02-28 CN CN202210184835.1A patent/CN114255286B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114255286A (en) | 2022-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114255286B (en) | Target size measuring method based on multi-view binocular vision perception | |
CN109949899B (en) | Image three-dimensional measurement method, electronic device, storage medium, and program product | |
CN101697233B (en) | Structured light-based three-dimensional object surface reconstruction method | |
US11521311B1 (en) | Collaborative disparity decomposition | |
CN107392947B (en) | 2D-3D image registration method based on contour coplanar four-point set | |
CN111192293B (en) | Moving target pose tracking method and device | |
CN108335350A (en) | The three-dimensional rebuilding method of binocular stereo vision | |
CN108694741B (en) | Three-dimensional reconstruction method and device | |
CN106920276B (en) | A kind of three-dimensional rebuilding method and system | |
CN104537707B (en) | Image space type stereoscopic vision moves real-time measurement system online | |
CN110838164B (en) | Monocular image three-dimensional reconstruction method, system and device based on object point depth | |
CN111062131A (en) | Power transmission line sag calculation method and related device | |
CN109741382A (en) | A kind of real-time three-dimensional method for reconstructing and system based on Kinect V2 | |
CN116129037B (en) | Visual touch sensor, three-dimensional reconstruction method, system, equipment and storage medium thereof | |
CN112489193A (en) | Three-dimensional reconstruction method based on structured light | |
CN109766896B (en) | Similarity measurement method, device, equipment and storage medium | |
CN110909571B (en) | High-precision face recognition space positioning method | |
CN114998448A (en) | Method for calibrating multi-constraint binocular fisheye camera and positioning space point | |
CN114998532B (en) | Three-dimensional image visual transmission optimization method based on digital image reconstruction | |
CN116402904A (en) | Combined calibration method based on laser radar inter-camera and monocular camera | |
CN115409897A (en) | Laser radar and camera combined calibration method based on background point cloud refinement processing | |
CN114018214A (en) | Marker binocular sub-pixel distance measurement method based on hardware acceleration system | |
CN106980601A (en) | The high-precision method for solving of basis matrix based on three mesh epipolar-line constraints | |
CN113781573A (en) | Visual odometer method based on binocular catadioptric panoramic camera | |
CN109934879B (en) | Method for calibrating parabolic catadioptric camera by utilizing ball and public autocolar triangle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |