Parallel laser spot center extraction method and system based on information entropy combination model
By combining the information entropy combination model with spot ellipse fitting and gray-scale centroid method, the center coordinates of the spot are corrected, which solves the positioning error problem caused by the asymmetric divergence of the laser beam and improves the accuracy of crack width measurement.
Patent Information
- Application Number
- CN202310424962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-04-20
AI Technical Summary
In high-precision crack width detection, asymmetrical divergence of the laser beam leads to errors in the positioning accuracy of the spot center, affecting the measurement accuracy.
An information entropy combination model is adopted, which combines spot ellipse fitting and gray-scale centroid method. The coordinates of the spot center are corrected by weighting and calibrating the relative error entropy value of the spot center.
It effectively reduces the positioning accuracy error of the spot center, improves the accuracy of crack width measurement, and achieves high-precision crack width measurement.
Smart Images

Figure CN116630235B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of high-precision detection technology for analysis width, and more specifically to a method and system for extracting the center of a parallel laser spot based on an information entropy combination model. Background Technology
[0002] In high-precision crack width detection, the camera, as a high-precision measurement tool, requires an accurate object distance. However, in actual high-precision measurements, the object distance may change with the shape of the target, thus affecting the measurement accuracy. Image processing combined with parallel laser crack detection eliminates the need for information such as shooting distance, focal length, and CCD / CMOS area; the measurement process only requires capturing a single image to achieve high-precision crack width measurement.
[0003] However, when using the laser spot center distance as the measurement reference, if the laser beam diverges asymmetrically, the spot center obtained through image processing will deviate, introducing a certain error. Reducing the positioning accuracy error of the spot center is a crucial issue in improving the accuracy of crack width measurement. Summary of the Invention
[0004] This application addresses the shortcomings of existing technologies by providing a method and system for extracting the center of a parallel laser spot based on an information entropy combination model. This application simultaneously locates the spot center using both fitting the spot ellipse and the gray-scale centroid method. Then, it combines the two positioning data based on information entropy to improve the positioning accuracy of the spot center and enhance the accuracy of crack width measurement. The specific technical solution adopted in this application is as follows.
[0005] First, to achieve the above objectives, a method for extracting the center of a parallel laser spot based on an information entropy combination model is proposed. The steps include: fitting an ellipse to the laser spot image and calculating the coordinates of the ellipse center (x, y). i0 ,y i0 ), semi-shaft A i Short half-shaft B i and the major axis inclination angle θ i Then, based on the error between the fitted data of different light spots and the original data of the light spot edge, the elliptical parameters of the laser light spot are recalculated; the center coordinates (x0, y0) of the light spot image are calculated using the gray-level centroid method based on the laser light spot image; then, the relative error of the light spot center obtained by the two methods is normalized to obtain the relative error entropy value h. m According to the relative error entropy value h m Determine the weighting coefficients l corresponding to the two methods respectively. m (m=1,2), and then the calculated spot center is corrected according to the weighting coefficients as follows:
[0006] Optionally, in any of the parallel laser spot center extraction methods based on the information entropy combination model described above, the objective function for fitting the laser spot as an ellipse based on the laser spot image is: ... The minimum value is used to calculate the coordinates (x, y) of the center of the ellipse corresponding to the laser spot. i0 ,y i0 )for Long half shaft short half shaft Major axis tilt angle
[0007] Optionally, in any of the parallel laser spot center extraction methods based on the information entropy combination model described above, the specific steps for recalculating the elliptical parameters of the laser spot based on the error between the fitted data and the original data of the spot edge during the ellipse fitting process of the laser spot image include: calculating the mean of the sum of squared errors corresponding to each fitted ellipse data and the original data of the spot edge, respectively. Find the fitted ellipse data that minimizes the MSE. Then, based on the fitted ellipse data that minimizes MSE, the ellipse parameters of the remaining laser spot are recalculated; where y ij and These represent the fitted ellipse data and the original data corresponding to the edge of the light spot, respectively.
[0008] Optionally, in any of the parallel laser spot center extraction methods based on the information entropy combination model described above, the gray-level centroid position coordinates (x0, y0) of the spot image are calculated using the gray-level centroid method according to the following formula. The image pixel size is M pixels × N pixels, and the gray value at pixel (i,j) is represented as I(i,j).
[0009] Optionally, in any of the parallel laser spot center extraction methods based on the information entropy combination model described above, the specific steps for normalizing the relative error of the spot center obtained by the two methods to obtain the relative error entropy value include: m=1 and m=2 respectively representing the methods of obtaining the elliptic parameters of the laser spot by fitting the laser spot image and obtaining the coordinates of the spot center by calculating the gray-level centroid method from the laser spot image, and calculating the error of the spot center calculated by the two methods m=1 and m=2 respectively. The error e between the two methods of calculating the spot center im Normalize to obtain Calculate the relative error entropy value corresponding to the m-th method. Where k≥0 is a constant.
[0010] Optionally, the parallel laser spot center extraction method based on the information entropy combination model as described above, wherein, according to the relative error entropy value h m The weighting coefficients corresponding to the two methods are determined as follows:
[0011] Optionally, as described in any of the above-mentioned parallel laser spot center extraction methods based on the information entropy combination model, the laser spot is formed by at least three microlasers arranged in parallel and projected at mutually parallel angles.
[0012] To achieve the above objectives, this application also provides a system based on any of the parallel laser spot center extraction methods described above, comprising: a parallel laser, wherein several miniature lasers are arranged in parallel to project a laser spot; a camera for acquiring an image of the laser spot formed by the parallel laser; and an image processing unit that simultaneously performs ellipse fitting on the laser spot image and calculates the coordinates of the ellipse center (x, y). i0 ,y i0 ), semi-shaft A i Short half-shaft B i and the major axis inclination angle θ i Then, based on the error between the fitted data of different light spots and the original data of the light spot edge, the ellipse parameters of the laser light spot are recalculated; and the center coordinates (x0, y0) of the light spot image are calculated using the gray-level centroid method based on the laser light spot image; then, the relative error of the light spot center obtained by the two methods is normalized to obtain the relative error entropy value h. m According to the relative error entropy value h m Determine the weighting coefficients l corresponding to the two methods respectively. m (m=1,2), and then the calculated spot center is corrected according to the weighting coefficients as follows:
[0013] Optionally, in any of the systems described above, the microlaser comprises at least three with mutually parallel projection angles.
[0014] Beneficial effects
[0015] The parallel laser spot center extraction method and system provided in this application, based on an information entropy combination model, obtains the elliptical parameters of the laser spot by elliptical fitting to the laser spot image. It then calculates the center coordinates of the spot image using a gray-scale centroid method. Finally, it comprehensively utilizes both methods to determine the weighting coefficients of the elliptical parameters obtained through different methods based on the relative error entropy value, thereby correcting the previously calculated spot center. Therefore, this application can effectively correct the offset caused by asymmetrical divergence of the laser beam, reduce the positioning accuracy error of the spot center, and thus effectively improve the measurement accuracy when detecting laser crack width. This application combines image processing technology with parallel laser crack detection, enabling high-precision measurement of crack width directly through images and an information entropy-based combination calibration model, even with unknown shooting distance, focal length, and CCD / CMOS area.
[0016] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing this application. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the present application and form part of the specification. Together with the embodiments of the present application, they serve to explain the present application but do not constitute a limitation thereof. In the drawings:
[0018] Figure 1 This is a schematic diagram of the parallel laser used in the system of this application;
[0019] Figure 2 yes Figure 1 The image shown is a schematic diagram of the laser spot formed by the projection of a parallel laser. Detailed Implementation
[0020] To make the objectives and technical solutions of the embodiments of this application clearer, 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, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the described embodiments of this application without creative effort are within the scope of protection of this application.
[0021] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0022] Figure 1 A parallel laser used in the system according to this application includes at least three miniature lasers with parallel projection angles. Each parallel laser in the parallel laser has several miniature lasers arranged side by side for projecting laser beams.
[0023] The system of this application sets up a camera along the direction of the parallel laser beam projection to capture an image of the laser spot formed by the parallel laser beam. The image processing unit then processes this laser spot image, performs ellipse fitting on the laser spot based on the image, and calculates the coordinates of the ellipse center (x, y). i0 ,y i0 ), semi-shaft A i Short half-shaft B i and the major axis inclination angle θ i Then, based on the error between the fitted data of different light spots and the original data of the light spot edge, the ellipse parameters of the laser light spot are recalculated; simultaneously, the center coordinates (x0, y0) of the light spot image are calculated using the gray-scale centroid method based on the laser spot image; then, the relative error of the light spot center obtained by the two methods is normalized to obtain the relative error entropy value h. m According to the relative error entropy value h m Determine the weighting coefficients l corresponding to the two methods respectively. m (m=1,2), and then the calculated spot center is corrected according to the weighting coefficients as follows: This allows for more accurate determination of the center coordinates of the light spot, enabling precise measurement of the width of the crack where the light spot is located.
[0024] Specifically, when locating the center of the light spot based on ellipse fitting, this application can use... Figure 1 The diagram shows a parallel laser consisting of three miniature lasers arranged side-by-side. An image processing unit performs elliptical fitting on the three parallel laser spots. The specific fitting process is as follows:
[0025] Suppose the parametric equation of the ellipse is:
[0026] ax 2 +bxy+cy 2 +dx+ey+1=0
[0027] In the above equation, a, b, c, d, and e are coefficients of the parametric equation. Let p... ij (x ij ,y ij (i = 1, 2, 3; j = 1, 2, ..., N; N ≥ 5) represents the j-th measurement point on the contour of ellipse i. To improve the accuracy of the calculation results, the number of measurement points N can be as large as possible. Based on the least squares principle, the fitted objective function is:
[0028]
[0029] Using the extreme value theorem to make the objective function f i (a i ,b i ,c i ,d i ,e i To minimize ) we can obtain:
[0030]
[0031] Solving the above system of linear equations yields a i ,b i ,c i ,d i ,e i The value of . Based on the geometric principles of ellipses, the coordinates of the ellipse center (x, y) can be further calculated. i0 ,y i0 ), semi-shaft A i Short half-shaft B i and the major axis inclination angle θ i :
[0032]
[0033]
[0034]
[0035]
[0036]
[0037] After fitting the three ellipses corresponding to the three light spots, the pixel center distance P of the ellipses is calculated. 13 =P 12 +P 23 The actual pixel size is:
[0038]
[0039] Assuming the three laser beams are ideally parallel and illuminate the same plane, then due to the low short-range divergence of lasers, the major and minor axes, as well as the tilt angle of the major axis, of the fitted ellipse on the plane should be the same for all three laser beams. Figure 2 Show.
[0040] However, in reality, due to factors such as laser divergence and changes in the light on the irradiated surface, the A values of the three ellipses fitted above will be affected. i B i θ iThe specific parameters differ. To address this issue, this application employs the following method to correct the fitted ellipse, thereby reducing the error caused by ellipse fitting in locating the spot center.
[0041] The mean of the sum of squared errors corresponding to the data of each point of the three fitted ellipses and the original data of the light spot edge is calculated using the following formula:
[0042]
[0043] From the calculation results, find the ellipse with the smallest MSE among the three ellipses, and set it as m. Then set:
[0044]
[0045] Because A m B m θ m Given that, for the two ellipses outside of m, it is only necessary to recalculate a. i ,b i ,c i ,d i ,e i Only two parameters are needed.
[0046] In addition to using the above-mentioned method to locate the center of the laser spot based on ellipse fitting, this application further adopts a method based on gray-scale centroid to locate the center of the laser projection spot.
[0047] The steps for calculating the center coordinates of a laser spot image using the gray-level centroid method can be specifically as follows:
[0048] Ellipse-fit-based spot localization methods are suitable for targets with relatively clear spot image edges. In practical applications, the edges of the spot image may contain a lot of noise. In this case, parallel processing can be performed by combining methods such as the gray-level centroid method. Assume an image of size M pixels × N pixels, with a gray value of I(i,j) at pixel (i,j), and the center coordinates of the target pattern being (x0,y0). The principle of the gray-level centroid method is:
[0049]
[0050] The grayscale centroid method is simple to calculate, relatively fast, and generally has a positioning accuracy within one pixel, making it suitable for applications requiring high precision and real-time performance. Since all pixels of the light spot participate in the calculation, it is less affected by single-point noise. However, the grayscale centroid method can only handle cases where the target pattern shape is relatively regular and the grayscale distribution is relatively uniform and symmetrical.
[0051] Therefore, this application can combine the center positioning obtained by the above two methods through information entropy to further improve the positioning accuracy of the laser spot.
[0052] Information entropy is a key concept in Shannon's information theory, used to measure the "uncertainty" or information content of a random event. Information content is a central concept in information theory, the fundamental starting point for measuring information, and it views acquired information as a factor used to eliminate uncertainty. Therefore, the amount of information can be represented by the magnitude of the eliminated uncertainty, while the magnitude of uncertainty in a random event can be described by its probability distribution.
[0053] The spot center localization method based on the information entropy combination method can be implemented using the following steps:
[0054] First, the weighting coefficient for locating the center of the light spot is determined using the information entropy combination method.
[0055] Let there be three light spot centers (x) i0 ,y i0 For i = 1, 2, 3, the ellipse fitting method and the gray-scale centroid method described above are used to locate the center of the light spot, respectively. Let the calculated value of the center of the i-th light spot by the m-th method be (x... im ,y im ), let e im Let e be the error in the calculation of the center of the i-th spot using the m-th method. im as follows:
[0056]
[0057] The relative errors of the two spot center calculation methods are normalized as follows:
[0058]
[0059] have:
[0060] The relative error entropy value h of the m-th spot calculation method m as follows:
[0061]
[0062] Where k≥0 is a constant.
[0063] Weighting coefficient l of the two calculation methods m (m=1,2) are as follows:
[0064]
[0065] The final corrections to the spot center coordinates obtained by the weighted combination method are as follows:
[0066]
[0067] The above are merely embodiments of this application, and their descriptions are quite specific and detailed, but they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application.
Claims
1. A method for extracting the center of a parallel laser spot based on an information entropy combination model, characterized in that the steps include... include: Based on the laser spot image, an ellipse is fitted to the laser spot, and the coordinates of the ellipse center (x, y, y) are calculated. i0 ,y i0 ), semi-shaft A i Short half-shaft B i and the major axis inclination angle θ i Then, based on the error between the fitted data between different light spots and the original data of the light spot edge, the ellipse parameters of the laser light spot are recalculated to obtain the ellipse parameters of the laser light spot. The center coordinates (x0, y0) of the laser spot image are calculated using the gray-scale centroid method. Then, the relative errors of the spot centers calculated by the two methods are normalized to obtain the relative error entropy value h. m According to the relative error entropy value h m Determine the weighting coefficients l corresponding to the two methods respectively. m Then, the calculated spot center is corrected according to the weighting coefficients as follows: Suppose the parametric equation of the ellipse is: ax 2 +bxy+cy 2 +dx+ey+1=0 In the above equation, a, b, c, d, and e are coefficients of the parametric equation. Let p... ij (x ij ,y ij ), i = 1, 2, 3; j = 1, 2, ..., N; N≥5 represents the j-th measurement point on the i-th contour of the ellipse. Based on the least squares principle, the fitted objective function is: Using the extreme value theorem to make the objective function f i (a i ,b i ,c i ,d i ,e i To minimize ), we can obtain: Solving the above system of linear equations yields a i ,b i ,c i ,d i ,e i The value; Therefore, the coordinates (x, y) of the center of the ellipse corresponding to the laser spot can be calculated. i0 ,y i0 )for Long half shaft short half shaft Major axis tilt angle The specific steps involved in ellipse fitting of the laser spot based on the laser spot image, and recalculating the ellipse parameters of the laser spot according to the error between the fitted data and the original data of the spot edge, include: Calculate the mean of the sum of squared errors for each fitted ellipse data and the original data of the light spot edge. Find the fitted ellipse data that minimizes the MSE. Then, based on the fitted ellipse data that minimizes MSE, the ellipse parameters of the remaining laser spot are recalculated. Among them, y ij and Let x and y represent the fitted ellipse data and the original data corresponding to the edge of the light spot, respectively. In calculating the center coordinates (x0, y0) of the light spot image using the gray-level centroid method, the gray-level centroid coordinates (x0, y0) are calculated according to the following formula. The image pixel size is M pixels × N pixels, and the gray value at pixel (i,j) is represented as I(i,j). The specific steps to normalize the relative error of the spot center obtained by the two methods and obtain the relative error entropy value include: m=1 and m=2 represent the methods of obtaining the elliptic parameters of the laser spot by fitting the laser spot image and obtaining the center coordinates of the spot by calculating the gray-scale centroid method from the laser spot image, respectively. The errors of the calculated center values of the spot obtained by the two methods are calculated for m=1 and m=2, respectively. The error e between the two methods of calculating the spot center im Normalize to obtain Calculate the relative error entropy value corresponding to the m-th method. Where k≥0 is a constant; Based on the relative error entropy value h m The weighting coefficients corresponding to the two methods are determined as follows:
2. The method for extracting the center of a parallel laser spot based on an information entropy combination model as described in claim 1, characterized in that, The laser spot is formed by at least three microlasers arranged side by side and projected at mutually parallel angles.
3. A system based on the parallel laser spot center extraction method of claim 1, characterized in that, include: A parallel laser, which has several miniature lasers arranged side by side to project laser beams; A camera used to capture images of the laser spot projected by a parallel laser. The image processing unit simultaneously performs ellipse fitting on the laser spot based on the laser spot image and calculates the coordinates of the ellipse center (x, y). i0 ,y i0 ), semi-shaft A i Short half-shaft B i and the major axis inclination angle θ i Then, based on the error between the fitted data of different light spots and the original data of the light spot edge, the ellipse parameters of the laser light spot are recalculated; and the center coordinates (x0, y0) of the light spot image are calculated using the gray-level centroid method based on the laser light spot image; then, the relative error of the light spot center obtained by the two methods is normalized to obtain the relative error entropy value h. m According to the relative error entropy value h m Determine the weighting coefficients l corresponding to the two methods respectively. m Then, the calculated spot center is corrected according to the weighting coefficients as follows:
4. The system as described in claim 3, characterized in that, The microlaser comprises at least three lasers with parallel projection angles.