A laser displacement testing method

Through data fusion and deep learning image recognition model optimization, a displacement test model is generated, which solves the problem of insufficient accuracy and stability of laser displacement measurement methods, and achieves more efficient laser displacement testing.

CN119374497BActive Publication Date: 2025-08-08北京海铵德机械科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411424454.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-08-08
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

The existing laser displacement measurement methods have shortcomings in terms of accuracy and stability, due to environmental factors and sensor performance.

Method used

By determining the first test data between the laser emitter and the object to be measured and the second test data moved, data fusion is performed, sample image data and displacement data are generated, and the deep learning image recognition model is used for optimization, a displacement test model is generated, and the laser displacement test results are finally obtained.

Benefits of technology

It improves the accuracy and stability of laser displacement testing, simplifies the operation process, and improves data identification efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119374497B_ABST
    Figure CN119374497B_ABST
Patent Text Reader

Abstract

The present invention discloses a laser displacement testing method, which belongs to the technical field of laser displacement testing. Based on sample image data and corresponding displacement data, a pre-built deep learning image recognition model is optimized to obtain a displacement testing model. Then, real-time test data is acquired, and the real-time test data is identified using the displacement testing model to obtain a laser displacement test result. Combining deep learning with laser displacement testing can effectively improve the accuracy and stability of displacement testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of laser displacement testing, and in particular relates to a laser displacement testing method. Background Art

[0002] Existing distance measurement technologies include ultrasonic ranging, infrared ranging, and radar ranging. However, these technologies have limitations in practical applications, such as low measurement accuracy and significant environmental susceptibility. Laser ranging technology, with its high directivity, high monochromaticity, and high brightness, offers significant advantages in precise distance measurement. Within the existing laser ranging field, laser displacement sensors are widely used due to their non-contact, high-precision, and high-speed advantages. However, traditional laser displacement measurement methods are often limited by environmental factors and the performance of the sensor itself, resulting in a need for improved measurement accuracy and stability. Summary of the Invention

[0003] The present invention provides a laser displacement testing method to solve the technical problems of low precision and poor stability in the prior art.

[0004] A laser displacement testing method, comprising:

[0005] Determining first test data between the laser emitter and the object under test and second test data after continuously moving the object under test;

[0006] Wherein, the first test data and the second test data both include a test distance and a test image reflected by the surface of the object under test and captured by the area array image sensor;

[0007] Performing test data fusion according to the first test data and the second test data to determine sample image data and corresponding displacement data;

[0008] Based on the sample image data and the corresponding displacement data, the pre-built deep learning image recognition model is optimized to obtain the displacement test model;

[0009] Real-time test data is acquired, and after the real-time test data is identified using the displacement test model, a laser displacement test result is obtained.

[0010] Furthermore, performing test data fusion based on the first test data and the second test data to determine sample image data and corresponding displacement data includes:

[0011] Taking out the test image in the second test data, and determining the pixel positions corresponding to the light spots in the test image corresponding to any two adjacent positions;

[0012] Based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions and the test distance, a new test image and a test distance corresponding to the new test image are generated using linear interpolation to generate new test data at all distances within the measurement limit;

[0013] For any second test data or any new test data, the test image is spliced with the test image in the first test data to obtain a spliced image, and the spliced image is used as sample image data, and the test distance in the second test data or the new test data is used as the corresponding displacement data.

[0014] Furthermore, taking out the test image in the second test data and determining the pixel positions corresponding to the light spots in the test image corresponding to any two adjacent positions, includes:

[0015] Retrieving a test image from the second test data;

[0016] For any test image in the second test data, determining a target pixel point where a laser spot reflected by the surface of the object to be tested is located;

[0017] The pixel positions of the target pixels are averaged to obtain the pixel position corresponding to the light spot in the test image.

[0018] Furthermore, based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions and the test distance, a new test image and the test distance corresponding to the new test image are generated using linear interpolation to generate new test data at all distances within the measurement limit, including:

[0019] Determining the distance between the light spots in the test images corresponding to the two adjacent positions based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions;

[0020] Determining the actual distance corresponding to the test images corresponding to the two adjacent positions based on the actual test distance corresponding to the test images corresponding to the two adjacent positions;

[0021] Obtaining a distance ratio according to the actual distance and the spot distance; wherein the distance ratio is used to represent the pixel distance corresponding to the unit distance corresponding to the actual distance;

[0022] According to the distance ratio, the pixel distance change caused by moving the unit distance is determined;

[0023] Based on the test images corresponding to the two adjacent positions and the pixel distance change, the light spot in the test image is moved by a fixed distance to obtain a new test image, and the actual distance is modified by a unit distance to obtain a test distance corresponding to the new test image;

[0024] The test distances corresponding to the new test images are collectively used as new test data.

[0025] Furthermore, based on the test images corresponding to the two adjacent positions and the pixel distance change, the light spot in the test image is moved by a fixed distance to obtain a new test image, and the actual distance is modified by a unit distance to obtain a test distance corresponding to the new test image, including:

[0026] For the test images corresponding to the two adjacent positions, the light spot corresponding to the test image corresponding to one position is used as the starting point, the light spot corresponding to the test image corresponding to the other position is used as the end point, and the light spot in the test image is moved by a fixed distance to obtain a new test image;

[0027] While moving the light spot, the actual distance corresponding to the starting point is modified by the unit distance to obtain the test distance corresponding to the new test image.

[0028] Furthermore, based on the sample image data and the corresponding displacement data, the pre-built deep learning image recognition model is optimized to obtain a displacement test model, including:

[0029] For a pre-built deep learning image recognition model, randomly initialize model parameters corresponding to the deep learning image recognition model, and form the model parameters into a vector to obtain a model parameter vector;

[0030] Based on the above-mentioned model parameter vector acquisition method, multiple different model parameter vectors are obtained to complete the generation of the initial solution;

[0031] In the current optimization process, the model parameter vector is subjected to local information exploration in random directions to obtain the model parameter vector after local information exploration;

[0032] For the model parameter vector after local information exploration, a probabilistic decision method is used to perform global information exploration on the model parameter vector in a random direction to obtain the model parameter vector after global information exploration;

[0033] For the model parameter vector after global information exploration, a multi-information interaction method is used to perform optimal information exploration on the model parameter vector to obtain the model parameter vector after optimal information exploration;

[0034] Determine whether the current number of optimizations has reached the maximum number of optimizations. If so, determine the final parameters of the deep learning image recognition model based on the model parameter vector after optimal information exploration to obtain the displacement test model. Otherwise, return to the local information exploration step.

[0035] Furthermore, the model parameter vector is subjected to local information exploration in random directions, and the model parameter vector after local information exploration is obtained as follows:

[0036]

[0037] in, represents the i-th model parameter vector in the t-th optimization process, represents the i-th model parameter vector in the t+1-th optimization process, that is, the model parameter vector after the i-th local information exploration; i = 1, 2, ..., I, I represents the total number of model parameter vectors, In addition to the model parameter vector Other model parameter vectors except , rand1 represents a random number between (0,1), and π represents pi.

[0038] Furthermore, for the model parameter vector after local information exploration, a probabilistic decision method is used to perform global information exploration on the model parameter vector in random directions, and the model parameter vector after global information exploration is obtained as follows:

[0039] For each model parameter vector after global information exploration, its mutation probability is determined as:

[0040]

[0041] Among them, θ represents the mutation probability, Represents the fitness of the model parameter vector after the k-th global information exploration, represents the fitness corresponding to the optimal model parameter vector, and exp represents the exponential function with the natural constant e as the base;

[0042] Determine the number of mutations:

[0043] η t =INT(αcos(πt / T)*η t-1 )

[0044] Among them, η t represents the number of mutations during the t-th optimization process, η t-1 represents the number of mutations in the t-1th optimization process, INT represents the rounding function, α represents the attenuation factor, T represents the maximum number of optimizations, and π represents the circumference of a circle;

[0045] Arrange the model parameter vectors after global information exploration in descending order of fitness, and sort the first η t The model parameter vector is taken out as the target model parameter vector;

[0046] For the target model parameter vector, based on the mutation probability, the roulette wheel method is used for exploration:

[0047]

[0048] in, represents the mth target model parameter vector in the tth optimization process, represents the model parameter vector after the mth global information exploration, m=1,2,…,I, represents the model parameter vector obtained through Levy flight, rand2 represents a random number between (0,1), π represents pi, and || represents the absolute value.

[0049] Furthermore, for the model parameter vector after global information exploration, a multi-information interaction method is used to perform optimal information exploration on the model parameter vector, and the model parameter vector after optimal information exploration is obtained as follows:

[0050]

[0051] in, represents the model parameter vector after the nth global information exploration, Represents the model parameter vector after the nth optimal information exploration, rand3 represents a random number between (0,1), rand4 represents a random number between (0,1), represents the optimal model parameter vector, Represents the center of the model parameter vector.

[0052] Furthermore, real-time test data is acquired and the displacement test model is used to identify the real-time test data to obtain laser displacement test results, including:

[0053] Acquiring real-time test data; wherein the real-time test data is a real-time image reflected by the surface of the object being tested and captured by the area array image sensor;

[0054] The real-time test data is input into the displacement test model to obtain laser displacement test results.

[0055] The present invention provides a laser displacement testing method, which optimizes a pre-built deep learning image recognition model based on sample image data and corresponding displacement data to obtain a displacement testing model, and then obtains real-time test data. After using the displacement testing model to identify the real-time test data, a laser displacement test result is obtained. Combining deep learning with laser displacement testing can effectively improve the accuracy and stability of displacement testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0057] Figure 1 A flowchart of a laser displacement testing method provided by an embodiment of the present invention.

[0058] Figure 2 This is a basic principle diagram of the laser displacement test provided by an embodiment of the present invention.

[0059] The above drawings illustrate specific embodiments of the present invention, which will be described in more detail below. These drawings and the accompanying description are not intended to limit the scope of the present invention in any way, but rather to illustrate the concept of the present invention to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0061] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0062] like Figure 1 As shown, an embodiment of the present invention provides a laser displacement testing method, comprising:

[0063] S101, determining first test data between a laser emitter and a measured object and second test data after continuously moving the measured object;

[0064] Wherein, the first test data and the second test data both include a test distance and a test image reflected by the surface of the object under test and captured by the area array image sensor;

[0065] In this embodiment, the first test data is data at a fixed distance, which serves as a reference target. Combined with deep learning, displacement testing can be effectively implemented. For example, the first test data at a distance of 1 meter can be used as a reference target, and then the second test data can be learned to implement displacement testing.

[0066] like Figure 2As shown, in order for those skilled in the art to better understand the technical solution of the present invention, the basic principle of laser displacement testing is explained, which may include: a laser transmitter shoots a visible red laser through a lens toward the surface of the object to be measured, and the laser reflected by the object passes through the receiver lens and is received by the internal position detector (PSD). Depending on the distance, the PSD can "see" this light spot at different angles. Based on this angle and the known distance between the laser and the PSD, the digital signal processor can calculate the distance between the sensor and the object to be measured. At the same time, the position of the light beam at the receiving element is processed by analog and digital circuits, and analyzed by the microprocessor to calculate the corresponding output value, and output the standard data signal proportionally within the analog window set by the user. If a switch output is used, it is turned on within the set window and turned off outside the window.

[0067] S102: Perform test data fusion based on the first test data and the second test data to determine sample image data and corresponding displacement data;

[0068] Test data fusion can be performed in the following way: the first test data can be used as a fixed feature, the second test data as a variable feature, and then the two types of data are fused to obtain the features corresponding to each second test data. Finally, deep learning is performed based on this to realize displacement testing.

[0069] Optionally, in order to further improve data recognition efficiency and accuracy, the image data may be binarized or the background may be removed to highlight the features of the light spot.

[0070] S103: Based on the sample image data and the corresponding displacement data, optimize the pre-built deep learning image recognition model to obtain a displacement test model;

[0071] A convolutional neural network can be used to build an image deep learning image recognition model first, and then the sample image is used as the actual input and the corresponding displacement data as the expected output to optimize the pre-built deep learning image recognition model, so that displacement testing can be achieved.

[0072] S104 , acquiring real-time test data, and using the displacement test model to identify the real-time test data to obtain a laser displacement test result.

[0073] The present invention provides a laser displacement testing method, which optimizes a pre-built deep learning image recognition model based on sample image data and corresponding displacement data to obtain a displacement testing model, and then obtains real-time test data. After using the displacement testing model to identify the real-time test data, a laser displacement test result is obtained. Combining deep learning with laser displacement testing can effectively improve the accuracy and stability of displacement testing.

[0074] In an embodiment of the present invention, performing test data fusion based on the first test data and the second test data to determine sample image data and corresponding displacement data includes:

[0075] The test image in the second test data is taken out, and the pixel position corresponding to the light spot in the test image corresponding to any two adjacent positions is determined; the pixel position can refer to the center point of the light spot, or it can be the average of all positions of the pixel points where the light spot is located.

[0076] Based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions and the test distance, a new test image and a test distance corresponding to the new test image are generated using linear interpolation to generate new test data at all distances within the measurement limit;

[0077] For any second test data or any new test data, the test image is spliced with the test image in the first test data to obtain a spliced image, and the spliced image is used as sample image data, and the test distance in the second test data or the new test data is used as the corresponding displacement data.

[0078] In an embodiment of the present invention, extracting a test image from the second test data and determining pixel positions corresponding to light spots in the test image corresponding to any two adjacent positions includes:

[0079] Retrieving a test image from the second test data;

[0080] For any test image in the second test data, determining a target pixel point where a laser spot reflected by the surface of the object to be tested is located;

[0081] The pixel positions of the target pixels are averaged to obtain the pixel position corresponding to the light spot in the test image.

[0082] Optionally, in addition to the above method for obtaining pixel positions, other methods may be used to obtain pixel positions, for example, using the center point of the light spot as the pixel position, using any leftmost pixel as the pixel position, and so on.

[0083] In an embodiment of the present invention, based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions and the test distance, a new test image and a test distance corresponding to the new test image are generated using a linear interpolation method to generate new test data at all distances within the measurement range, including:

[0084] Determining the distance between the light spots in the test images corresponding to the two adjacent positions based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions;

[0085] Determining the actual distance corresponding to the test images corresponding to the two adjacent positions based on the actual test distance corresponding to the test images corresponding to the two adjacent positions;

[0086] Obtaining a distance ratio according to the actual distance and the spot distance; wherein the distance ratio is used to represent the pixel distance corresponding to the unit distance corresponding to the actual distance;

[0087] According to the distance ratio, the pixel distance change caused by moving the unit distance is determined;

[0088] Based on the test images corresponding to the two adjacent positions and the pixel distance change, the light spot in the test image is moved by a fixed distance to obtain a new test image, and the actual distance is modified by a unit distance to obtain a test distance corresponding to the new test image;

[0089] The test distances corresponding to the new test images are collectively used as new test data.

[0090] The embodiment of the present invention uses linear interpolation to generate a new test image and the test distance corresponding to the new test image to generate new test data at all distances within the measurement limit. By utilizing the characteristic that linear displacement causes linear feature changes, only a small amount of data can be collected to implement deep learning, simplifying the operation process and improving the accuracy of displacement testing.

[0091] In an embodiment of the present invention, based on the test images corresponding to the two adjacent positions and the pixel distance change, the light spot in the test image is moved by a fixed distance to obtain a new test image, and the actual distance is modified by a unit distance to obtain a test distance corresponding to the new test image, including:

[0092] For the test images corresponding to the two adjacent positions, the light spot corresponding to the test image corresponding to one position is used as the starting point, the light spot corresponding to the test image corresponding to the other position is used as the end point, and the light spot in the test image is moved by a fixed distance to obtain a new test image;

[0093] While moving the light spot, the actual distance corresponding to the starting point is modified by the unit distance to obtain the test distance corresponding to the new test image.

[0094] For example, when operating on a piece of test data, after the light spot is moved according to the pixel distance variation, the test distance corresponding to the test data is increased by a unit distance.

[0095] In the prior art, gradient descent is often used to optimize deep learning image recognition models. However, this can easily lead to inadequate optimization of model parameters, resulting in poor data recognition and, consequently, the inability to perform displacement testing properly. Therefore, an embodiment of the present invention provides an optimization algorithm for a deep learning image recognition model to improve the accuracy of displacement testing.

[0096] In an embodiment of the present invention, based on the sample image data and the corresponding displacement data, a pre-built deep learning image recognition model is optimized to obtain a displacement test model, including:

[0097] For a pre-built deep learning image recognition model, randomly initialize model parameters corresponding to the deep learning image recognition model, and form the model parameters into a vector to obtain a model parameter vector;

[0098] Based on the above-mentioned model parameter vector acquisition method, multiple different model parameter vectors are obtained to complete the generation of the initial solution;

[0099] In the current optimization process, the model parameter vector is subjected to local information exploration in random directions to obtain the model parameter vector after local information exploration;

[0100] For the model parameter vector after local information exploration, a probabilistic decision method is used to perform global information exploration on the model parameter vector in a random direction to obtain the model parameter vector after global information exploration;

[0101] For the model parameter vector after global information exploration, a multi-information interaction method is used to perform optimal information exploration on the model parameter vector to obtain the model parameter vector after optimal information exploration;

[0102] Determine whether the current number of optimizations has reached the maximum number of optimizations. If so, determine the final parameters of the deep learning image recognition model based on the model parameter vector after optimal information exploration to obtain the displacement test model. Otherwise, return to the local information exploration step.

[0103] In the embodiment of the present invention, local information exploration is performed on the model parameter vector in a random direction, and the model parameter vector obtained after local information exploration is:

[0104]

[0105] in, represents the i-th model parameter vector in the t-th optimization process, represents the i-th model parameter vector in the t+1-th optimization process, that is, the model parameter vector after the i-th local information exploration; i = 1, 2, ..., I, I represents the total number of model parameter vectors, In addition to the model parameter vector Other model parameter vectors except , rand1 represents a random number between (0,1), and π represents pi.

[0106] The local information exploration in random directions provided by the embodiments of the present invention can enable the model parameter vector to explore in random directions. At the same time, it combines the information contained in other model parameter vectors to avoid repeated exploration and effectively improve the exploration efficiency of the algorithm.

[0107] In this embodiment of the present invention, a probabilistic decision method is used to perform global information exploration on the model parameter vector after local information exploration. The model parameter vector after global information exploration is obtained as follows:

[0108] For each model parameter vector after global information exploration, its mutation probability is determined as:

[0109]

[0110] Among them, θ represents the mutation probability, Represents the fitness of the model parameter vector after the k-th global information exploration, represents the fitness corresponding to the optimal model parameter vector, and exp represents the exponential function with the natural constant e as the base;

[0111] Determine the number of mutations:

[0112] η t =INT(αcos(πt / T)*η t-1 )

[0113] Among them, η t represents the number of mutations during the t-th optimization process, η t-1 represents the number of mutations in the t-1th optimization process, INT represents the rounding function, α represents the attenuation factor, T represents the maximum number of optimizations, and π represents the circumference of a circle;

[0114] Arrange the model parameter vectors after global information exploration in descending order of fitness, and sort the first η t The model parameter vector is taken out as the target model parameter vector;

[0115] For the target model parameter vector, based on the mutation probability, the roulette wheel method is used for exploration:

[0116]

[0117] in, represents the mth target model parameter vector in the tth optimization process, represents the model parameter vector after the mth global information exploration, m=1,2,…,I, represents the model parameter vector obtained through Levy flight, rand2 represents a random number between (0,1), π represents pi, and || represents the absolute value.

[0118] The global information exploration provided by the embodiment of the present invention can provide more mutation probabilities in the early stage of the algorithm and gradually reduce the mutation probability in the later stage of the algorithm, which can effectively ensure the convergence speed of the algorithm, and globally explore the model parameter vectors in more concentrated positions, which can effectively avoid the defect of the existing technology that is prone to falling into local optimality.

[0119] In the embodiment of the present invention, for the model parameter vector after global information exploration, a multi-information interaction method is used to perform optimal information exploration on the model parameter vector, and the model parameter vector after optimal information exploration is obtained as follows:

[0120]

[0121] in, represents the model parameter vector after the nth global information exploration, Represents the model parameter vector after the nth optimal information exploration, rand3 represents a random number between (0,1), rand4 represents a random number between (0,1), represents the optimal model parameter vector, Represents the center of the model parameter vector.

[0122] The optimal information exploration provided by the embodiment of the present invention simultaneously learns the optimal model parameter vector and the center of the model parameter vector, which can effectively improve the algorithm exploration accuracy and efficiency. The center of the model parameter vector can be a vector composed of the average of each dimension of all model parameter vectors. When the algorithm reaches the later stage, it can be more conducive to finding the optimal position.

[0123] In an embodiment of the present invention, real-time test data is acquired and the displacement test model is used to identify the real-time test data to obtain a laser displacement test result, including:

[0124] Acquiring real-time test data; wherein the real-time test data is a real-time image reflected by the surface of the object being tested and captured by the area array image sensor;

[0125] The real-time test data is input into the displacement test model to obtain laser displacement test results.

[0126] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0127] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0128] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0130] Those skilled in the art will understand that all or part of the steps in implementing the above facts and methods can be completed by instructing relevant hardware through a program, and the program involved or the program can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: the corresponding method steps are then brought out, and the storage medium can be ROM / RAM, a disk, an optical disk, etc.

[0131] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A laser displacement testing method, characterized in that: include: Determining first test data between the laser emitter and the object under test and second test data after continuously moving the object under test; Wherein, the first test data and the second test data both include a test distance and a test image reflected by the surface of the object under test and captured by the area array image sensor; Performing test data fusion according to the first test data and the second test data to determine sample image data and corresponding displacement data; Based on the sample image data and the corresponding displacement data, the pre-built deep learning image recognition model is optimized to obtain the displacement test model; Acquiring real-time test data, and using the displacement test model to identify the real-time test data to obtain a laser displacement test result; Performing test data fusion according to the first test data and the second test data to determine sample image data and corresponding displacement data includes: Taking out the test image in the second test data, and determining the pixel positions corresponding to the light spots in the test image corresponding to any two adjacent positions; Based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions and the test distance, a new test image and a test distance corresponding to the new test image are generated using linear interpolation to generate new test data at all distances within the measurement limit; For any second test data or any new test data, stitching the test image with the test image in the first test data to obtain a stitched image, and using the stitched image as sample image data, and using the test distance in the second test data or the new test data as corresponding displacement data; Based on the sample image data and the corresponding displacement data, the pre-built deep learning image recognition model is optimized to obtain the displacement test model, including: For a pre-built deep learning image recognition model, randomly initialize model parameters corresponding to the deep learning image recognition model, and form the model parameters into a vector to obtain a model parameter vector; Based on the above-mentioned model parameter vector acquisition method, multiple different model parameter vectors are obtained to complete the generation of the initial solution; In the current optimization process, the model parameter vector is subjected to local information exploration in random directions to obtain the model parameter vector after local information exploration; For the model parameter vector after local information exploration, a probabilistic decision method is used to perform global information exploration on the model parameter vector in a random direction to obtain the model parameter vector after global information exploration; For the model parameter vector after global information exploration, a multi-information interaction method is used to perform optimal information exploration on the model parameter vector to obtain the model parameter vector after optimal information exploration; Determine whether the current number of optimizations has reached the maximum number of optimizations. If so, determine the final parameters of the deep learning image recognition model based on the model parameter vector after optimal information exploration to obtain the displacement test model. Otherwise, return to the local information exploration step.

2. The laser displacement testing method according to claim 1, characterized in that: Taking out the test image in the second test data and determining the pixel positions corresponding to the light spots in the test image corresponding to any two adjacent positions, including: Retrieving a test image from the second test data; For any test image in the second test data, determining a target pixel point where a laser spot reflected by the surface of the object to be tested is located; The pixel positions of the target pixels are averaged to obtain the pixel position corresponding to the light spot in the test image.

3. The laser displacement testing method according to claim 2, characterized in that: Based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions and the test distance, a new test image and the test distance corresponding to the new test image are generated using linear interpolation to generate new test data at all distances within the measurement limit, including: Determining the distance between the light spots in the test images corresponding to the two adjacent positions based on the pixel positions corresponding to the light spots in the test images corresponding to the two adjacent positions; Determining the actual distance corresponding to the test images corresponding to the two adjacent positions based on the actual test distance corresponding to the test images corresponding to the two adjacent positions; Obtaining a distance ratio according to the actual distance and the spot distance; wherein the distance ratio is used to represent the pixel distance corresponding to the unit distance corresponding to the actual distance; According to the distance ratio, the pixel distance change caused by moving the unit distance is determined; Based on the test images corresponding to the two adjacent positions and the pixel distance change, the light spot in the test image is moved by a fixed distance to obtain a new test image, and the actual distance is modified by a unit distance to obtain a test distance corresponding to the new test image; The test distances corresponding to the new test images are collectively used as new test data.

4. The laser displacement testing method according to claim 3, characterized in that: Based on the test images corresponding to the two adjacent positions and the pixel distance change, the light spot in the test image is moved by a fixed distance to obtain a new test image, and the actual distance is modified by a unit distance to obtain the test distance corresponding to the new test image, including: For the test images corresponding to the two adjacent positions, the light spot corresponding to the test image corresponding to one position is used as the starting point, the light spot corresponding to the test image corresponding to the other position is used as the end point, and the light spot in the test image is moved by a fixed distance to obtain a new test image; While moving the light spot, the actual distance corresponding to the starting point is modified by the unit distance to obtain the test distance corresponding to the new test image.

5. The laser displacement testing method according to claim 1, characterized in that: Perform local information exploration on the model parameter vector in random directions, and the model parameter vector after local information exploration is: in, represents the i-th model parameter vector in the t-th optimization process, represents the i-th model parameter vector in the t+1-th optimization process, that is, the model parameter vector after the i-th local information exploration; i = 1, 2, ..., I, I represents the total number of model parameter vectors, In addition to the model parameter vector Other model parameter vectors except , rand1 represents a random number between (0,1), and π represents pi.

6. The laser displacement testing method according to claim 5, characterized in that: For the model parameter vector after local information exploration, the probabilistic decision method is used to perform global information exploration on the model parameter vector in random directions. The model parameter vector after global information exploration is obtained as follows: For each model parameter vector after global information exploration, its mutation probability is determined as: Among them, θ represents the mutation probability, Represents the fitness of the model parameter vector after the k-th global information exploration, represents the fitness corresponding to the optimal model parameter vector, and exp represents the exponential function with the natural constant e as the base; Determine the number of mutations: or t =INT(αcos(πt / T)*η t-1 ) Among them, η t represents the number of mutations during the t-th optimization process, η t-1 represents the number of mutations in the t-1th optimization process, INT represents the rounding function, α represents the attenuation factor, T represents the maximum number of optimizations, and π represents the circumference of a circle; Arrange the model parameter vectors after global information exploration in descending order of fitness, and sort the first η t The model parameter vector is taken out as the target model parameter vector; For the target model parameter vector, based on the mutation probability, the roulette wheel method is used for exploration: in, represents the mth target model parameter vector in the tth optimization process, represents the model parameter vector after the mth global information exploration, m=1,2,…,I, represents the model parameter vector obtained through Levy flight, rand2 represents a random number between (0,1), π represents pi, and || represents the absolute value.

7. The laser displacement testing method according to claim 6, characterized in that: For the model parameter vector after global information exploration, the multi-information interaction method is used to perform optimal information exploration on the model parameter vector. The model parameter vector after optimal information exploration is obtained as follows: in, represents the model parameter vector after the nth global information exploration, Represents the model parameter vector after the nth optimal information exploration, rand3 represents a random number between (0,1), rand4 represents a random number between (0,1), represents the optimal model parameter vector, Represents the center of the model parameter vector.

8. The laser displacement testing method according to claim 1, characterized in that: After acquiring real-time test data and identifying the real-time test data using the displacement test model, a laser displacement test result is obtained, including: Acquiring real-time test data; wherein the real-time test data is a real-time image reflected by the surface of the object being tested and captured by the area array image sensor; The real-time test data is input into the displacement test model to obtain laser displacement test results.

Citation Information

Patent Citations

  • Combining physical modeling with machine learning

    CN114930117A

  • Automobile body part information identification method based on machine vision and deep learning

    CN117952895A