Stripe projection measurement point cloud point-by-point weighting registration method, equipment and medium

文档序号:9369 发布日期:2021-09-17 浏览:39次 中文

1. A stripe projection measurement point cloud point-by-point weighting registration method is characterized by comprising the following steps:

step 1: based on a fringe projection three-dimensional measurement system, performing multi-view measurement on a target to obtain a sampling fringe pattern;

step 2: based on the fringe pattern obtained by sampling and the calibration information of the three-dimensional measurement system, combining with the fringe pattern processing technology, obtaining multi-view three-dimensional point cloud on the surface of the measured object;

and step 3: performing algebraic operation on the sampling fringe pattern to obtain phase precision characteristic quantity;

and 4, step 4: constructing a point-by-point weighting factor positively correlated with the three-dimensional point cloud quality based on the phase precision characteristic quantity;

and 5: carrying out coarse registration on the multi-view point cloud to obtain a position initial value of fine registration;

step 6: carrying out point cloud precise registration on the initial position value and the target point cloud, taking the closest point as a point cloud matching point, giving different weights to the point cloud matching point pair based on the constructed point-by-point weighting factor, and constructing a point cloud precise registration target function;

and 7: and performing least square operation on the point cloud precise registration target function to obtain an optimal translation matrix and an optimal rotation matrix, performing rotation translation pose adjustment on the point cloud, and performing iterative solution to realize point-by-point weighted precise registration of the point cloud.

2. The method according to claim 1, wherein in the step 3, the phase accuracy is represented as the characteristic quantity for representing the phase accuracy

Wherein A is the stripe background term, B is the stripe contrast, f1Representing a phase accuracy characterization function.

3. The method for point-by-point weighted registration of fringe projection measurement point cloud according to claim 1, wherein the point-by-point weighting factor ω in the step 4 isiIs defined as follows:

wherein the content of the first and second substances,is the phase precision characteristic quantity of the original point cloud,is the phase accuracy characteristic quantity of the corresponding point of the target point cloud, f2Representing a point-by-point weighting factor characterizing function.

4. The method according to claim 1, wherein in the step 6, the point cloud fine registration objective function is:

wherein the content of the first and second substances,andis the corresponding point, R, in the source point cloud and the target point cloud*And t*Optimal rotational translation matrix, omega, for transformation of origin cloud to target point cloudiIs the weighting factor of the matching point pair.

5. The method for point-by-point weighted registration of fringe projection measurement point clouds according to claim 1, wherein in the step 7, a point cloud registration optimal translation matrix t is calculated*The formula is as follows:

defining:

wherein the content of the first and second substances,as the sum of the weighting factors of the matching point pairs,andis a weighted average of the original point cloud and the target point cloud.

6. The method for point-by-point weighted registration of fringe projection measurement point clouds according to claim 1, wherein in the step 7, a point cloud registration optimal rotation matrix R is calculated*The process is as follows:

performing singular value decomposition on the matrix C:

C=UΣVT

trace(RC)=trace(RUΣVT)=trace(ΣVTRU)

when V isTWhen RU is unit matrix, trace (rc) takes maximum value, that is:

VTR*U=I

R*=VUT

solving the optimal rotation matrix R of point cloud registration by the singular value decomposition of the matrix C*

7. A computer device comprising a memory and a processor electrically connected, the memory having a computing program stored thereon, the computing program being executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 6 when executing the computing program.

8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-6.

Background

The fringe projection profilometry is a three-dimensional measurement method with increasingly wide requirements, has the advantages of non-contact, automatic information processing, full-field measurement, good environmental adaptability, high precision and the like, is a preferred means of full-field non-contact three-dimensional measurement in the modern manufacturing industry, and can provide three-dimensional data support for product digital design, online processing, geometric quantity detection, dynamic performance testing, mechanical performance analysis, reverse engineering and even product mode identification in mechanical manufacturing, and finally improve the mechanical manufacturing and scene perception level.

Due to the limited field of view of the measuring equipment and the complex appearance of the workpiece, the region to be measured of the object cannot be completely covered by single measurement, so the workpiece needs to be measured from different visual angles respectively, and then the full-visual-angle three-dimensional appearance of the measured object is restored by a point cloud registration mode. The point cloud registration can be divided into two steps of coarse registration and fine registration. Coarse registration refers to relatively coarse registration under the condition that transformation between two point clouds is completely unknown, and the purpose is mainly to provide a relatively good transformation initial value for fine registration; the fine matching criterion is that given an initial transformation, further optimization results in a more accurate transformation. The most widely used Point cloud precise registration algorithm at present is Iterative Closest Point (ICP) algorithm and its optimization algorithm.

In fringe projection three-dimensional profile measurement, the phase accuracy of each point is different, so that the three-dimensional measurement accuracy of different points is different. In the subsequent registration process, if the point cloud registration is directly performed by adopting the ICP algorithm, the points to be matched with different accuracies can be treated equally when the least square method is adopted to solve the space transformation matrix, the data accuracy is not adapted, and the improvement of the final registration accuracy is not facilitated. This is a drawback of the ICP algorithm, to be complemented by targeted studies.

Disclosure of Invention

In order to overcome the defects of the prior art, the invention provides a stripe projection measurement point cloud point-by-point weighting registration method, equipment and medium considering the measurement precision of each matching point, and the overall registration precision of the point cloud is improved.

In order to achieve the aim, the stripe projection measurement point cloud point-by-point weighting registration method comprises the following steps:

step 1: based on a fringe projection three-dimensional measurement system, performing multi-view measurement on a target to obtain a sampling fringe pattern;

step 2: based on the fringe pattern obtained by sampling and the calibration information of the three-dimensional measurement system, combining with the fringe pattern processing technology, obtaining multi-view three-dimensional point cloud on the surface of the measured object;

and step 3: performing algebraic operation on the sampling fringe pattern to obtain phase precision characteristic quantity;

and 4, step 4: constructing a point-by-point weighting factor positively correlated with the three-dimensional point cloud quality based on the phase precision characteristic quantity;

and 5: carrying out coarse registration on the multi-view point cloud to obtain a position initial value of fine registration;

step 6: carrying out point cloud precise registration on the initial position value and the target point cloud, taking the closest point as a point cloud matching point, giving different weights to the point cloud matching point pair based on the constructed point-by-point weighting factor, and constructing a point cloud precise registration target function;

and 7: and performing least square operation on the point cloud precise registration target function to obtain an optimal translation matrix and an optimal rotation matrix, performing rotation translation pose adjustment on the point cloud, and performing iterative solution to realize point-by-point weighted precise registration of the point cloud.

Further, in step 3, the characteristic quantity for representing the phase accuracy is that the phase accuracy is

Wherein A is the stripe background term, B is the stripe contrast, f1Representing a phase accuracy characterization function.

Further, the point-by-point weighting factor ω in step 4iIs defined as follows:

wherein the content of the first and second substances,is the phase precision characteristic quantity of the original point cloud,is the phase accuracy characteristic quantity of the corresponding point of the target point cloud, f2Representing a point-by-point weighting factor characterizing function.

Further, in step 6, the point cloud fine registration objective function is:

wherein the content of the first and second substances,andis the corresponding point, R, in the source point cloud and the target point cloud*And t*Optimal rotational translation matrix, omega, for transformation of origin cloud to target point cloudiIs the weighting factor of the matching point pair.

Further, in step 7, calculating a point cloud registration optimal translation matrix t*The formula is as follows:

defining:

wherein the content of the first and second substances,as the sum of the weighting factors of the matching point pairs,andis a weighted average of the original point cloud and the target point cloud.

Further, in step 7, calculating a point cloud registration optimal rotation matrix R*The process is as follows:

performing singular value decomposition on the matrix C:

C=U∑VT

trace(RC)=trace(RU∑VT)=trace(∑VTRU)

when V isTWhen RU is unit matrix, trace (rc) takes maximum value, that is:

VTR*U=I

R*=VUT

solving the optimal rotation matrix R of point cloud registration by the singular value decomposition of the matrix C*

A computer device comprising an electrically connected memory and a processor, the memory having stored thereon a computing program operable on the processor, when executing the computing program, implementing the steps of the registration method described above.

A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned registration method.

Compared with the prior art, the invention has at least the following beneficial technical effects:

the invention integrates the stripe projection profilometry three-dimensional measurement and the subsequent point cloud registration technology into an organic whole; by fully considering the precision difference of different points to be matched, a point cloud registration function with better adaptability is constructed, which is beneficial to improving the adaptability of complex measurement point cloud and improving the overall registration precision.

The phase precision in the fringe projection profilometry can be represented by indexes such as a fringe background item and fringe contrast, and the phase precision is positively correlated with the three-dimensional measurement precision, so that the indexes such as the fringe background item and the fringe contrast can represent the quality of three-dimensional point cloud data; and establishing a splicing weighting factor according to indexes such as a stripe background item, stripe contrast and the like, carrying out point-to-point weighted ICP (inductively coupled plasma) registration, increasing the weight of high-precision points in the splicing process through the point-to-point weighted constraint effect, and improving the overall registration precision of the point cloud.

Drawings

FIG. 1 is a sinusoidal fringe pattern of two collected view angles of an object to be measured;

FIG. 2 is a unwrapped phase diagram for two views of an object under test;

FIG. 3 is a three-dimensional point cloud image of two views of the object under test;

FIG. 4 is a weighting factor graph of two views of an object to be measured;

FIG. 5 is a point cloud rough registration diagram of two view angles of a measured object;

FIG. 6a is a point cloud unweighted fine registration diagram of two view angles of a measured object;

FIG. 6b is a point cloud weighted fine registration diagram of two view angles of the measured object;

FIG. 7 is a root mean square error statistical chart of the weighted and unweighted point cloud fine registration process;

FIG. 8 is a statistical view of a maximum common point set for a weighted and unweighted point cloud fine registration process;

fig. 9 is a schematic structural diagram of a computer device provided in the present invention.

Detailed Description

In order to make the objects and technical solutions of the present invention clearer and easier to understand. The present invention will be described in further detail with reference to the following drawings and examples, wherein the specific examples are provided for illustrative purposes only and are not intended to limit the present invention.

In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified. In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.

The phase is a core parameter for three-dimensional reconstruction by fringe projection profilometry, and the precision of the phase directly determines the three-dimensional measurement precision. The phase is obtained by two core processing steps of phase demodulation and phase unwrapping of a sampling fringe pattern, and the precision of the phase can be represented by indexes such as fringe background items, fringe contrast, phase errors and the like. The phase precision and the three-dimensional reconstruction precision are positively correlated. In view of this, in the subsequent registration process of the fringe projection measurement point cloud, the registration weighting factor can be established by means of the phase precision, the point-to-point weighted ICP registration is performed, the contribution value of the point pair registration with good measurement precision is improved, the influence of the abnormal point on the registration effect is reduced, and the point cloud registration precision is improved through the point-to-point weighted constraint effect.

Example 1

A stripe projection measurement point cloud point-by-point weighting registration method comprises the following steps:

step 1: and performing multi-view measurement on the target based on the constructed fringe projection three-dimensional measurement system, and sampling to obtain a fringe pattern.

The method comprises the steps of utilizing a plurality of groups of sinusoidal fringe images with different frequencies generated by computer coding, sequentially projecting the sinusoidal fringe images on a measured object by means of a projection system, and acquiring a deformed fringe image modulated by the height of the object by using an industrial camera, wherein the deformed fringe image is a sinusoidal fringe image of two visual angles of the object as shown in figure 1.

Step 2: and obtaining the multi-view three-dimensional point cloud on the surface of the measured object by combining a fringe pattern processing technology based on the fringe pattern obtained by sampling and the calibration information of the three-dimensional measuring system.

Demodulating the acquired fringe image to obtain a wrapped phase of the fringe image, unwrapping the wrapped phase to obtain a real phase, solving the real phase image as shown in fig. 2, solving the three-dimensional point cloud by combining the real phase with calibration parameters, and solving the three-dimensional point cloud as shown in fig. 3.

And step 3: and performing algebraic operation on the fringe pattern to obtain characteristic quantity capable of representing phase precision.

The phase is obtained by two processing steps of phase demodulation and phase unwrapping of the fringe pattern, and the phase precision is defined asIt may be characterized by a streak background term, a streak contrast, or the like.

Wherein A is the stripe background term, B is the stripe contrast, f1Representing a phaseA bit precision characterization function.

And 4, step 4: and constructing a point-by-point weighting factor positively correlated with the three-dimensional point cloud quality based on the phase precision characteristic quantity.

Based on phase accuracyEstablishing point-by-point weighting factor, point-by-point weighting factor omegaiIs defined as follows:

wherein the content of the first and second substances,is the phase precision characteristic quantity of the original point cloud,is the phase accuracy characteristic quantity of the corresponding point of the target point cloud, f2Representing a point-by-point weighting factor characterizing function.

Based on phase accuracyThe point-by-point weighting factors are established as shown in fig. 4, where different gray levels represent different weight values.

And 5: and carrying out coarse registration on the multi-view point cloud data to obtain a position initial value of fine registration.

And performing coarse registration by taking the first view as a target point cloud and the second view as an original point cloud, and performing registration on the general positions as shown in FIG. 5 to provide better initial values of the positions for the next fine registration so as to avoid the subsequent fine registration from falling into a local optimal solution.

Step 6: carrying out point cloud fine registration of an ICP method by using the initial position value and the target point cloud: the ICP method takes the closest point as a matching point, different weights are given to point cloud matching point pairs on the basis of the constructed point-by-point weighting factor, and an improved point cloud precise registration target function is constructed.

Based on the constructed point-by-point weighting factors, the objective function of the ICP point cloud registration can be optimized as:

wherein the content of the first and second substances,andis the corresponding point, R, in the source point cloud and the target point cloud*Optimal rotation matrix for transformation of origin cloud to target point cloud, t*Transforming the origin cloud to an optimal translation matrix of the target point cloud,andis the ith matching point pair, omega, of the original point cloud and the target point cloudiAs a weighting factor, P, for the pair of matching pointssThe number of the original point clouds is R is a rotation matrix for converting the original point clouds into the target point clouds, and t is a translation matrix for converting the original point clouds into the target point clouds.

And 7: and performing least square operation on the target function to obtain an optimal translation matrix and an optimal rotation matrix, performing rotation translation pose adjustment on the point cloud, and performing iterative solution to realize point-by-point weighting and fine registration of the point cloud.

Calculating an optimal translation matrix of point cloud fine registration:

and (3) calculating the weighted mass centers of the original point cloud and the target point cloud to obtain the optimal translation, wherein the mass center position of the point cloud is translated through point cloud translation transformation.

The point cloud weighted centroid formula is calculated as follows:

wherein the content of the first and second substances,as the sum of the weighting factors of the matching point pairs,andthe weighted centroid of the original point cloud and the target point cloud is obtained, and N is the number of matching point pairs of the original point cloud and the target point cloud.

Calculating an optimal translation matrix of point cloud fine registration:

let N be | PsThe objective function of ICP point cloud registration is:

the derivation is carried out, and then:

to minimize the objective function, let its derivative be 0, then: the optimal translation matrix formula for point cloud registration is as follows:

no matter what value R is, the optimal translation t for enabling the target function to obtain the minimum value can be obtained according to the formula*That is, the center of mass of the original point cloud and the target point cloud is calculated to obtain the optimumAnd (4) translating.

After the point cloud is subjected to translation transformation, calculating an optimal rotation matrix of point cloud fine registration:

through the derivation of the optimal translation, the optimal translation can be obtained by calculating the mass centers of the original point cloud and the target point cloud, namely

Thus, the original point cloud and the target point cloud are converted into the mass center coordinate system, and the order is given Andfor intermediate variables, the ICP point cloud registration objective function is rewritten as:

expanding the expression:

since the coordinates of the points are deterministic, independent of R, minimizing the objective function is equivalent to:

namely, the following steps are obtained:

performing singular value decomposition on the matrix C:

C=U∑VT

trace(RC)=trace(RU∑VT)=trace(∑VTRU)

when V isTWhen RU is unit matrix, trace (RC) takes the maximum value. Namely:

VTR*U=I

R*=VUT

solving an orthogonal matrix R by singular value decomposition of the matrix C*However, the orthogonal matrix is divided into two cases, one is a satisfactory rotation matrix, and the other is a unsatisfactory reflection matrix, which needs to be corrected. Because the determinant of the rotation matrix is 1, the determinant value of the reflection matrix is-1, and the expression of the rotation matrix after correction is as follows:

the integration is as follows:

the derivation can be used for calculating the optimal rotation matrix of point cloud registration, namely converting the original point cloud and the target point cloud into a mass center coordinate system, constructing a covariance matrix C, and solving the rotation matrix by using Singular Value Decomposition (SVD) of the C.

After the optimal rotational translation matrix of point cloud fine registration is obtained, pose adjustment is carried out on the original point cloud, and point-by-point weighted fine registration of the fringe projection measurement point cloud is achieved through iterative solution. Meanwhile, unweighted point cloud registration is carried out on the fringe projection measurement point cloud, and the registration effect of point-by-point weighting is contrastingly evaluated. The unweighted fine registration result is shown in fig. 6a and the weighted fine registration result is shown in fig. 6 b. The registration effect is evaluated by two indexes, namely root mean square error (RSME) and maximum common point set (LCP), wherein the root mean square error reflects the integral registration error of the two pieces of point clouds, the maximum common point set reflects the maximum matching degree, and the root mean square error and the maximum common point set of weighted and unweighted point cloud fine registration are respectively counted, as shown in fig. 7 and 8.

It can be seen from fig. 7 and 8 that the root mean square errors of the weighted and unweighted point cloud fine registration iteration processes are basically the same, but on the maximum common point set, weighted registration is superior to unweighted registration, and when iteration is finished, a part of points with better matching are added, so that the maximum matching degree of two pieces is improved through the constraint effect of point-by-point weighting, and the registration accuracy is improved.

Example 2

The computer device provided by the present invention, as shown in fig. 9, includes a memory and a processor electrically connected to each other, where the memory stores a computing program executable on the processor, and the processor implements the steps of the registration method when executing the computing program.

The computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention.

The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer device may include, but is not limited to, a processor, a memory.

The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.

The memory may be used for storing the computer programs and/or modules, and the processor may implement various functions of the terminal device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

Example 3

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above-mentioned contents are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modification made on the basis of the technical idea of the present invention falls within the protection scope of the claims of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:建图方法及装置、计算机可读存储介质、电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!