Contour measurement noise reduction method, device and equipment and readable storage medium
By calculating epipolar error and collision error using a multi-view measurement system, the transformation coordinate pair with the smallest comprehensive error is selected, which solves the problem of poor noise suppression in contour measurement and achieves efficient noise filtering and point cloud data optimization.
Patent Information
- Application Number
- CN202511026472.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-10-31
AI Technical Summary
Existing contour measurement techniques have poor noise suppression, resulting in distortion of the three-dimensional contour, and noise is particularly difficult to remove effectively in the case of optical contamination.
A multi-view measurement system is used to acquire calibration images. By calculating epipolar error and collision error, the transformation coordinate pairs with the smallest comprehensive error are selected to generate point cloud data, thereby achieving multi-level noise filtering.
It effectively removes noise caused by optical contamination, optimizes point cloud data quality, enhances the robustness of contour measurement, and achieves a noise reduction effect of over 55%.
Smart Images

Figure CN120876293A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of contour measurement technology, and more specifically, to a contour measurement noise reduction method, apparatus, device, and readable storage medium. Background Technology
[0002] 3D contour measurement has wide applications in industrial inspection, automated manufacturing, and robot vision. Optical contamination is one of the major challenges in 3D contour measurement. Sources of optical contamination include multiple reflections, subsurface scattering, and high-reflective surfaces.
[0003] To address the issue of optical contamination, researchers proposed a noise reduction method that uses high-frequency fringes to enhance the direct illumination portion and reduce the impact of global illumination. However, in practical applications, this noise reduction method is easily limited by optical defocusing and may amplify noise during phase unfolding, leading to distortion in the final 3D contour. Summary of the Invention
[0004] In view of this, this application provides a contour measurement noise reduction method, apparatus, device and readable storage medium to solve the shortcomings of poor noise suppression effect in existing noise reduction technologies.
[0005] To achieve the above objectives, the following solution is proposed:
[0006] A contour measurement noise reduction method includes:
[0007] Multiple calibration images are acquired by a multi-view measurement system, which includes at least one main view device and at least two secondary view devices. Any main view device and any secondary view device form a measurement pair, and each measurement pair is used to acquire the calibration images.
[0008] Based on the calibration image of each measurement pair, multiple sets of coordinate pairs are generated for each calibration image. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system.
[0009] Calculate the epipolar error, which is used to characterize the distance between the principal coordinates and the corresponding epipolar lines in the principal view coordinate system of the corresponding coordinate pair, and delete coordinate pairs whose corresponding epipolar errors are higher than the preset error threshold;
[0010] Calculate the collision error used to characterize the coordinate errors associated with corresponding coordinate pairs due to optical contamination;
[0011] Based on the epipolar error and collision error corresponding to the same coordinate pair, calculate the comprehensive error of the corresponding coordinate pair;
[0012] Determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image;
[0013] Among multiple transformed coordinate pairs containing the same target coordinates, retain the transformed coordinate pair with the smallest corresponding comprehensive error;
[0014] The resulting transformed coordinate pairs are processed to generate point cloud data.
[0015] A contour measurement noise reduction device, comprising:
[0016] The calibration image acquisition module is used to acquire multiple calibration images collected by the multi-view measurement system. The multi-view measurement system includes at least one main view device and at least two secondary view devices. Any main view device and any secondary view device form a measurement pair, and each measurement pair is used to acquire the calibration images.
[0017] The coordinate pair generation module is used to generate multiple sets of coordinate pairs corresponding to each calibration image based on the calibration image of each measurement pair. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system.
[0018] The epipolar error calculation module is used to calculate the epipolar error, which represents the distance between the corresponding epipolar lines in the principal coordinate system and the principal view coordinate system in the corresponding coordinate pair, and to delete coordinate pairs whose corresponding epipolar errors are higher than the preset error threshold.
[0019] The collision error calculation module is used to calculate the collision error that characterizes the correlation between coordinate errors caused by optical contamination in the corresponding coordinate pairs.
[0020] The comprehensive error calculation module is used to calculate the comprehensive error of the corresponding coordinate pair based on the epipolar error and collision error corresponding to the same coordinate pair.
[0021] The transformation coordinate pair generation module is used to determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image.
[0022] The transformation coordinate pair filtering module is used to retain the transformation coordinate pair with the smallest corresponding comprehensive error among multiple sets of transformation coordinate pairs containing the same target coordinates;
[0023] The point cloud data generation module is used to process the final transformed coordinate pairs to generate point cloud data.
[0024] A contour measurement noise reduction device includes a memory and a processor;
[0025] The memory is used to store programs;
[0026] The processor is used to execute the program to implement the various steps of the contour measurement noise reduction method described above.
[0027] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the various steps of the contour measurement noise reduction method described above.
[0028] As can be seen from the above technical solutions, the contour measurement noise reduction method provided in this application can convert each acquired calibration image into multiple sets of coordinate pairs, and calculate the epipolar error of each set of coordinate pairs in each calibration image one by one, discarding coordinate pairs with excessively high epipolar errors, thus filtering noise from a geometric level; this application can also calculate the collision error of each set of coordinate pairs retained in each calibration image, and the collision error can characterize the situation where the corresponding coordinate pairs are incorrectly associated due to optical contamination. Therefore, this application can use the collision error to filter out invalid matching of coordinate pairs in the same calibration image caused by physical environmental interference; this application can transform the principal coordinates of each set of coordinate pairs in each calibration image to the same coordinate system according to the transformation relationship between the principal view coordinate system and a specific coordinate system of each calibration image. In the coordinate system, the target coordinates are obtained, and then the corresponding coordinate pairs are updated based on each target coordinate to obtain transformed coordinate pairs, thus achieving spatial normalization of multi-view data. The epipolar error and collision error of each transformed coordinate pair can be combined to obtain a comprehensive error. Since each calibration image corresponds to a measurement pair with a common field of view, transformed coordinate pairs with the same target coordinates correspond to the same spatial point. Based on this, this application selects the transformed coordinate pairs with the smallest comprehensive error from the various transformed coordinate pairs of the same spatial point according to the corresponding comprehensive error, and eliminates transformed coordinate pairs with large comprehensive errors. This achieves the selection of transformed coordinate pairs at both the physical and geometric levels, avoiding the limitations of a single error index, effectively reducing noise, and constructing point cloud data based on the finally selected transformed coordinate pairs. It can be seen that this application, through a layered error filtering mechanism, uses epipolar error for coordinate filtering in the first layer and combines epipolar error and collision error for coordinate filtering in the second layer, effectively removing noise caused by optical contamination. This optimizes the quality of the final point cloud data, solves the distortion problem of 3D contour measurement, and enhances the robustness of contour measurement to environmental interference. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0030] Figure 1 This is a flowchart of a contour measurement noise reduction method disclosed in an embodiment of this application;
[0031] Figure 2 This is a schematic diagram of the architecture of a multi-view measurement system provided in an embodiment of this application;
[0032] Figure 3 A schematic diagram illustrating optical contamination caused by multiple reflections, provided as an embodiment of this application;
[0033] Figure 4 A diagram illustrating the principle of collision error provided in this application embodiment;
[0034] Figure 5 A diagram illustrating the principle of monotonicity error is provided for an embodiment of this application;
[0035] Figure 6 This is a structural block diagram of a contour measurement noise reduction device disclosed in an embodiment of this application;
[0036] Figure 7 This is a hardware structure block diagram of a contour measurement noise reduction device disclosed in an embodiment of this application. Detailed Implementation
[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0038] This application provides a contour measurement noise reduction method, which can be applied to various contour measurement systems or three-dimensional reconstruction systems of objects, as well as to various computer terminals or smart terminals. The executing entity can be the processor or server of the computer terminal or smart terminal.
[0039] Next, combine Figure 1 The contour measurement noise reduction method of this application is described in detail, including the following steps:
[0040] Step S1: Acquire multiple calibration images from the multi-view measurement system.
[0041] Specifically, a multi-view measurement system may include at least one primary view device and at least two secondary view devices.
[0042] Among them, the main viewpoint device and the secondary viewpoint device can be a projector and a camera.
[0043] The equipment types of all main view devices in the same multi-view measurement system are the same.
[0044] The devices of each viewpoint in the same multi-view measurement system are of the same type.
[0045] The device type of the main view device is different from that of the secondary view device. For example, when the main view device is a projector, the secondary view device is a camera; and when the main view device is a camera, the secondary view device is a projector.
[0046] See Figure 2 It can be observed that in some embodiments, the multi-view measurement system may include a shared projector as the primary view device and multiple cameras with tilted viewpoints as secondary view devices.
[0047] A measurement pair is formed by any primary viewpoint device and any secondary viewpoint device, and each measurement pair is used to acquire the calibration image.
[0048] like Figure 2 The main view device of the multi-view measurement system shown can be paired with the left and right secondary view devices to form two measurement pairs.
[0049] Each measurement alignment uses a camera-type device for image acquisition, and a projector-type device for auxiliary calibration to complete the acquisition of calibration images.
[0050] Step S2: Based on the calibration image of each measurement pair, generate multiple sets of coordinate pairs corresponding to each calibration image. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system.
[0051] Specifically, multiple methods can be used to generate multiple sets of coordinate pairs corresponding to each calibration image based on the calibration image of each measurement pair.
[0052] For example, a time-phase unwrapping technique can be used to generate multiple sets of coordinate pairs corresponding to each calibration image based on the calibration image of each measurement pair. Specifically, multiple frames of phase patterns can be projected onto the measured object using a projector, and images can be acquired by a camera. Phase blurring can be eliminated through multiple frames to obtain continuous absolute phase values. Then, combined with the imaging models of the master and slave view devices and the phase coordinate mapping relationship, the calibration image can be transformed into multiple sets of coordinate pairs of different spatial points in the master and slave view coordinate systems.
[0053] Alternatively, a speckle spatial projection method can be used to generate multiple sets of coordinate pairs corresponding to each calibration image based on the calibration image of each measurement pair. Specifically, a random speckle pattern can be projected onto the measurement object using a projector, the calibration image can be acquired by a camera, the calibration image can be convolved and matched, and the unique features of the speckle pattern can be used to locate corresponding points. Then, the corresponding coordinates of different spatial points in the main view coordinate system and the secondary view coordinate system can be obtained to form multiple sets of coordinate pairs.
[0054] Step S3: Calculate the polar error used to characterize the distance between the corresponding polar lines in the principal coordinate system and the principal view coordinate system in the corresponding coordinate pair, and delete coordinate pairs whose corresponding polar errors are higher than the preset error threshold.
[0055] Specifically, epipolar constraint means that when a spatial point forms an image point on the imaging plane of two cameras, the position of one image point is constrained by the position of the other image point and the relative pose (extrinsic parameter) between the two cameras. In this case, the image point must fall on the epipolar line determined by the other image point on the imaging plane.
[0056] However, after being subjected to optical contamination, it is easy to cause image point shift, and the image point may shift to the outside of the corresponding epipolar line. Therefore, epipolar error can be used to measure the image point shift.
[0057] The unit direction vector and epipolar intercept parameter of the epipolar line corresponding to each coordinate pair can be obtained, an epipolar error calculation function can be constructed, and each principal coordinate pair can be substituted into the corresponding epipolar error calculation function to calculate the epipolar error.
[0058] The polar error calculation function can be shown below:
[0059]
[0060] In the formula, This represents the polar error of the coordinate pair ((x, y), (u, v)), where (x, y) can be the slave coordinate and (u, v) can be the principal coordinate. Represents the unit direction vector of the coordinate pair corresponding to the polar line; This represents the polar intercept parameter.
[0061] The polar error of each coordinate pair can be compared with a preset error threshold, and coordinate pairs that exceed the error threshold can be deleted.
[0062] An error threshold can be set based on the desired noise removal effect.
[0063] Step S4: Calculate the collision error used to characterize the coordinate error associated with the corresponding coordinate pair due to optical contamination.
[0064] Specifically, in theory, the coordinate pairs corresponding to the same calibration image are unique, that is, each principal coordinate has a unique corresponding slave coordinate.
[0065] However, under conditions of optical contamination (such as multiple reflections of light sources on an object's surface), the uniqueness of coordinate pairs can easily be lost, such as... Figure 3 As shown.
[0066] See Figure 3 It can be observed that the illumination light v1 originates from the center O of the projector. p The q emitted on the projection chip p After reflection, the light reaches point Q on the object's surface. The captured ray v... c The signal propagates from Q to the camera center O. c and on the image sensor q c Point imaging. If O p and O c After all spatial positions have been determined through calibration, the camera projection coordinates can be used to determine (q) c q p Reconstruct the three-dimensional coordinates of object point Q to obtain coordinate pairs; where q c From coordinates, q p The principal coordinates are obtained from the light intensity information using the time-phase unwrapping technique.
[0067] Ideally, I qc q c Time series of light intensity measurements at a point. The ideal component affected only by v1 is denoted as I. id qc Therefore q p The ideal position is determined by the following formula:
[0068]
[0069] However, see Figure 3 It can be seen that I qc It may be contaminated by adjacent reflecting surfaces. v2 represents the illumination ray that is incident on reflecting surface A and then reflected twice back to object point Q. Then I... qc It will become light v r2 The superposition of v1, q p The actual location is determined by the following formula:
[0070]
[0071] Based on this, the polluted ray v2 causes the projector coordinates retrieved from the observations to deviate from their true values, resulting in coordinate offset errors (Δu, Δv) and potentially colliding with and overlapping with the projected coordinates retrieved from other spatial points.
[0072] This application will use real data to illustrate the aforementioned collision and overlap situations, such as... Figure 4 As shown.
[0073] Figure 4 Part (a) in the image is a two-dimensional image of the resistor components on the actual PCB board. The red box represents the cold solder joint of the resistor, which has a semi-mirror characteristic, which can lead to optical contamination such as overexposure and cross-reflection.
[0074] Figure 4 Part (b) is the projected coordinate map obtained by using the time phase unwrapping technique.
[0075] Figure 4 The red and green boxes in parts (a) and (b) are in one-to-one correspondence.
[0076] Figure 4 Part (c) is Figure 4 The vertical coordinate values of the projected coordinates within the red box in part (b), and at the same time, Figure 4 The (d) part is Figure 4 The vertical coordinate value of the projected coordinates within the green box in part (b).
[0077] By comparing and analyzing the data in parts (c) and (d), it can be seen that due to optical contamination, the projection coordinates of part (c) (the area affected by optical contamination) are similar to the projection coordinates of part (d) (normal data), which violates the uniqueness characteristic of camera projection coordinate pairs.
[0078] In view of the above, this application introduces collision error to characterize the erroneous association of coordinate pairs due to optical contamination.
[0079] Step S5: Calculate the comprehensive error of the corresponding coordinate pair based on the epipolar error and collision error corresponding to the same coordinate pair.
[0080] Specifically, a first weight value can be determined to indicate how epipolar error characterizes the noise magnitude;
[0081] A second weight value can be determined to indicate how the collision error characterizes the noise magnitude;
[0082] It can calculate the first product between the epipolar error and the first weight value, and calculate the second product between the collision error and the second weight value;
[0083] The combined error of a coordinate pair can be calculated based on the first and second products corresponding to the same coordinate pair.
[0084] Step S6: Determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image.
[0085] Specifically, each secondary viewing device can be tilted relative to the primary device. Therefore, each measurement pair is equivalent to observing the measured object from the corresponding tilted viewing angle. Thus, it is necessary to convert each tilted viewing angle into a unified vertical viewing angle to better generate point cloud data.
[0086] Therefore, the transformation relationship between the main viewpoint coordinate system and the unified spatial coordinate system can be determined, and the main coordinates in the corresponding coordinate pairs can be converted into target coordinates based on the transformation relationship, resulting in transformed coordinate pairs.
[0087] Each target coordinate is the coordinate of the corresponding spatial point in the target coordinate system.
[0088] Step S7: Among multiple transformed coordinate pairs containing the same target coordinates, retain the transformed coordinate pair with the smallest corresponding comprehensive error.
[0089] Specifically, since each coordinate pair has a corresponding comprehensive error, after transforming each coordinate pair to obtain a transformed coordinate pair, each transformed coordinate pair also has a corresponding comprehensive error.
[0090] The comprehensive error of each transformed coordinate pair containing the same target coordinate (i.e., the same spatial point) can be compared. The transformed coordinate pair with the smallest comprehensive error is retained, while the other transformed coordinate pairs are deleted.
[0091] Since coordinate pairs with epipolar errors exceeding the error threshold have already been deleted, there may be one or more spatial points that correspond to only one transformed coordinate pair. These transformed coordinate pairs can be directly retained. In other words, transformed coordinate pairs where the target coordinates are different from all other transformed coordinate pairs can be retained.
[0092] Step S8: Process the final transformed coordinate pairs to generate point cloud data.
[0093] Specifically, the various transformed coordinate pairs can be integrated according to their spatial positional relationships to form point cloud data.
[0094] As can be seen from the above technical solutions, the contour measurement noise reduction method provided in this application can convert each acquired calibration image into multiple sets of coordinate pairs, and calculate the epipolar error of each set of coordinate pairs in each calibration image one by one, discarding coordinate pairs with excessively high epipolar errors, thus filtering noise from a geometric level; this application can also calculate the collision error of each set of coordinate pairs retained in each calibration image, and the collision error can characterize the situation where the corresponding coordinate pairs are incorrectly associated due to optical contamination. Therefore, this application can use the collision error to filter out invalid matching of coordinate pairs in the same calibration image caused by physical environmental interference; this application can transform the principal coordinates of each set of coordinate pairs in each calibration image to the same coordinate system according to the transformation relationship between the principal view coordinate system and a specific coordinate system of each calibration image. In the coordinate system, the target coordinates are obtained, and then the corresponding coordinate pairs are updated based on each target coordinate to obtain transformed coordinate pairs, thus achieving spatial normalization of multi-view data. The epipolar error and collision error of each transformed coordinate pair can be combined to obtain a comprehensive error. Since each calibration image corresponds to a measurement pair with a common field of view, transformed coordinate pairs with the same target coordinates correspond to the same spatial point. Based on this, this application selects the transformed coordinate pairs with the smallest comprehensive error from the various transformed coordinate pairs of the same spatial point according to the corresponding comprehensive error, and eliminates transformed coordinate pairs with large comprehensive errors. This achieves the selection of transformed coordinate pairs at both the physical and geometric levels, avoiding the limitations of a single error index, effectively reducing noise, and constructing point cloud data based on the finally selected transformed coordinate pairs. It can be seen that this application, through a layered error filtering mechanism, uses epipolar error for coordinate filtering in the first layer and combines epipolar error and collision error for coordinate filtering in the second layer, effectively removing noise caused by optical contamination. This optimizes the quality of the final point cloud data, solves the distortion problem of 3D contour measurement, and enhances the robustness of contour measurement to environmental interference.
[0095] Experimental studies have shown that the noise reduction effect using the above embodiments can reach more than 55%.
[0096] In some embodiments of this application, the process of step S4, calculating the collision error used to characterize the coordinate error associated with the corresponding coordinate pair due to optical contamination, is described in detail below:
[0097] S40. Determine whether there is a misconnection between each set of coordinate pairs; if yes, proceed to step S41; if no, proceed to step S42.
[0098] Specifically, in theory, spatial points that are close to each other have smaller coordinate differences, while spatial points that are far apart have larger coordinate differences.
[0099] Therefore, it can be determined whether the distance between spatial points with similar coordinates in each coordinate pair corresponding to the same calibration image is large. If so, it can be determined that there is a misconnection relationship between the coordinate pairs corresponding to the distance, and step S41 is executed; if not, it can be determined that there is no misconnection relationship between the coordinate pairs corresponding to the distance, and step S42 is executed.
[0100] S41. Calculate the collision error of each coordinate pair corresponding to the misconnection relationship, and assign the collision error of each coordinate pair that does not correspond to the misconnection relationship to 0.
[0101] Specifically, the collision error of each coordinate pair that has a misconnection relationship with other coordinate pairs can be calculated, and the collision error of each coordinate pair that does not have a misconnection relationship with other coordinate pairs can be set to 0.
[0102] The collision error of each coordinate pair corresponding to the misconnection relationship can be calculated in several ways.
[0103] For example, the collision error of a coordinate pair can be calculated based on the epipolar error of each pair. For instance, the proportion value can be adjusted according to the noise removal effect, and the product of the proportion value and the epipolar error of each pair can be used as the collision error of the corresponding coordinate pair. Alternatively, the distance between coordinate pairs with misconnections can be adjusted, and the collision error can be calculated based on the proportion value and the epipolar error.
[0104] For example, an error value can be set directly based on the noise removal effect, and the error value can be used as the collision error for each coordinate pair of the corresponding misconnection relationship.
[0105] S42. Set the collision error of each coordinate pair to 0.
[0106] Specifically, if optical contamination does not lead to a collision zone, the collision error of each coordinate pair can be set to 0 to reduce error redundancy.
[0107] As can be seen from the above technical solution, this embodiment provides an optional method for calculating the collision error that characterizes the coordinate errors of corresponding coordinate pairs due to optical contamination. By using the above method, the coordinate pairs that need to be calculated for specific values of collision error can be filtered by identifying whether there are misconnections in each coordinate pair, thereby reducing the over-calculation of collision error, improving the noise removal effect, reducing the amount of calculation, and speeding up the calculation process.
[0108] In some embodiments of this application, the process of determining whether there is a misconnection between each set of coordinate pairs is described in detail, and the steps are as follows:
[0109] S400: Calculate the distance information between multiple slave coordinates that correspond to the same calibration image and have the same master coordinate.
[0110] Specifically, multiple slave coordinates with the same principal coordinate can be selected from each coordinate pair in the same calibration image, and the distance between any two slave coordinates with the same principal coordinate in the same calibration image can be calculated.
[0111] S401. If the distance information exceeds a preset distance threshold, then multiple coordinate pairs are misconnected.
[0112] Specifically, if any distance exceeds the distance threshold, it indicates that two spatial points are far apart, but due to optical contamination, their principal coordinates in the principal view coordinate system are the same, and the corresponding two coordinate pairs have a misconnection relationship.
[0113] At this point, in order to label these coordinate pairs, the degree of optical contamination can be assigned based on the epipolar error of the coordinate pairs to obtain the collision error.
[0114] The distance threshold can be adjusted based on the noise removal effect; it can generally be set to 5.
[0115] S402. If the distance information does not exceed the preset distance threshold, then there is no misconnection relationship between the corresponding multiple coordinate pairs.
[0116] Specifically, if the distance between two slave coordinates with the same principal coordinate in the same calibration image does not exceed the distance threshold, it indicates that the main reason for the consistency of the principal coordinates of the two spatial points is that they are too close to each other rather than optical contamination, and there is no misconnection relationship between the two coordinate pairs.
[0117] As can be seen from the above technical solution, this embodiment provides an optional method to determine whether there is a misconnection relationship between each set of coordinate pairs. By using the above method, the consistency of the primary coordinates can be identified, similar coordinate pairs can be filtered, and the distance between corresponding coordinate pairs can be evaluated by calculating the distance between the corresponding secondary coordinates, so as to accurately identify the coordinate pairs in the collision area.
[0118] In some embodiments of this application, the process of calculating the comprehensive error of the corresponding coordinate pair based on the epipolar error and collision error corresponding to the same coordinate pair is described in detail, and the steps are as follows:
[0119] S50. Calculate the monotonicity error of each coordinate pair. Each monotonicity error is the distance difference between the corresponding main coordinate and the corresponding target coordinate after the corresponding coordinate is mapped to the main view coordinate system through the corresponding monotonic fitting signal.
[0120] Specifically, after being subjected to optical contamination, image point shifts may not only shift to the outside of the epipolar line, but may also shift to the inside of the epipolar line. Since epipolar error cannot measure the magnitude of the error caused by shifting to the inside of the epipolar line, monotonicity error can be introduced to measure the error caused by the shifting of image points to the inside of the epipolar line.
[0121] The surfaces of objects being measured can be divided into anchored surfaces and non-anchored surfaces.
[0122] Monotonicity error is based on the monotonicity of the anchoring surface, and therefore can be applied to the anchoring surface of the object being measured.
[0123] Anchored surfaces refer to the areas where the measured object satisfies spatial visibility constraints. Their core characteristics are that there are no suspended objects above them, and all areas above them are not visible to any sub-area below them, thus lacking transparency. Similarly, areas that do not satisfy spatial visibility constraints are non-anchored surfaces.
[0124] See Figure 5 It can be seen that for the polar plane formed by the optical center of the projector, the optical center of the camera, and any spatial point on the measured object, the intersection line with the projection chip is the polar line l. P The epipolar line obtained by intersecting with the camera image sensor C The cross section obtained by intersecting the object being measured is l. CsP Assume the polar line l P Given five three-dimensional points 0, a, b, e, and l whose coordinates monotonically increase in the projected coordinate system, map these five points to the epipolar line l. C The coordinate values corresponding to these five three-dimensional points are also monotonically increasing, such as... Figure 5 As shown. It can be seen that the coordinate values of the epipolar line in the main viewpoint coordinate system and the secondary viewpoint coordinate system should have a monotonic relationship. Therefore, the monotonic relationship can be used to measure the error caused by the offset of the image point within the epipolar line. This error can be called monotonicity error.
[0125] The target direction can be the direction in which the polar lines of the main viewing device extend.
[0126] S51. Calculate the combined error of the corresponding coordinate pair by combining the monotonicity error, polar error, and collision error.
[0127] Specifically, a third weight can be determined to characterize how monotonicity error characterizes noise magnitude;
[0128] It can calculate the first product between the epipolar error and the first weight value, the second product between the collision error and the second weight value, and the third product between the monotonicity error and the third weight.
[0129] The combined error of a coordinate pair can be calculated based on the first, second, and third products corresponding to the same coordinate pair.
[0130] As can be seen from the above technical solution, this embodiment provides a new optional method for calculating the comprehensive error. Through this method, noise suppression can be achieved by comprehensively considering monotonicity error, epipolar error, and collision error, thereby improving the noise reduction performance of this application. Experimental studies have shown that the noise reduction effect using the above embodiment can reach over 61%.
[0131] In some embodiments of this application, the process of step S50, calculating the monotonicity error of each coordinate pair, is described in detail below:
[0132] S500, Perform epipolar correction on the target calibration image acquired by the target device in the direction of the corresponding intersecting axis of the phase unfolding to generate a correction image, wherein the target device is a first device or a second device.
[0133] Specifically, the main view coordinate system corresponding to each main view device may include a first axis U and a second axis V that are perpendicular to each other, and the secondary view coordinate system corresponding to each secondary view device may include a third axis X and a fourth axis Y that are perpendicular to each other.
[0134] Each perspective device may include a first device and a second device.
[0135] The target calibration image acquired by the target device can be a calibration image acquired by a measurement pair consisting of the first device and the main view device, or a calibration image acquired by a measurement pair consisting of the second device and the main view device.
[0136] The first device can be set on the first axis U. The third axis X corresponding to the first device intersects with the first axis U, and the fourth axis Y corresponding to the first device can be parallel to the second axis V. Therefore, the first axis U can be used as the intersecting axis corresponding to the first device, and the third axis X of the first device can be set as the target axis of the first device.
[0137] The second device can be set on the second axis V. The third axis X corresponding to the second device can be parallel to the first axis U, and the fourth axis Y corresponding to the second device intersects with the second axis V. Then the second axis V can be used as the intersecting axis corresponding to the second device, and the fourth axis Y of the second device can be set as the target axis of the second device.
[0138] Phase unwrapping refers to the technique of using time phase unwrapping to obtain continuous absolute phase values.
[0139] Epipolar correction refers to the process of transforming potentially tilted and / or non-parallel epipolar lines into parallel and aligned straight lines through geometric transformation, thereby simplifying the search range for corresponding spatial points from tilted epipolar lines to horizontal lines.
[0140] S501. Based on the mapping relationship between the corrected image and the target calibration image, determine the first coordinate corresponding to each coordinate of the target calibration image.
[0141] Specifically, the mapping relationship between the corrected image and the target calibration image can be determined based on the correspondence between each coordinate pair in the corrected image and different spatial points, and the correspondence between different spatial points and each coordinate pair on the target calibration image.
[0142] Based on the mapping relationship, each coordinate is updated to obtain the first coordinates.
[0143] S502. Analyze each first coordinate and its corresponding slave coordinate to generate a monotonic fitting signal corresponding to the target device.
[0144] Specifically, a monotonic fitting signal can be generated to represent the functional relationship between each first coordinate and its corresponding secondary coordinate.
[0145] S503. Substitute the coordinate values of each coordinate on the corresponding target axis of the target calibration image into the corresponding monotonic fitting signal to calculate the target coordinate values.
[0146] Specifically, since the fourth axis Y corresponding to the first device can be parallel to the second axis V, and the third axis X corresponding to the second device can be parallel to the first axis U, after the monotonic fitting signal mapping, each slave coordinate only changes significantly on the intersecting axis. Therefore, the distance of the master coordinate in the target direction can be simplified to the difference between the master coordinate and the target coordinate value on the intersecting axis. The target coordinate value is the value calculated by substituting the coordinate value of the corresponding slave coordinate on the target axis into the corresponding monotonic fitting signal.
[0147] S504. Calculate the difference between the coordinate value of each principal coordinate corresponding to the target calibration image on the corresponding intersecting axis and the target coordinate value to obtain the monotonicity error.
[0148] Specifically, the difference between the coordinate values of each principal coordinate on the corresponding intersecting axis and the corresponding target coordinate value can be used as the monotonicity error.
[0149] Next, we will introduce the method for calculating monotonicity error through specific calculation functions.
[0150] The function for calculating the monotonicity error of the first device can be shown below:
[0151]
[0152] The function for calculating the monotonicity error of the second device can be shown below:
[0153]
[0154] in, For monotonicity error; u is the coordinate value of the principal coordinate on the first axis; v is the coordinate value of the principal coordinate on the second axis. y is the monotonic fitted signal; x is the coordinate value of the source coordinate on the third axis; y is the coordinate value of the source coordinate on the fourth axis.
[0155] As can be seen from the above technical solution, this embodiment provides an optional method for calculating monotonicity error. As can be seen from the above technical solution, this embodiment can use coordinate values on different axes to calculate monotonicity error for slave devices with different postures, thereby improving the ability of monotonicity error to characterize the degree of noise and improving the accuracy of the point cloud data generated by this application.
[0156] In some embodiments of this application, two optional methods for constructing a monotonic fitting signal are provided. Next, the two optional execution processes for step S502, analyzing each first coordinate and its corresponding slave coordinate to generate the monotonic fitting signal corresponding to the target device, will be described in detail below:
[0157] The first type,
[0158] S5020. Take the coordinate values of each slave coordinate of the target device in the corresponding target direction as independent variables, and take the coordinate values of each first coordinate in the corresponding target direction as dependent variables.
[0159] Specifically, since the monotonicity error only considers the difference in coordinate values in the target direction, it is only necessary to perform polynomial fitting on the coordinate values of the first coordinate and the first coordinate in the target direction.
[0160] Since the first coordinate is obtained by mapping from the secondary coordinate, the coordinate values of each secondary coordinate of the target device in the corresponding target direction can be used as independent variables, and the coordinate values of each first coordinate in the corresponding target direction can be used as dependent variables.
[0161] S5021. Perform polynomial fitting based on each independent variable and its corresponding dependent variable to generate a fitted signal.
[0162] Specifically, by adjusting the coefficients of the polynomial, the polynomial function can be made to approximate each data point as closely as possible, minimizing the error between the fitted curve and each data point. Each data point consists of each independent variable and its corresponding dependent variable.
[0163] The polynomial function that minimizes the error of the fitted curve can be used as the fitted signal.
[0164] S5022. Analyze the changing trend of the fitted signal to determine the monotonic changing direction of the fitted signal.
[0165] Specifically, the domain of the fitted signal can be determined based on the coordinate values of each slave coordinate on the corresponding target axis.
[0166] The direction of monotonic change of the fitted signal can be determined by the trend of the fitted curve corresponding to the fitted signal in the domain.
[0167] The direction of monotonic change can be used to characterize the overall trend of the fitted signal; it can be either monotonically increasing or monotonically decreasing.
[0168] When the monotonically changing direction is monotonically increasing, the dependent variable increases as the independent variable increases; when the monotonically changing direction is monotonically decreasing, the dependent variable decreases as the independent variable decreases.
[0169] There are several ways to determine the direction of monotonic change. One possible method will be provided below: for example, one can plot the fitted curve of the signal, compare the lengths of monotonically increasing intervals with the lengths of monotonically decreasing intervals within the domain, and take the trend of the higher axis length as the direction of monotonic change.
[0170] S5023. Solve for the derivative function of the fitted signal.
[0171] Specifically, the derivative of the fitted signal can be obtained by taking the derivative of the fitted signal.
[0172] S5024. Substitute each independent variable into the derivative function and determine whether there is any monotonic change trend represented by any independent variable that is inconsistent with the direction of monotonic change; if yes, proceed to step S5025; if no, proceed to step S5026.
[0173] Specifically, however, due to potential optical contamination of each coordinate pair, one or more data points in the fitted signal may not satisfy the monotonic change direction.
[0174] Therefore, each independent variable can be substituted into the derivative function to calculate the derivative value. When the derivative value is greater than 0, it indicates that the monotonic change trend of the corresponding independent variable is monotonically increasing, and when the derivative value is less than 0, it indicates that the monotonic change trend of the corresponding independent variable is monotonically decreasing.
[0175] The monotonic trend and direction of change of each independent variable can be compared.
[0176] If any monotonic trend exists that is different from the direction of monotonic change, then proceed to step S5025.
[0177] If all monotonic trends are in the same direction as the monotonic changes, then proceed to step S5026.
[0178] S5025. Take the independent variable whose monotonic change trend is inconsistent with the direction of monotonic change as the target independent variable; based on the coordinates of the target independent variable, construct the constraint condition to adjust the derivative value of the target independent variable to 0, and combine the constraint condition, each independent variable and its dependent variable, and each target independent variable and its dependent variable to perform polynomial fitting, generate a new fitted signal, and return to the step of solving the derivative function of the fitted signal.
[0179] Specifically, all independent variables whose monotonic trends differ from their monotonic directions can be used as target independent variables.
[0180] Different monotonic constraints can be applied to different polynomial fitting methods.
[0181] For example, when using the least squares method for polynomial fitting, constraint rows corresponding to each objective independent variable can be added to the solution matrix of the least squares method.
[0182] For example, when using piecewise polynomial fitting, the target independent variable can be set as the segmentation point, and the derivative values of adjacent piecewise polynomials with respect to the target independent variable can be set to 0.
[0183] S5026. The fitted signal is used as the monotonic fitted signal of the target device.
[0184] Specifically, the fitted signal can be directly used as the monotonic fitted signal of the target device.
[0185] The second type,
[0186] S5020. The coordinate values of each slave coordinate of the target device in the corresponding target direction are taken as independent variables, and the coordinate values of each first coordinate in the corresponding target direction are taken as dependent variables. Each independent variable and its corresponding dependent variable form a binary tuple.
[0187] Specifically, the coordinate value of each first coordinate in the corresponding target direction can be used as the independent variable, and the coordinate value of each first coordinate in the corresponding target direction can be used as the dependent variable.
[0188] Each independent variable and its corresponding dependent variable can be grouped into a pair.
[0189] S5021. Sort each pair of tuples according to the size of the independent variable to obtain the sorting result.
[0190] Specifically, the pairs can be sorted in order of decreasing or increasing values of the independent variables, so that each independent variable changes monotonically within the sorting result.
[0191] S5022. Calculate the difference between two adjacent dependent variables in the sorting result and generate a difference set.
[0192] Specifically, the difference between two adjacent dependent variables in the ranking results can be calculated, and the differences can be combined into a set according to the ranking results to determine the trend of each dependent variable when the independent variable changes monotonically.
[0193] S5023. Determine the direction of monotonic change based on each difference.
[0194] Specifically, based on the difference set, a first total amount with a difference greater than 0 and a second total amount with a difference less than 0 can be determined.
[0195] When the first total is greater than the second total, the direction of monotonic change can be determined as monotonically increasing;
[0196] When the first total is not less than the second total, the direction of monotonic change can be determined as monotonically decreasing.
[0197] S5024. Determine whether there exists any difference in the difference set that does not satisfy the monotonic change direction. If yes, proceed to step S5025; otherwise, proceed to step S5026.
[0198] Specifically, when the direction of monotonic change is monotonically increasing, the difference less than 0 can be taken as the first difference that does not satisfy the direction of monotonic change.
[0199] When the direction of monotonic change is monotonically decreasing, the difference greater than 0 can be taken as the first difference that does not satisfy the direction of monotonic change.
[0200] S5025. Take all differences that do not satisfy the monotonic change direction as each first difference, calculate the sum of each first difference to obtain the total amount to be compensated; set each first difference to 0 and update the difference set; in the latest difference set, traverse the differences at both ends of each first difference, calculate the sum of the traversed non-zero differences, until the sum of the traversed differences is not less than the total amount to be compensated, take all the traversed non-zero differences as each second difference; calculate the proportion of each second difference to the final sum of differences to obtain the compensation value; update the latest difference set based on each second difference and its corresponding compensation value, and update each pair of tuples based on the final difference set; perform polynomial fitting on the latest pairs of tuples to generate the monotonic fitting signal corresponding to the target device.
[0201] Specifically, the first differences can be added together to obtain the total amount to be compensated, and the first differences can be updated to 0 to complete the update of the difference set;
[0202] In the latest set of differences, starting from each first difference, we can iterate through both ends of each first difference, take the non-zero difference as the second difference, and add up the second differences until the sum of the differences exceeds or equals the total amount to be compensated.
[0203] The difference between each second difference and its corresponding compensation value can be calculated, and the corresponding second difference can be updated using the difference to complete the update of the difference set. Each compensation value is the product of the second difference and the ratio, and the ratio is the proportion of the total amount to be compensated to the sum of the differences.
[0204] Each pair can be updated based on the latest difference set, and a polynomial fit can be performed based on the latest pairs to obtain a monotonic fitted signal.
[0205] S5026. Perform polynomial fitting based on each pair of tuples to generate a monotonic fitting signal corresponding to the target device.
[0206] Specifically, if the dependent variables of each pair of pairs all satisfy the monotonic change direction, then polynomial fitting can be directly performed on each pair of pairs to generate the monotonic fitting signal corresponding to the target device.
[0207] As can be seen from the above technical solutions, this embodiment provides two optional methods for generating monotonic fitting signals. Through the above methods, different signal generation methods can be adopted for different application scenarios, thereby improving the applicability and practicality of this application.
[0208] Next, we will combine Figure 6 The contour measurement noise reduction device provided in this application is described in detail. The contour measurement noise reduction device described below can be compared with the contour measurement noise reduction method described above.
[0209] See Figure 6 It can be observed that the contour measurement noise reduction device may include:
[0210] The calibration image acquisition module 10 is used to acquire multiple calibration images collected by the multi-view measurement system. The multi-view measurement system includes at least one main view device and at least two secondary view devices. Any main view device and any secondary view device form a measurement pair, and each measurement pair is used to acquire the calibration images.
[0211] The coordinate pair generation module 20 is used to generate multiple sets of coordinate pairs corresponding to each calibration image based on the calibration image of each measurement pair. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system.
[0212] The epipolar error calculation module 30 is used to calculate the epipolar error, which is used to characterize the distance between the corresponding epipolar lines in the principal coordinate system and the principal view coordinate system in the corresponding coordinate pair, and to delete coordinate pairs whose corresponding epipolar errors are higher than the preset error threshold.
[0213] The collision error calculation module 40 is used to calculate the collision error that characterizes the correlation between the coordinates of the corresponding coordinate pairs due to optical contamination.
[0214] The comprehensive error calculation module 50 is used to calculate the comprehensive error of the corresponding coordinate pair based on the epipolar error and collision error corresponding to the same coordinate pair.
[0215] The transformation coordinate pair generation module 60 is used to determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image.
[0216] The transformation coordinate pair filtering module 70 is used to retain the transformation coordinate pair with the smallest corresponding comprehensive error among multiple sets of transformation coordinate pairs containing the same target coordinates;
[0217] The point cloud data generation module 80 is used to process the final transformed coordinate pairs to generate point cloud data.
[0218] Furthermore, the collision error calculation module 40 may include:
[0219] The misconnection judgment unit is used to determine whether there is a misconnection relationship between each set of coordinate pairs; if so, the collision error calculation unit is called; if not, the collision error assignment unit is called.
[0220] The collision error calculation unit is used to calculate the collision error of each coordinate pair corresponding to the misconnection relationship, and to assign the collision error of each coordinate pair that does not correspond to the misconnection relationship to 0.
[0221] The collision error assignment unit is used to assign a collision error of 0 to each set of coordinate pairs.
[0222] Furthermore, the misconnection determination unit may include:
[0223] The first misconnection relationship judgment subunit is used to calculate the distance information between multiple slave coordinates that correspond to the same calibration image and have the same principal coordinates;
[0224] The second misconnection relationship judgment subunit is used to determine that if the distance information exceeds a preset distance threshold, then multiple corresponding coordinate pairs have a misconnection relationship.
[0225] The third misconnection relationship judgment subunit is used to determine that if the distance information does not exceed a preset distance threshold, then there is no misconnection relationship between the corresponding multiple coordinate pairs.
[0226] Furthermore, the comprehensive error calculation module 50 may include:
[0227] A calibration image generation unit is used to perform epipolar correction on the target calibration image acquired by the target device in the direction of the corresponding intersecting axis of the phase unfolding to generate a calibration image, wherein the target device is a first device or a second device;
[0228] The first coordinate determining unit is used to determine the first coordinate corresponding to each coordinate of the target calibration image based on the mapping relationship between the calibrated image and the target calibration image;
[0229] A monotonic fitting signal generation unit is used to analyze each first coordinate and its corresponding slave coordinate to generate a monotonic fitting signal corresponding to the target device.
[0230] The target coordinate value calculation unit is used to substitute the coordinate value of each coordinate on the corresponding target axis of the target calibration image into the corresponding monotonic fitting signal to calculate the target coordinate value.
[0231] The monotonicity error calculation unit is used to calculate the difference between the coordinate value of each principal coordinate corresponding to the target calibration image on the corresponding intersecting axis and the target coordinate value, so as to obtain the monotonicity error.
[0232] Furthermore, the monotonic fitting signal generation unit may include:
[0233] The independent variable selection subunit is used to take the coordinate values of each slave coordinate of the target device in the corresponding target direction as independent variables and the coordinate values of each first coordinate in the corresponding target direction as dependent variables.
[0234] The multinomial fitting subunit is used to perform multinomial fitting based on each independent variable and its corresponding dependent variable to generate a fitted signal.
[0235] The monotonic change direction determination subunit is used to analyze the change trend of the fitted signal and determine the monotonic change direction of the fitted signal.
[0236] The derivative function solving sub-unit is used to solve for the derivative function of the fitted signal;
[0237] The monotonic change trend comparison subunit is used to substitute each independent variable into the derivative function to determine whether there is any monotonic change trend represented by any independent variable that is inconsistent with the direction of monotonic change; if so, the constraint condition determination subunit is called; if not, the fitting signal setting subunit is called.
[0238] The constraint condition determination sub-unit is used to take the independent variable whose monotonic change trend is inconsistent with the direction of monotonic change as the target independent variable; based on the coordinate of the corresponding target independent variable, a constraint condition is constructed to adjust the derivative value of the target independent variable to 0; and the constraint condition, each independent variable and its dependent variable, and each target independent variable and its dependent variable are combined to perform polynomial fitting to generate a new fitting signal, and return to call the derivative function to solve the sub-unit;
[0239] A fitting signal setting subunit is used to use the fitting signal as a monotonic fitting signal for the target device.
[0240] Furthermore, the monotonic fitting signal generation unit may also include:
[0241] The binary tuple generation subunit is used to take the coordinate values of each slave coordinate of the target device in the corresponding target direction as independent variables and the coordinate values of each first coordinate in the corresponding target direction as dependent variables. Each independent variable and its corresponding dependent variable form a binary tuple.
[0242] The sorting result generation sub-unit is used to sort each pair of tuples according to the size of the independent variable, and obtain the sorting result;
[0243] A difference set generation sub-unit is used to calculate the difference between two adjacent dependent variables in the sorting result and generate a difference set;
[0244] The difference utilization sub-unit is used to determine the direction of monotonic change based on each difference;
[0245] The difference set judgment subunit is used to determine whether there is any difference in the difference set that does not satisfy the monotonic change direction; if so, the binary tuple update subunit is called; if not, the binary tuple fitting subunit is called.
[0246] The binary tuple update subunit is used to take all differences that do not satisfy the monotonic change direction as first differences, calculate the sum of the first differences to obtain the total amount to be compensated; set each first difference to 0 and update the difference set; in the latest difference set, iterate through the differences at both ends of each first difference, calculate the sum of the non-zero differences encountered, until the sum of the encountered differences is not less than the total amount to be compensated, and take all non-zero differences encountered as second differences; calculate the proportion of each second difference to the final sum of differences to obtain the compensation value; update the latest difference set based on each second difference and its corresponding compensation value, and update each binary tuple based on the final difference set; perform polynomial fitting on each latest binary tuple to generate the monotonic fitting signal corresponding to the target device;
[0247] The binary fitting subunit is used to perform polynomial fitting based on each binary tuple to generate a monotonic fitting signal corresponding to the target device.
[0248] The contour measurement noise reduction device provided in this application embodiment can be applied to contour measurement noise reduction equipment, such as PC terminals, cloud platforms, servers, and server clusters. Optionally, Figure 7 The hardware structure block diagram of the contour measurement noise reduction device is shown, with reference to... Figure 7 The hardware structure of the contour measurement noise reduction device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0249] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;
[0250] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0251] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0252] The memory stores a program, which the processor can call. The program is used for:
[0253] Multiple calibration images are acquired by a multi-view measurement system, which includes at least one main view device and at least two secondary view devices. Any main view device and any secondary view device form a measurement pair, and each measurement pair is used to acquire the calibration images.
[0254] Based on the calibration image of each measurement pair, multiple sets of coordinate pairs are generated for each calibration image. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system.
[0255] Calculate the epipolar error, which is used to characterize the distance between the principal coordinates and the corresponding epipolar lines in the principal view coordinate system of the corresponding coordinate pair, and delete coordinate pairs whose corresponding epipolar errors are higher than the preset error threshold;
[0256] Calculate the collision error used to characterize the coordinate errors associated with corresponding coordinate pairs due to optical contamination;
[0257] Based on the epipolar error and collision error corresponding to the same coordinate pair, calculate the comprehensive error of the corresponding coordinate pair;
[0258] Determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image;
[0259] Among multiple transformed coordinate pairs containing the same target coordinates, retain the transformed coordinate pair with the smallest corresponding comprehensive error;
[0260] The resulting transformed coordinate pairs are processed to generate point cloud data.
[0261] Optionally, the refined and extended functions of the program can be referred to the above description.
[0262] This application embodiment also provides a readable storage medium that can store a program suitable for execution by a processor, the program being used for:
[0263] Multiple calibration images are acquired by a multi-view measurement system, which includes at least one main view device and at least two secondary view devices. Any main view device and any secondary view device form a measurement pair, and each measurement pair is used to acquire the calibration images.
[0264] Based on the calibration image of each measurement pair, multiple sets of coordinate pairs are generated for each calibration image. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system.
[0265] Calculate the epipolar error, which is used to characterize the distance between the principal coordinates and the corresponding epipolar lines in the principal view coordinate system of the corresponding coordinate pair, and delete coordinate pairs whose corresponding epipolar errors are higher than the preset error threshold;
[0266] Calculate the collision error used to characterize the coordinate errors associated with corresponding coordinate pairs due to optical contamination;
[0267] Based on the epipolar error and collision error corresponding to the same coordinate pair, calculate the comprehensive error of the corresponding coordinate pair;
[0268] Determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image;
[0269] Among multiple transformed coordinate pairs containing the same target coordinates, retain the transformed coordinate pair with the smallest corresponding comprehensive error;
[0270] The resulting transformed coordinate pairs are processed to generate point cloud data.
[0271] Optionally, the refined and extended functions of the program can be referred to the above description.
[0272] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0273] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0274] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. The various embodiments of this application can be combined with each other. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A contour measurement noise reduction method, characterized in that, include: Multiple calibration images are acquired by a multi-view measurement system, which includes at least one main view device and at least two secondary view devices. Any main view device and any secondary view device form a measurement pair, and each measurement pair is used to acquire the calibration images. Based on the calibration image of each measurement pair, multiple sets of coordinate pairs are generated for each calibration image. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system. Calculate the epipolar error, which is used to characterize the distance between the principal coordinates and the corresponding epipolar lines in the principal view coordinate system of the corresponding coordinate pair, and delete coordinate pairs whose corresponding epipolar errors are higher than the preset error threshold; Calculate the collision error used to characterize the coordinate errors associated with corresponding coordinate pairs due to optical contamination; Based on the epipolar error and collision error corresponding to the same coordinate pair, calculate the comprehensive error of the corresponding coordinate pair; Determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image; Among multiple transformed coordinate pairs containing the same target coordinates, retain the transformed coordinate pair with the smallest corresponding comprehensive error; The resulting transformed coordinate pairs are processed to generate point cloud data.
2. The contour measurement noise reduction method according to claim 1, characterized in that, The calculation is used to characterize the collision error associated with the coordinate errors caused by optical contamination in the corresponding coordinate pairs, including: Determine whether there are any misconnections between each set of coordinate pairs; If so, calculate the collision error for each pair of coordinates corresponding to the misconnection relationship, and assign the collision error of each pair of coordinates that does not correspond to the misconnection relationship to 0. If not, then assign a collision error of 0 to each coordinate pair.
3. The contour measurement noise reduction method according to claim 2, characterized in that, The determination of whether there is a misconnection between each set of coordinate pairs includes: Calculate the distance information between multiple slave coordinates that correspond to the same calibration image and have the same principal coordinates; If the distance information exceeds a preset distance threshold, then the corresponding multiple coordinate pairs are misconnected; If the distance information does not exceed a preset distance threshold, then there is no misconnection relationship between the corresponding multiple coordinate pairs.
4. The contour measurement noise reduction method according to claim 1, characterized in that, The calculation of the comprehensive error of the corresponding coordinate pair based on the epipolar error and collision error corresponding to the same coordinate pair includes: Calculate the monotonicity error for each coordinate pair. Each monotonicity error is the distance difference between the corresponding primary coordinate and the corresponding target coordinate after the corresponding coordinate is mapped to the primary view coordinate system through the corresponding monotonic fitting signal. The combined error of the corresponding coordinate pair is calculated by integrating the monotonicity error, epipolar error, and collision error.
5. The contour measurement noise reduction method according to claim 4, characterized in that, Each main view device has a main view coordinate system including a first axis and a second axis that are perpendicular to each other, and each secondary view device has a secondary view coordinate system including a third axis and a fourth axis that are perpendicular to each other; among the secondary view devices, there is a first device set on the first axis, the third axis corresponding to the first device intersects with the first axis and the fourth axis corresponding to the first device is parallel to the second axis, the first axis is the intersecting axis corresponding to the first device, and the third axis of the first device is set as the target axis of the first device; Each of the viewing devices has a second device set on the second axis. The third axis corresponding to the second device is parallel to the first axis, and the fourth axis corresponding to the second device intersects the second axis. The second axis is the intersecting axis corresponding to the second device. The fourth axis of the second device is set as the target axis of the second device. The calculation of the monotonicity error for each coordinate pair includes: The target calibration image acquired by the target device is polar-corrected in the direction of the corresponding intersecting axis of the phase unfolding to generate a corrected image, wherein the target device is a first device or a second device; Based on the mapping relationship between the corrected image and the target calibrated image, determine the first coordinate corresponding to each coordinate of the target calibrated image; Analyze each first coordinate and its corresponding slave coordinate to generate a monotonic fitting signal corresponding to the target device; Substitute the coordinate values of each coordinate on the corresponding target axis of the target calibration image into the corresponding monotonic fitting signal to calculate the target coordinate values; The monotonicity error is obtained by calculating the difference between the coordinate value of each principal coordinate corresponding to the target calibration image on the corresponding intersecting axis and the target coordinate value.
6. The contour measurement noise reduction method according to claim 5, characterized in that, The step of analyzing each first coordinate and its corresponding slave coordinate to generate a monotonic fitting signal corresponding to the target device includes: The coordinate values of each slave coordinate of the target device in the corresponding target direction are taken as independent variables, and the coordinate values of each first coordinate in the corresponding target direction are taken as dependent variables. A polynomial fitting is performed based on each independent variable and its corresponding dependent variable to generate a fitted signal. The changing trend of the fitted signal is analyzed to determine the monotonic changing direction of the fitted signal; Solve for the derivative function of the fitted signal; Substitute each independent variable into the derivative function to determine whether there is any monotonic change trend represented by any independent variable that is inconsistent with the direction of monotonic change. If so, the independent variable whose monotonic change trend is inconsistent with the direction of monotonic change is taken as the target independent variable; based on the coordinates of the corresponding target independent variable, a constraint condition is constructed to adjust the derivative value of the target independent variable to 0, and the constraint condition, each independent variable and its dependent variable, and each target independent variable and its dependent variable are combined to perform polynomial fitting to generate a new fitted signal, and the step of solving the derivative function of the fitted signal is returned; If not, the fitted signal is taken as the monotonic fitted signal of the target device.
7. The contour measurement noise reduction method according to claim 5, characterized in that, The step of analyzing each first coordinate and its corresponding slave coordinate to generate a monotonic fitting signal corresponding to the target device includes: The coordinate values of each slave coordinate of the target device in the corresponding target direction are taken as independent variables, and the coordinate values of each first coordinate in the corresponding target direction are taken as dependent variables. Each independent variable and its corresponding dependent variable form a binary tuple. Sort the pairs according to the magnitude of the independent variable to obtain the sorting result; Calculate the difference between two adjacent dependent variables in the sorting results, and generate a difference set; Determine the direction of monotonic change based on each difference; Determine whether there exists any difference in the difference set that does not satisfy the monotonic change direction; If so, all differences that do not satisfy the monotonic change direction are taken as first differences, and the sum of the first differences is calculated to obtain the total amount to be compensated; each first difference is set to 0, and the difference set is updated; in the latest difference set, the differences at both ends of each first difference are traversed, and the sum of the non-zero differences encountered is calculated until the sum of the differences encountered is not less than the total amount to be compensated, and all non-zero differences encountered are taken as second differences; the proportion of each second difference to the final sum of differences is calculated to obtain the compensation value; the latest difference set is updated based on each second difference and its corresponding compensation value, and each pair of tuples is updated based on the final difference set; polynomial fitting is performed on each of the latest pairs of tuples to generate the monotonic fitting signal corresponding to the target device; If not, then a polynomial fitting is performed based on each pair of tuples to generate a monotonic fitting signal corresponding to the target device.
8. A contour measurement noise reduction device, characterized in that, include: The calibration image acquisition module is used to acquire multiple calibration images collected by the multi-view measurement system. The multi-view measurement system includes at least one main view device and at least two secondary view devices. Any main view device and any secondary view device form a measurement pair, and each measurement pair is used to acquire the calibration images. The coordinate pair generation module is used to generate multiple sets of coordinate pairs corresponding to each calibration image based on the calibration image of each measurement pair. Each set of coordinate pairs contains the principal coordinates of the corresponding spatial point in the corresponding principal view coordinate system and the slave coordinates in the corresponding slave view coordinate system. The epipolar error calculation module is used to calculate the epipolar error, which represents the distance between the corresponding epipolar lines in the principal coordinate system and the principal view coordinate system in the corresponding coordinate pair, and to delete coordinate pairs whose corresponding epipolar errors are higher than the preset error threshold. The collision error calculation module is used to calculate the collision error that characterizes the correlation between coordinate errors caused by optical contamination in the corresponding coordinate pairs. The comprehensive error calculation module is used to calculate the comprehensive error of the corresponding coordinate pair based on the epipolar error and collision error corresponding to the same coordinate pair. The transformation coordinate pair generation module is used to determine the transformation relationship between the principal view coordinate system and the target coordinate system corresponding to each calibration image, and update the principal coordinates in each coordinate pair to the target coordinates based on the transformation relationship corresponding to each calibration image, thereby generating the transformation coordinate pair corresponding to each calibration image. The transformation coordinate pair filtering module is used to retain the transformation coordinate pair with the smallest corresponding comprehensive error among multiple sets of transformation coordinate pairs containing the same target coordinates; The point cloud data generation module is used to process the final transformed coordinate pairs to generate point cloud data.
9. A contour measurement noise reduction device, characterized in that, Including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement each step of the contour measurement noise reduction method as described in any one of claims 1-7.
10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the contour measurement noise reduction method as described in any one of claims 1-7.