A method for obtaining line laser performance parameters and a performance parameter testing system at different temperatures
By analyzing laser bar images and Gaussian curve fitting, combined with the high and low temperature chamber simulation environment, the problems of large errors and complicated equipment setup in existing laser performance tests were solved, and high-precision and fast laser performance parameter testing was achieved.
Patent Information
- Application Number
- CN202310626410.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-05-30
AI Technical Summary
Existing laser performance parameter testing methods have problems such as large measurement error, cumbersome equipment setup, and single test indicators, and cannot meet the requirements of high-precision performance testing.
By analyzing the laser bar image and using Gaussian curve fitting to calculate the laser's performance parameters, including peak grayscale, line width, and Gaussian fitting, combined with high and low temperature chambers to simulate different temperature environments, the full temperature range test of the laser's performance can be achieved.
It achieves high-precision and fast testing of laser performance parameters, reduces equipment setup time, and can monitor multiple performance parameters across the entire temperature range to ensure measurement accuracy.
Smart Images

Figure CN116558784B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of line laser testing, and in particular to a method for acquiring performance parameters of a line laser and a performance parameter testing system at different temperatures. Background Art
[0002] Lasers are a common optical component used in structured light vision sensors in the field of machine vision. The laser light generated by a semiconductor laser is converted into structured light by a cylindrical mirror and projected onto the measured area to form a laser strip. The area array camera receives the scattered light, thereby obtaining the interface shape or contour of the covered area on the surface. Most lasers have good optical performance parameters at room temperature, such as peak grayscale, optical power instability, laser strip line width, and Gaussian fit. However, when the sensor is used in harsh environments such as outdoor or semi-outdoor environments, some lasers may experience a decrease in peak grayscale, a sharp drop in Gaussian fit, and large fluctuations in line width. This will have a significant impact on the sensor's measurement accuracy. Therefore, it is necessary to conduct quality inspection or screening of laser performance at different temperatures to prevent the use of lasers with unstable performance.
[0003] The current mainstream method for detecting laser performance parameters relies on photodetectors (detection equipment), but it has the following problems:
[0004] 1. It indirectly evaluates the stability of the laser's output power by monitoring the conversion of optical signals into electrical signals. However, the relationship between the current and output power of semiconductor lasers at high and low temperatures is not absolutely linear, so there are errors in the measurement results, which cannot meet the requirements of high-precision performance testing.
[0005] 2. This method often requires building an amplifier circuit to amplify or convert the weak electrical signal into a voltage signal (see Section 2.2 of the article "Design of a High-Sensitivity Power Detection System for Pulsed Lasers"). The stability of the optical power is indirectly evaluated by detecting current changes with an oscilloscope. Furthermore, the corresponding tooling needs to be designed based on the actual working distance of the laser, making the equipment setup cumbersome and inefficient.
[0006] 3. This method has a single test performance and can only indirectly evaluate the optical power. It cannot simultaneously test other indicators such as line width and Gaussian fit.
[0007] Patent document CN114034246A discloses a laser light plane calibration system and method, which uses multiple cameras to capture laser bar images and fit the light plane at different temperatures. As a calibration method, this scheme aims to obtain the light plane equation at different temperatures to facilitate the subsequent direct call of the light plane; it does not test the laser performance parameters and cannot evaluate the performance of the laser. Summary of the Invention
[0008] In order to solve the above technical problems, the present invention provides a method for testing the performance parameters of a line laser. This system does not rely on detection equipment, but instead calculates the laser performance parameters by analyzing the laser bar image, with high accuracy and high speed.
[0009] The line laser performance parameter test system at different temperatures can test the laser performance parameter indicators (peak grayscale, optical power instability, line width value, Gaussian fit) within the entire temperature range; it has the characteristics of low cost, easy to build and short time consumption.
[0010] The technical solution is as follows:
[0011] A method for obtaining performance parameters of a line laser comprises the following steps:
[0012] S1, the camera collects the laser bar image; extracts the gray value of each pixel in the entire image;
[0013] S2. Sample S pixels on the laser stripe image and record them as sampling positions; 1≤S≤N, where N is the total number of pixels in the laser stripe along its extension direction;
[0014] Calculate the angles between the laser bar and the X-axis and Y-axis of the image coordinate system respectively, and record the coordinate axis with the larger angle as the characteristic axis; record the direction perpendicular to the extension direction of the laser bar as direction A;
[0015] At a single sampling position, draw a straight line A along direction A, where the line width of the straight line A is 1 to 5 pixels. Mark each pixel point on the straight line A in the image, and extract the grayscale values of these pixel points and their coordinate components in the direction of the characteristic axis. If there are multiple identical coordinate components among the extracted coordinate components, take the average of the grayscale values corresponding to the identical coordinate components, store the average value in correspondence with the coordinate component, store each coordinate component in one-to-one correspondence with the grayscale value / grayscale mean, and sort the coordinate components in order from largest to smallest or from smallest to largest to form a grayscale distribution sequence.
[0016] Perform the same processing at S sampling points to obtain S grayscale distribution sequences;
[0017] S3. Fitting Gaussian curves using each grayscale distribution sequence, calculating and storing performance parameters of the line laser based on the Gaussian curves.
[0018] Furthermore, the performance parameters of the line laser include one or more of peak grayscale, line width, and Gaussian fit;
[0019] The performance parameters of the line laser are calculated based on the Gaussian curve as follows:
[0020] Store the grayscale value of the peak point of each Gaussian curve respectively;
[0021] Peak grayscale: take the average of the grayscale values of each peak point as the peak grayscale;
[0022] Line width value: Find the maximum grayscale value among the grayscale values of each peak point, record the corresponding Gaussian curve as the characteristic curve, divide the maximum grayscale value by 2 or the square of the natural constant e to obtain the calculation result, find two positions in the characteristic curve whose grayscale values are equal to the calculated value, multiply the pixel difference between the two positions by the pixel size of the camera, and use the product value as the line width value of the laser bar;
[0023] Gaussian fitting: Calculate the coefficient of determination R using the points on each Gaussian curve and their corresponding grayscale distribution sequence 2 , multiple coefficients of determination R 2 The mean is taken as the Gaussian fit.
[0024] The Gaussian fit represents the degree of similarity between a single grayscale distribution sequence and the Gaussian curve.
[0025] Furthermore, the performance parameters are used to determine whether the performance of the line laser meets the standards: the performance parameters obtained in step S3 are compared with the nominal standard performance parameters of the line laser to obtain differences. When all differences are less than a preset threshold, it is considered that the performance of the line laser meets the standards; otherwise, it is considered that the performance of the line laser does not meet the standards.
[0026] Preferably, the sampling is equidistant sampling; 3≤S≤20;
[0027] Preferably, the angle between the laser bar in the image and the X-axis / Y-axis of the image coordinate system is less than 20°, and the direction of the other coordinate axis is recorded as direction A;
[0028] Preferably, in step S1, the image is preprocessed as follows: gray values with gray values less than a preset value are set to zero, and the preset value is
[0029] The present invention also discloses a line laser performance parameter testing system at different temperatures, comprising a high and low temperature box, a controller and a camera;
[0030] The laser to be tested is installed inside the high and low temperature box. The high and low temperature box is used to adjust different temperatures within a preset temperature range. A light-transmitting hole is provided at the front end of the box. The laser projects a laser bar outward through the light-transmitting hole.
[0031] The camera is installed outside the high and low temperature box. When the high and low temperature box is set to a certain temperature and left to stand for a preset time, the camera captures the laser bar image and sends the image to the controller.
[0032] The controller includes an image processing module and an information storage module;
[0033] The image processing module is used to receive an image and perform the following processing:
[0034] Extract the grayscale value of each pixel in the entire image;
[0035] On the laser bar in the image, S pixels are sampled and recorded as sampling position points; 1≤S≤N, where N is the total number of pixels in the laser bar along its extension direction;
[0036] The direction perpendicular to the extension direction of the laser bar is recorded as direction A;
[0037] Calculate the angles between the laser bar and the X-axis and Y-axis of the image coordinate system respectively, and record the coordinate axis with the larger angle as the characteristic axis;
[0038] At a single sampling position, draw a straight line A along direction A, where the line width of the straight line A is 1 to 5 pixels. Mark each pixel point on the straight line A in the image, and extract the grayscale values of these pixel points and their coordinate components in the direction of the characteristic axis. If there are multiple identical coordinate components among the extracted coordinate components, take the average of the grayscale values corresponding to the identical coordinate components, store the average value in correspondence with the coordinate component, store each coordinate component in one-to-one correspondence with the grayscale value / grayscale mean, and sort the coordinate components in order from large to small or from small to large to form a grayscale distribution sequence.
[0039] Perform the same processing at S sampling points to obtain S grayscale distribution sequences;
[0040] Gaussian curves are fitted using each grayscale distribution sequence, and performance parameters of the line laser at the current temperature value are calculated based on the Gaussian curves and stored in the information storage module; the high and low temperature box is set to a temperature according to preset conditions, and at different temperatures, the line laser projects a laser bar, and the camera captures the laser bar image; the image processing module receives the laser bar image and processes it to obtain the performance parameters of the line laser;
[0041] The information storage module stores the performance parameters at different temperatures. Further, the performance parameters of the line laser include one or more of peak grayscale, line width value, and Gaussian fit;
[0042] The performance parameters of the laser at the current temperature are calculated based on the Gaussian curve as follows:
[0043] Store the grayscale value of the peak point of each Gaussian curve respectively;
[0044] Peak grayscale: take the average of the grayscale values of each peak point as the peak grayscale;
[0045] Line width value: Find the maximum grayscale value among the grayscale values of each peak point, record the corresponding Gaussian curve as the characteristic curve, divide the maximum grayscale value by 2 or the square of the natural constant e to obtain the calculation result, find two positions in the characteristic curve whose grayscale values are equal to the calculated value, multiply the pixel difference between the two positions by the pixel size of the camera, and use the product value as the line width value of the laser bar;
[0046] Gaussian fitting: Calculate the coefficient of determination R using the points on each Gaussian curve and their corresponding grayscale distribution sequence 2 , multiple coefficients of determination R 2 The mean is taken as the Gaussian fit.
[0047] Furthermore, by using method 1 or method 2, the performance parameters stored at different temperatures are used to determine whether the line laser performance meets the standards:
[0048] Method 1:
[0049] The optical power instability of a line laser is calculated using the peak grayscale as follows:
[0050] Calculate the difference between the maximum and minimum values of the laser peak grayscale at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as optical power instability;
[0051] Alternatively, the peak grayscale at other temperatures is subtracted from and summed with the peak grayscale at the reference temperature; the difference is divided by the sum, and the result is recorded as the optical power instability;
[0052] The reference temperature is one of all the adjustment temperatures;
[0053] The line width value is used to calculate the instability of the line width value of the line laser as follows:
[0054] Calculate the difference between the maximum and minimum line width values at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as the instability of the line width value;
[0055] Alternatively, the line width values at other temperatures are subtracted from and summed with the line width value at the reference temperature; the difference is divided by the sum, and the result is recorded as the instability of the line width value;
[0056] The Gaussian fit is used to calculate the instability of the Gaussian fit of the line laser as follows:
[0057] The difference between the maximum and minimum values of the Gaussian fit at different temperatures is calculated, and the difference is divided by the sum of the maximum and minimum values. The result is recorded as the instability of the Gaussian fit.
[0058] Alternatively, the Gaussian fit at other temperatures is subtracted from and summed with the Gaussian fit at the reference temperature; the difference is divided by the sum, and the result is recorded as the instability of the Gaussian fit;
[0059] If any of the optical power instability, line width instability, and Gaussian fit instability is greater than a preset tolerance, the line laser performance is considered to be substandard;
[0060] Method 2:
[0061] The peak grayscale, line width, and Gaussian fit are judged according to the following method. If any one of them is judged as not meeting the standard, the line laser performance is considered to be substandard.
[0062] The peak grayscale is judged as follows:
[0063] Calculate the difference between the maximum and minimum values of the laser peak grayscale at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as optical power instability;
[0064] Alternatively, the peak grayscale at other temperatures is subtracted from and summed with the peak grayscale at the reference temperature; the difference is divided by the sum, and the result is recorded as the optical power instability; the reference temperature is one of all the adjustment temperatures;
[0065] When the calculated optical power instability is less than the preset tolerance value, the optical power performance of the line laser is considered to meet the standard, otherwise, it does not meet the standard;
[0066] The following judgments are made on the line width value:
[0067] Compare the line width values obtained at different temperatures with the nominal standard line width value of the line laser to obtain the difference. When the difference is less than the preset threshold, it is considered that the line width performance of the line laser meets the standard; otherwise, it does not meet the standard.
[0068] The following judgments are made on the Gaussian fit:
[0069] It is determined whether the Gaussian fits obtained at different temperatures are all greater than the standard Gaussian fit values. If so, it is considered that the Gaussian fit performance of the line laser meets the standard; otherwise, it does not meet the standard.
[0070] Preferably, the high and low temperature box increases / decreases the step size in a preset temperature range in a preset step size to adjust to each preset temperature;
[0071] The temperature interval is set according to the temperature range in which the laser is actually used, and the preset step size is 1°C to 10°C;
[0072] Preferably, a protective glass is provided at the light-transmitting hole; and the standing time is 15 minutes to 180 minutes.
[0073] Preferably, the sampling is equidistant sampling; 3≤S≤20.
[0074] Preferably, the grayscale value less than the preset value is set to zero, and the preset value is
[0075] Preferably, the angle between the laser bar and the X-axis / Y-axis of the image coordinate system is less than 20°, and the direction of the other coordinate axis is recorded as direction A.
[0076] Furthermore, the camera can capture laser bar images in two ways:
[0077] Method A: A flat plate is fixed outside the high and low temperature chamber, the laser bar is projected onto the flat plate, a camera is installed in front of the flat plate to capture the image of the laser bar on the flat plate, and a filter is provided at the front end of the camera lens;
[0078] Mode B: The camera is installed in front of the light-transmitting through hole. The camera does not include a lens and has an attenuation plate at its front end. The laser bar is directly projected onto the camera, and the camera collects the laser bar image.
[0079] The technical solution of the present invention has the following characteristics:
[0080] ① The traditional method relies on detection equipment to detect laser performance parameters. It is necessary to prepare an oscilloscope or multimeter to test the voltage / current at both ends of the resistor next to the diode under the premise of having test tooling. The environment establishment and testing process takes about 1 hour. With the method and system of the present invention, the test environment establishment only requires connecting a camera for image acquisition, which greatly reduces the investment time. It is conservatively estimated that more than 70% of the test equipment establishment time can be saved.
[0081] ② The method for obtaining line laser performance parameters proposed in the present invention has accurate and rapid calculations and can be used to detect laser performance parameters at a specific temperature, facilitating equipment selection. It can also be used to detect laser performance parameters after being put into use, such as the performance parameters of a laser after three years of use, to facilitate assessment of whether the laser has aged and is unsuitable for continued use.
[0082] ③ The line laser performance parameter system at different temperatures proposed in the present invention: uses a high and low temperature chamber to simulate various ambient temperatures of the laser, combines with a camera to capture the laser bar, and obtains the Gaussian curve on the longitudinal section of the laser bar by analyzing the image. The performance parameters of the line laser are obtained through Gaussian curve analysis, realizing the monitoring of multiple performance parameters of the laser (peak grayscale, optical power instability, line width value, Gaussian fit) in the entire temperature range; it can assist technicians in selecting lasers, avoid putting lasers with performance fluctuations exceeding specifications into field use, and ensure the measurement accuracy of subsequent measurement processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 Schematic diagram of grayscale distribution sequence when S=3 in Example 1;
[0084] Figure 2 Schematic diagram of the structure of the line laser performance parameter test system at different temperatures in Example 2;
[0085] Figure 3 The laser bar image captured by the camera in Example 2;
[0086] Figure 4 This is a schematic diagram of taking the average of the grayscale values corresponding to the same coordinates when there are multiple identical coordinates in Example 2;
[0087] Figure 5 Schematic diagram of data distribution in a single grayscale distribution sequence in Example 2;
[0088] Figure 6 Schematic diagram of the Gaussian curve fitted using data in a single grayscale distribution sequence in Example 2. DETAILED DESCRIPTION
[0089] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0090] Example 1
[0091] This embodiment provides a method for obtaining performance parameters of a line laser, which uses an image analysis method to obtain performance parameters of a line laser. The method can be used to obtain parameters in the following situations:
[0092] 1. Calculate the performance parameters of the line laser at a specific temperature (such as room temperature), and further evaluate the quality of the line laser based on the calculated parameters to facilitate equipment selection;
[0093] 2. Calculate the performance parameters of the laser after it has been used for a period of time, and further evaluate the quality of the line laser based on the calculated parameters; for example, if a laser has been used for 5 years, testing its performance parameters can be used to assess whether the laser has aged and is not suitable for continued use.
[0094] The scheme of this embodiment is as follows:
[0095] A method for obtaining performance parameters of a line laser comprises the following steps:
[0096] S1, the camera collects the laser bar image; extracts the gray value of each pixel in the entire image;
[0097] S2. Sample S pixels on the laser stripe image and record them as sampling positions; 1≤S≤N, where N is the total number of pixels in the laser stripe along its extension direction;
[0098] Calculate the angles between the laser bar and the X-axis and Y-axis of the image coordinate system respectively, and record the coordinate axis with the larger angle as the characteristic axis; record the direction perpendicular to the extension direction of the laser bar as direction A;
[0099] At a single sampling position, draw a straight line A along direction A with a line width of 1 to 5 pixels. Mark each pixel point on the straight line A in the image and extract the grayscale values of these pixel points and their coordinate components in the direction of the characteristic axis. If there are multiple identical coordinate components among the extracted coordinate components, take the average of the grayscale values corresponding to the identical coordinate components, store the average value in correspondence with the coordinate component, store each coordinate component in one-to-one correspondence with the grayscale value / grayscale mean, and sort the coordinate components in order from large to small or from small to large to form a grayscale distribution sequence.
[0100] Perform the same processing at S sampling points to obtain S grayscale distribution sequences;
[0101] S3. Fitting Gaussian curves using each grayscale distribution sequence, calculating and storing performance parameters of the line laser based on the Gaussian curves.
[0102] The performance parameters of the line laser include one or more of peak grayscale, line width, and Gaussian fit;
[0103] The performance parameters of the line laser are calculated based on the Gaussian curve as follows:
[0104] Store the grayscale value of the peak point of each Gaussian curve respectively;
[0105] Peak grayscale: take the average of the grayscale values of each peak point as the peak grayscale;
[0106] Line width value: Find the maximum grayscale value among the grayscale values of each peak point, record the corresponding Gaussian curve as the characteristic curve, divide the maximum grayscale value by 2 or the square of the natural constant e to obtain the calculation result, find two positions in the characteristic curve whose grayscale values are equal to the calculated value, multiply the pixel difference between the two positions by the pixel size of the camera, and use the product value as the line width value of the laser bar;
[0107] Gaussian fitting: Calculate the coefficient of determination R using the points on each Gaussian curve and their corresponding grayscale distribution sequence 2 , multiple coefficients of determination R 2 The mean is taken as the Gaussian fit.
[0108] As a performance parameter an application:
[0109] Use performance parameters to determine whether the line laser performance meets the standards:
[0110] The performance parameters obtained in step S3 are compared with the nominal standard performance parameters of the line laser to obtain differences. When all differences are less than a preset threshold, it is considered that the performance of the line laser meets the standard; otherwise, it is considered that the performance of the line laser does not meet the standard.
[0111] When the performance parameters of a line laser include multiple ones of peak grayscale, line width value, and Gaussian fit, each performance parameter is compared with its corresponding standard performance parameter. Only when the difference corresponding to each performance parameter is less than a preset threshold value, the performance of the line laser is considered to meet the standard.
[0112] When acquiring an image, to facilitate computation, the preferred implementation is as follows: The angle between the laser bar in the image and the X / Y axis of the image coordinate system is set to less than 20°, i.e., the laser bar in the image is horizontal or vertical, and the direction of the other coordinate axis is recorded as direction A. At a single sampling location, draw a line A along direction A with a line width of 1 to 5 pixels. Mark each pixel on line A in the image, and extract the grayscale values of these pixels and their coordinate components in the direction of the characteristic axis.
[0113] When the line width of line A is 1, there are no multiple identical coordinate components in the extracted coordinate components. Each coordinate component is directly stored in a one-to-one correspondence with the grayscale value, and the coordinate components are sorted in order from large to small or from small to large to form a grayscale distribution sequence.
[0114] When the line width of straight line A is not 1, there will be multiple identical coordinate components among the extracted coordinate components. The grayscale values corresponding to the identical coordinate components are averaged, and the average is stored corresponding to the coordinate component. Each coordinate component is stored in a one-to-one correspondence with the grayscale mean, and the coordinate components are sorted in order from large to small or from small to large to form a grayscale distribution sequence.
[0115] If the laser bar in the captured image is neither horizontal nor vertical, it is tilted. Use multiple pixel points on the laser bar to fit a straight line, and record the direction perpendicular to the straight line as direction A. Draw a straight line A along direction A at a single sampling position. The line width of line A is 1 to 5 pixels. Mark each pixel on line A in the image and extract the grayscale value of these pixels and their coordinate components in the direction of the characteristic axis.
[0116] When the line width of line A is 1, there are no multiple identical coordinate components in the extracted coordinate components. Each coordinate component is directly stored in a one-to-one correspondence with the grayscale value, and the coordinate components are sorted in order from large to small or from small to large to form a grayscale distribution sequence.
[0117] When the line width of straight line A is not 1, among the extracted coordinate components, there may be multiple identical coordinate components, or there may not be multiple identical coordinate components. If there are multiple identical coordinate components, the grayscale values corresponding to the identical coordinate components are averaged, and the average is stored corresponding to the coordinate component. Each coordinate component is stored in a one-to-one correspondence with the grayscale value / grayscale mean, and the coordinate components are sorted in order from large to small or from small to large to form a grayscale distribution sequence.
[0118] In order to obtain multiple more reasonable grayscale distribution sequences, as a preferred implementation, in specific implementation, the sampling is equidistant sampling; 3≤S≤20.
[0119] For example: Figure 1 As shown in the figure, when S=3, three sampling positions are sampled at equal intervals in the 10×5 resolution laser strip image. A straight line A is drawn along direction A at a single sampling position. The line width of the straight line A is 1 pixel. Each pixel point on the straight line A is marked in the image, and the grayscale values of these pixel points and their coordinate components in the characteristic axis direction (Y axis) are extracted. Since the line width of the straight line A is 1 pixel, there is no situation where multiple coordinate components are the same in the extracted coordinate components. Each coordinate component is directly stored in a one-to-one correspondence with the grayscale value, and the coordinate components are sorted in order from large to small or from small to large to form three groups of grayscale distribution sequences.
[0120] Grayscale distribution sequence 1:
[0121] Grayscale distribution sequence 2: (1, grayscale value), (2, grayscale value), (3, grayscale value), (4, grayscale value), (5, grayscale value):
[0122] (1, grayscale value), (2, grayscale value), (3, grayscale value), (4, grayscale value), (5, grayscale value) grayscale distribution sequence three:
[0123] (1, grayscale value), (2, grayscale value), (3, grayscale value), (4, grayscale value), (5, grayscale value)
[0124] In order to reduce the noise generated by ambient light in the image, in step S1, the image is preprocessed as follows: the grayscale value less than the preset value is set to zero, and the preset value is
[0125] Example 2
[0126] This embodiment provides a line laser performance parameter testing system at different temperatures, which can be used to monitor laser performance parameters throughout the entire temperature range, and can also be used to monitor the performance parameters of line lasers at extreme ambient temperatures (such as -30° and 50°). It can assist technicians in selecting lasers, avoid putting lasers with performance fluctuations exceeding specifications into field use, and ensure measurement accuracy in subsequent measurement processes.
[0127] The specific plan is as follows:
[0128] A line laser performance parameter testing system at different temperatures, including a high and low temperature chamber, a controller, and a camera;
[0129] The laser to be tested is installed inside a high and low temperature box. The high and low temperature box is used to adjust different temperatures within a preset temperature range. The front end of the box is provided with a light-transmitting hole, through which the laser projects a laser bar outward.
[0130] The camera is installed outside the high and low temperature box. When the high and low temperature box is set to the temperature and left to stand for a preset time, the camera captures the laser bar image and sends the image to the controller.
[0131] The controller includes an image processing module and an information storage module;
[0132] The image processing module is used to receive images (such as Figure 1 ) and perform the following processing:
[0133] Extract the grayscale value of each pixel in the entire image;
[0134] On the laser bar in the image, S pixels are sampled and recorded as sampling position points; 1≤S≤N, where N is the total number of pixels in the laser bar along its extension direction;
[0135] The direction perpendicular to the extension direction of the laser bar is recorded as direction A;
[0136] Calculate the angles between the laser bar and the X-axis and Y-axis of the image coordinate system respectively, and record the coordinate axis with the larger angle as the characteristic axis;
[0137] At a single sampling position, draw a straight line A along direction A with a line width of 1 to 5 pixels. Mark each pixel on the straight line A in the image and extract the grayscale values of these pixel points and their coordinate components in the direction of the characteristic axis. If there are multiple identical coordinate components among the extracted coordinate components, take the average of the grayscale values corresponding to the identical coordinate components, store the average value in correspondence with the coordinate component, store each coordinate component in one-to-one correspondence with the grayscale value / grayscale mean, and sort the coordinate components in order from large to small or from small to large to form a grayscale distribution sequence.
[0138] Perform the same processing at S sampling points to obtain S grayscale distribution sequences;
[0139] like Figure 3 As shown, when S=1, only one position point is sampled to obtain a grayscale distribution sequence. When S=N, the grayscale distribution sequence corresponding to each column of pixels is obtained.
[0140] Gaussian curves are fitted using each grayscale distribution sequence, and performance parameters of the line laser at the current temperature value are calculated based on the Gaussian curves and stored in the information storage module; the high and low temperature chamber is set to a temperature according to preset conditions, and at different temperatures, the line laser projects a laser bar, and the camera captures the laser bar image; the image processing module receives the laser bar image and processes it to obtain the performance parameters of the line laser;
[0141] The information storage module stores the performance parameters at different temperatures. The performance parameters of the line laser include one or more of peak grayscale, line width, and Gaussian fit.
[0142] The performance parameters of the laser at the current temperature are calculated based on the Gaussian curve as follows:
[0143] Store the grayscale value of the peak point of each Gaussian curve respectively;
[0144] Peak grayscale: Take the average of the grayscale values of each peak point as the peak grayscale
[0145] Line width value: Find the maximum grayscale value among the grayscale values of each peak point, record the corresponding Gaussian curve as the characteristic curve, and divide the maximum grayscale value by 2 or the square of the natural constant e to obtain the calculation result (the calculation formula is as follows: or max(I′) finds the maximum grayscale value), and finds two points in the characteristic curve where the grayscale value is equal to the calculated value (such as Figure 6 Points a and b in the figure are multiplied by the pixel difference between the two points and the pixel size of the camera, and the product value is used as the line width value of the laser bar;
[0146] Gaussian fitting: Calculate the coefficient of determination R using the points on each Gaussian curve and their corresponding grayscale distribution sequence 2 , multiple coefficients of determination R 2 The mean is taken as the Gaussian fit.
[0147] Specifically, the coefficient of determination SSR is the regression sum of squares calculated using the points (discrete points) on a single Gaussian curve and their corresponding grayscale distribution sequence (data: (coordinate component, grayscale value)), and SST is the total deviation sum of squares calculated using the points (discrete points) on a single Gaussian curve and their corresponding grayscale distribution sequence (data: (coordinate component, grayscale value));
[0148] The number of Gaussian curves is the same as the number of sampling points, which is S, so S coefficients of determination R will be obtained. 2 , and take its mean as the Gaussian fit.
[0149] As an application of performance parameters stored at different temperatures:
[0150] Use method 1 or method 2 to use the performance parameters stored at different temperatures to determine whether the line laser performance meets the standards:
[0151] Method 1:
[0152] The optical power instability of a line laser is calculated using the peak grayscale as follows:
[0153] Calculate the difference between the maximum and minimum values of the laser peak grayscale at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as optical power instability;
[0154] Alternatively, the peak grayscale at other temperatures is subtracted from and summed with the peak grayscale at the reference temperature; the difference is divided by the sum, and the result is recorded as the optical power instability;
[0155] The reference temperature is one of all the adjustment temperatures;
[0156] The line width value is used to calculate the instability of the line width value of the line laser as follows:
[0157] Calculate the difference between the maximum and minimum line width values at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as the instability of the line width value;
[0158] Alternatively, the line width values at other temperatures are subtracted from and summed with the line width value at the reference temperature; the difference is divided by the sum, and the result is recorded as the instability of the line width value;
[0159] The Gaussian fit is used to calculate the instability of the Gaussian fit of the line laser as follows:
[0160] The difference between the maximum and minimum values of the Gaussian fit at different temperatures is calculated, and the difference is divided by the sum of the maximum and minimum values. The result is recorded as the instability of the Gaussian fit.
[0161] Alternatively, the Gaussian fit at other temperatures is subtracted from and summed with the Gaussian fit at the reference temperature; the difference is divided by the sum, and the result is recorded as the instability of the Gaussian fit;
[0162] If any of the optical power instability, line width instability, and Gaussian fit instability is greater than the corresponding preset tolerance, the line laser performance is considered to be substandard;
[0163] When multiple parameters are included, the instability of each performance parameter is compared with its corresponding preset tolerance. When all instabilities are less than the preset tolerance, the line laser performance is considered to meet the standard. Otherwise, the line laser performance is considered to be unsatisfactory.
[0164] Method 2:
[0165] The peak grayscale, line width, and Gaussian fit are judged according to the following method. If any one of them is judged as not meeting the standard, the line laser performance is considered to be substandard.
[0166] The peak grayscale is judged as follows:
[0167] Calculate the difference between the maximum and minimum values of the laser peak grayscale at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as optical power instability;
[0168] Alternatively, the peak grayscale at other temperatures is subtracted from and summed with the peak grayscale at the reference temperature; the difference is divided by the sum, and the result is recorded as the optical power instability; the reference temperature is one of all the adjustment temperatures;
[0169] When the calculated optical power instability is less than the preset tolerance value, the optical power performance of the line laser is considered to meet the standard, otherwise, it does not meet the standard;
[0170] The following judgments are made on the line width value:
[0171] Compare the line width values obtained at different temperatures with the nominal standard line width value of the line laser to obtain the difference. When the difference is less than the preset threshold, it is considered that the line width performance of the line laser meets the standard; otherwise, it does not meet the standard.
[0172] The following judgments are made on the Gaussian fit:
[0173] It is determined whether the Gaussian fits obtained at different temperatures are all greater than the standard Gaussian fit values. If so, it is considered that the Gaussian fit performance of the line laser meets the standard; otherwise, it does not meet the standard.
[0174] In order to achieve laser performance testing in the entire temperature range, the high and low temperature chamber increases / decreases the step size in the preset temperature range to adjust to each preset temperature;
[0175] The temperature range is set according to the actual temperature range of the laser, and the preset step size is 1℃~10℃;
[0176] As a preferred embodiment, a protective glass is installed at the light-transmitting hole; the rest time is 15 to 180 minutes. Sampling is performed at equal intervals; 3 ≤ S ≤ 20. The angle between the laser bar and the X / Y axis of the image coordinate system is less than 20°, and the direction of the other coordinate axis is denoted as direction A.
[0177] In order to reduce the noise generated by ambient light in the image, the grayscale value less than the preset value is set to zero. The preset value is
[0178] In specific implementation, the camera captures the laser bar image in the following two ways:
[0179] Method A: A flat plate is fixed outside the temperature chamber. The laser bar is projected onto the plate. A camera is mounted in front of the plate to capture the image of the laser bar on the plate. A filter is provided at the front of the camera lens to filter out ambient light. Preferably, the distance between the plate and the laser is equal to ±10 cm of the laser's standard working distance.
[0180] Method B: The camera is mounted in front of the light-transmitting aperture. The camera lacks a lens and has an attenuation plate at its front end. The laser bar is projected directly onto the camera, which then captures the image. The attenuation plate prevents overexposure. Preferably, the distance between the camera and the laser is ±10 cm from the laser's standard working distance.
[0181] The following is an example of testing the performance parameters of two line lasers at -30°C, -10°C, 10°C, room temperature, 30°C, and 50°C.
[0182] The first and second line lasers to be tested are installed inside a high and low temperature box respectively. The high and low temperature box adjusts different temperatures within a preset temperature range. A light-transmitting hole is provided at the front end of the box, through which the laser projects a laser bar outward.
[0183] The camera adopts method B, such as Figure 2 As shown, it is installed in front of the light-transmitting through hole. The camera does not contain a lens and has an attenuation plate at its front end. The laser bar is directly projected onto the camera, and the camera collects the laser bar image.
[0184] When the high and low temperature box is set to the temperature and left to stand for the preset time (100 minutes), the camera captures the laser bar image and sends the image to the controller;
[0185] The controller includes an image processing module and an information storage module;
[0186] The image processing module is used to receive images (such as Figure 1 ) and perform the following processing:
[0187] Extract the grayscale value of each pixel in the entire image;
[0188] like Figure 4 As shown, on the laser bar in the image, 5 pixels are sampled at equal intervals and recorded as sampling position points respectively;
[0189] When installing the camera, make the image of the laser bar in the camera look like Figure 3 As shown, the angle between the laser bar and the X-axis of the image coordinate system is 5°, and the Y-axis direction is recorded as direction A and the characteristic axis.
[0190] At a single sampling point, draw a line A along direction A with a line width of 3 pixels. Mark each pixel on line A in the image and extract the grayscale value of these pixels and their coordinate component (y coordinate component) in the direction of the characteristic axis.
[0191] Since the line width of line A is 3 pixels, there are 3 identical coordinate components in the extracted y coordinate components (each y value corresponds to 3 grayscale values). Then, the grayscale values corresponding to the identical coordinate components are averaged, and the average is stored in correspondence with the coordinate component. Each coordinate component is stored in correspondence with the grayscale mean, and the grayscale distribution sequence is formed by sorting the y coordinate components from large to small or from small to large (the scatter plot of a single grayscale distribution sequence is shown in Figure 2). Figure 5 shown);
[0192] The same processing is performed on 5 sampling positions to obtain 5 grayscale distribution sequences;
[0193] Use each grayscale distribution sequence to fit the Gaussian curve separately, the method is: substitute the data in a single grayscale distribution sequence into the Gaussian function In the figure (x is the coordinate value, f(x) is the grayscale value), the parameters a, b, and c are solved according to the least squares method; then the Gaussian curve is drawn according to the solved parameters a, b, and c.
[0194] Calculate the performance parameters of the laser at the current temperature based on the Gaussian curve: peak grayscale, line width, and Gaussian fitting degree;
[0195] The high and low temperature box continues to adjust the temperature; the camera continues to collect images, the image processing module processes the images collected at different temperatures to obtain performance parameters, and the information storage module stores the performance parameters at different temperatures accordingly.
[0196] In this embodiment, the optical power instability of the line laser is calculated based on the peak grayscale at different temperatures and room temperature: the peak grayscale at other temperatures is subtracted from and summed with the peak grayscale at the reference temperature; the difference is divided by the sum, and the result is recorded as the optical power instability. The reference temperature is one of the adjustable temperatures. In this embodiment, the reference temperature is selected as room temperature (20°C); taking 10°C as an example, the optical power instability = (181.9-161.9) / (181.9+161.9) = 5.82%;
[0197] The test results are shown in the following table:
[0198]
[0199] Based on the data in the table, determine whether the line laser performance meets the standards:
[0200] The peak grayscale is judged as follows:
[0201] The optical power instability is calculated using the peak grayscale. When the calculated optical power instability is less than the preset tolerance value, the optical power performance of the line laser is considered to meet the standard; otherwise, it is not up to standard. The optical power instability data shows that the optical power instability of the laser at -10° and 10° exceeds the preset tolerance (4%), and the optical power performance of the line laser is considered to be not up to standard.
[0202] The following judgments are made on the line width value:
[0203] The line width values obtained at different temperatures were compared with the nominal standard line width value (0.3) of the line laser to obtain the difference. Analysis showed that the difference between the line width values at 30° and 50° and the standard line width value (0.30) was greater than the preset threshold (0.05); it was considered that the line width performance of the line laser did not meet the standard;
[0204] The following judgments are made on the Gaussian fit:
[0205] If the Gaussian fit obtained at different temperatures is greater than the standard Gaussian fit value (95%), then the Gaussian fit performance of the line laser is considered to meet the standard;
[0206] If any of the line laser optical power performance, line laser line width performance, and line laser Gaussian fit performance does not meet the standard, the line laser performance is considered to be substandard. Otherwise, the line laser is considered to be unsuitable for use.
[0207] The performance parameters of line laser 2 are excellent. The Gaussian fit at each temperature is greater than the standard data, meeting the Gaussian fit requirements. The difference between each line width value and the standard line width value (0.1) is less than the preset threshold (0.05); and the laser optical power instability is less than the preset tolerance (4%), that is, the optical power performance, line laser line width performance, and line laser Gaussian fit of line laser 2 are all up to standard, and it can be put into use.
[0208] During specific implementation, according to actual test requirements, the difference between the maximum and minimum values of each performance parameter can be used to remove the sum of the maximum and minimum values of the peak grayscale to solve the instability, and preset tolerances can be set for each parameter to evaluate whether the line laser meets the usage requirements.
[0209] This method can quickly and effectively evaluate the performance of line lasers at different temperatures and assist operators in rapid model selection.
[0210] The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. The foregoing descriptions are not intended to be exhaustive or to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been chosen and described in order to explain the specific principles of the invention and their practical application, thereby enabling others skilled in the art to make and utilize the various exemplary embodiments of the invention and various alternatives and modifications thereof. The scope of the invention is intended to be defined by the appended claims and their equivalents.
Claims
1. A method for obtaining performance parameters of a line laser, characterized in that: The following steps are involved: S1, the camera collects the laser bar image; extracts the gray value of each pixel in the entire image; S2. Sample S pixels on the laser stripe image and record them as sampling positions; 1≤S≤N, where N is the total number of pixels in the laser stripe along its extension direction; Calculate the angles between the laser bar and the X-axis and Y-axis of the image coordinate system respectively, and record the coordinate axis with the larger angle as the characteristic axis; record the direction perpendicular to the extension direction of the laser bar as direction A; At a single sampling position, draw a straight line A along direction A, where the line width of the straight line A is 1 to 5 pixels. Mark each pixel point on the straight line A in the image, and extract the grayscale values of these pixel points and their coordinate components in the direction of the characteristic axis. If there are multiple identical coordinate components among the extracted coordinate components, take the average of the grayscale values corresponding to the identical coordinate components, store the average value in correspondence with the coordinate component, store each coordinate component in one-to-one correspondence with the grayscale value / grayscale mean, and sort the coordinate components in order from large to small or from small to large to form a grayscale distribution sequence. Perform the same processing at S sampling points to obtain S grayscale distribution sequences; S3. Fitting Gaussian curves using each grayscale distribution sequence, calculating and storing performance parameters of the line laser based on the Gaussian curves; wherein the performance parameters of the line laser include one or more of peak grayscale, line width, and Gaussian fit; The performance parameters of the line laser are calculated based on the Gaussian curve as follows: Store the grayscale value of the peak point of each Gaussian curve respectively; Peak grayscale: take the average of the grayscale values of each peak point as the peak grayscale; Line width value: Find the maximum grayscale value among the grayscale values of each peak point, record the corresponding Gaussian curve as the characteristic curve, divide the maximum grayscale value by 2 or by the square of the natural constant e to obtain the calculation result, find two positions in the characteristic curve whose grayscale values are equal to the calculated value, multiply the pixel difference between the two positions by the pixel size of the camera, and use the product value as the line width value of the laser bar; Gaussian fitting: Calculate the coefficient of determination R using the points on each Gaussian curve and their corresponding grayscale distribution sequence 2 , multiple coefficients of determination R 2 The mean is taken as the Gaussian fit.
2. The method for obtaining line laser performance parameters according to claim 1, wherein: Use the performance parameters to determine whether the performance of the line laser meets the standards: compare the performance parameters obtained in step S3 with the nominal standard performance parameters of the line laser to obtain the difference. When all the differences are less than the preset threshold, it is considered that the performance of the line laser meets the standards; otherwise, it is considered that the performance of the line laser does not meet the standards.
3. The method for obtaining performance parameters of a line laser according to claim 1, wherein: The sampling is equidistant sampling; 3≤S≤20.
4. The method for obtaining line laser performance parameters according to claim 1, wherein: The angle between the laser bar and the X-axis / Y-axis of the image coordinate system in the image is less than 20°, and the direction of the other coordinate axis is recorded as direction A.
5. The method for obtaining performance parameters of a line laser according to claim 1, wherein: In step S1, the image is preprocessed as follows: grayscale values less than a preset value are set to zero, and the preset value is ~ .
6. A line laser performance parameter testing system at different temperatures, characterized by: Including high and low temperature chamber, controller and camera; The laser to be tested is installed inside the high and low temperature box. The high and low temperature box is used to adjust different temperatures within a preset temperature range. A light-transmitting hole is provided at the front end of the box. The laser projects a laser bar outward through the light-transmitting hole. The camera is installed outside the high and low temperature box. When the high and low temperature box is set to a certain temperature and left to stand for a preset time, the camera captures the laser bar image and sends the image to the controller. The controller includes an image processing module and an information storage module; The image processing module is used to receive an image and perform the following processing: Extract the grayscale value of each pixel in the entire image; On the laser bar in the image, S pixels are sampled and recorded as sampling position points; 1≤S≤N, where N is the total number of pixels in the laser bar along its extension direction; The direction perpendicular to the extension direction of the laser bar is recorded as direction A; Calculate the angles between the laser bar and the X-axis and Y-axis of the image coordinate system respectively, and record the coordinate axis with the larger angle as the characteristic axis; At a single sampling position, draw a straight line A along direction A, where the line width of the straight line A is 1 to 5 pixels. Mark each pixel point on the straight line A in the image, and extract the grayscale values of these pixel points and their coordinate components in the direction of the characteristic axis. If there are multiple identical coordinate components among the extracted coordinate components, take the average of the grayscale values corresponding to the identical coordinate components, store the average value in correspondence with the coordinate component, store each coordinate component in one-to-one correspondence with the grayscale value / grayscale mean, and sort the coordinate components in order from largest to smallest or from smallest to largest to form a grayscale distribution sequence. Perform the same processing at S sampling points to obtain S grayscale distribution sequences; Using each grayscale distribution sequence to fit a Gaussian curve, and calculating the performance parameters of the offline laser at the current temperature value based on the Gaussian curve, and storing them in the information storage module; The high and low temperature box is set to a temperature according to preset conditions. At different temperatures, the line laser projects a laser bar, the camera collects the laser bar image, and the image processing module receives the laser bar image and processes it to obtain the performance parameters of the line laser; The information storage module stores the performance parameters at different temperatures respectively; The performance parameters of the line laser include one or more of peak grayscale, line width, and Gaussian fit; The performance parameters of the laser at the current temperature are calculated based on the Gaussian curve as follows: Store the grayscale value of the peak point of each Gaussian curve respectively; Peak grayscale: take the average of the grayscale values of each peak point as the peak grayscale; Line width value: Find the maximum grayscale value among the grayscale values of each peak point, record the corresponding Gaussian curve as the characteristic curve, divide the maximum grayscale value by 2 or by the square of the natural constant e to obtain the calculation result, find two positions in the characteristic curve whose grayscale values are equal to the calculated value, multiply the pixel difference between the two positions by the pixel size of the camera, and use the product value as the line width value of the laser bar; Gaussian fitting: Calculate the coefficient of determination R using the points on each Gaussian curve and their corresponding grayscale distribution sequence 2 , multiple coefficients of determination R 2 The mean is taken as the Gaussian fit.
7. The line laser performance parameter testing system at different temperatures according to claim 6, characterized in that: Use method 1 or method 2 to use the performance parameters stored at different temperatures to determine whether the line laser performance meets the standards: Method 1: The optical power instability of a line laser is calculated using the peak grayscale as follows: Calculate the difference between the maximum and minimum values of the laser peak grayscale at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as optical power instability; Alternatively, the peak grayscale at other temperatures is subtracted from and summed with the peak grayscale at the reference temperature; the difference is divided by the sum, and the result is recorded as the optical power instability. The reference temperature is one of all the adjustment temperatures; The line width value is used to calculate the instability of the line width value of the line laser as follows: Calculate the difference between the maximum and minimum line width values at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as the instability of the line width value; Alternatively, the line width values at other temperatures are subtracted from and summed with the line width value at the reference temperature; the difference is divided by the sum, and the result is recorded as the instability of the line width value; The Gaussian fit is used to calculate the instability of the Gaussian fit of the line laser as follows: The difference between the maximum and minimum values of the Gaussian fit at different temperatures is calculated, and the difference is divided by the sum of the maximum and minimum values. The result is recorded as the instability of the Gaussian fit. Alternatively, the Gaussian fit at other temperatures is subtracted from and summed with the Gaussian fit at the reference temperature; the difference is divided by the sum, and the result is recorded as the instability of the Gaussian fit; If any of the optical power instability, line width instability, and Gaussian fit instability is greater than a preset tolerance, the line laser performance is considered to be substandard; Method 2: The peak grayscale, line width, and Gaussian fit are judged according to the following method. If any one of them is judged as not meeting the standard, the line laser performance is considered to be substandard. The peak grayscale is judged as follows: Calculate the difference between the maximum and minimum values of the laser peak grayscale at different temperatures, divide the difference by the sum of the maximum and minimum values, and record the result as optical power instability; Alternatively, the peak grayscale at other temperatures is subtracted from and summed with the peak grayscale at the reference temperature; the difference is divided by the sum, and the result is recorded as the optical power instability; the reference temperature is one of all the adjustment temperatures; When the calculated optical power instability is less than the preset tolerance value, the optical power performance of the line laser is considered to meet the standard, otherwise, it does not meet the standard; The following judgments are made on the line width value: Compare the line width values obtained at different temperatures with the nominal standard line width value of the line laser to obtain the difference. When the difference is less than the preset threshold, it is considered that the line width performance of the line laser meets the standard; otherwise, it does not meet the standard. The following judgments are made on the Gaussian fit: It is determined whether the Gaussian fits obtained at different temperatures are all greater than the standard Gaussian fit values. If so, it is considered that the Gaussian fit performance of the line laser meets the standard; otherwise, it does not meet the standard.
8. The line laser performance parameter testing system at different temperatures according to claim 6, characterized in that: The high and low temperature box increases / decreases the step size in a preset temperature range in a preset step size to adjust to each preset temperature; The temperature interval is set according to the temperature range in which the laser is actually used, and the preset step size is 1°C to 10°C; The light-transmitting hole is provided with protective glass; the static time is 15min~180min.
9. The line laser performance parameter testing system at different temperatures according to claim 6, characterized in that: The sampling is equidistant sampling; 3≤S≤20.
10. The line laser performance parameter testing system at different temperatures according to claim 6, characterized in that: The grayscale value less than the preset value is set to zero. The preset value is ~ .
11. The line laser performance parameter testing system at different temperatures according to claim 6, characterized in that: The angle between the laser bar and the X-axis / Y-axis of the image coordinate system is less than 20°, and the direction of the other coordinate axis is recorded as direction A.
12. The line laser performance parameter testing system at different temperatures according to claim 6, characterized in that: There are two ways for the camera to capture laser bar images: Method A: A flat plate is fixed outside the high and low temperature chamber, the laser bar is projected onto the flat plate, a camera is installed in front of the flat plate to capture the image of the laser bar on the flat plate, and a filter is provided at the front end of the camera lens; Mode B: The camera is installed in front of the light-transmitting through hole. The camera does not include a lens, and an attenuation plate is provided at the front end. The laser bar is directly projected onto the camera, and the camera collects the laser bar image.
Citation Information
Patent Citations
Laser light plane calibration system and method
CN114034246A
Sub-pixel surface morphology detecting method based on laser triangular measuring method
CN103234475A
Surface type measurement method of large-size transparent object
CN113074660A