Receiving and transmitting optical path active alignment method, electronic equipment and computer readable storage medium
By evaluating the reflectivity information of lidar point cloud images and using multiple evaluation indicators, the alignment of the light and light paths can be quickly achieved, solving the problem of automated light adjustment of lidar and improving the alignment accuracy and efficiency of the DTOF system.
Patent Information
- Application Number
- CN202411718387.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-11-21
AI Technical Summary
Existing lidar systems suffer from low efficiency and insufficient alignment accuracy during the alignment process of light receiving and receiving paths. This is especially true in DTOF systems, where traditional methods such as signal light modulation and image light modulation have limitations and make it difficult to achieve fast and simple automated light modulation.
By acquiring the reflectivity information of point cloud images collected by lidar, evaluation metrics for multiple frames of point cloud images are calculated, including average gray value, weighted average gray value, point cloud gap spacing, and two-dimensional distribution feature value. By combining multiple metrics, the degree of alignment of the receiving and transmitting light paths is evaluated, enabling fast and simple active alignment of the receiving and transmitting light paths.
It achieves automated light adjustment of lidar, improves the accuracy and efficiency of light path alignment, reduces noise interference, enhances the robustness and stability of the algorithm, and is applicable to lidar systems of all DTOF systems.
Smart Images

Figure CN120993381A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of laser radar, in particular to a kind of transceiving light path active alignment method, electronic equipment and computer readable storage medium. BACKGROUND
[0002] Laser radar is usually composed of laser transmitter, optical receiver (detector) and scanning mirror, etc. The working principle of laser radar is that the laser transmitter emits laser signal to target object, and then the receiver processes the echo signal received from the target object after reflection, obtains the related information of the target object, such as the distance, direction, height, speed, attitude and even shape parameters between the laser radar, so as to realize the detection, tracking and identification of each object in the target scene.
[0003] AA (Active Alignment) is a technology used in optical systems, especially in the assembly process of laser radar (LiDAR) and sensors, to ensure accurate alignment of optical components. This technology usually adjusts the position and angle of optical elements through precise mechanical adjustment and real-time feedback to achieve optimal beam alignment or precise configuration of optical systems. In LiDAR systems, AA technology is usually used for alignment of laser transmitters and receivers to ensure accurate emission and reception of laser beams, thereby improving measurement accuracy and system performance. SUMMARY
[0004] The embodiments of the present application provide a kind of transceiving light path active alignment method, electronic equipment and computer readable storage medium, can according to the reflectivity information of point cloud image evaluation transceiving area The degree of alignment, quickly and simply complete transceiving light path active alignment, realize laser radar automatic light adjustment, and it is suitable for all DTOF (Direct Time of Flight) system laser radar.
[0005] In a first aspect, the embodiments of the present application provide a kind of transceiving light path active alignment method, applied to laser radar, the laser radar includes first emission plate and second emission plate, the method comprises: obtaining N frame first point cloud image collected by laser radar, wherein N is positive integer, the N frame first point cloud image is one-to-one corresponding with N first candidate positions of the first emission plate, the N first candidate positions are spaced apart along the first direction;According to the reflectivity information of the N frame first point cloud image, the evaluation index of the N frame first point cloud image is calculated;According to the evaluation index of the N frame first point cloud image, first target position is determined in N first candidate positions.
[0006] The method takes reflectivity information of a point cloud image as a parameter for evaluating the alignment degree of the light receiving and transmitting path, is suitable for a laser radar of all DTOF (Direct Time of Flight) systems, can quickly and simply complete active alignment of the light receiving and transmitting path of the laser radar, and realizes automatic light adjustment of the laser radar.
[0007] In some embodiments, the evaluation index of the N frames of first point cloud images is calculated according to the reflectivity information of the N frames of first point cloud images, including: for each of the first point cloud images, obtaining a gray value of each point cloud point of the first point cloud image according to the reflectivity of each point cloud point; and calculating the evaluation index of the first point cloud image based on the gray value of each point cloud point.
[0008] In some embodiments, the evaluation index is an average gray value, and the evaluation index of the first point cloud image is calculated based on the gray value of each point cloud point, including: calculating an average value of the gray values of the point cloud points of the first point cloud image to obtain the average gray value of the first point cloud image.
[0009] The method takes the average of the gray values corresponding to the reflectivity of all point cloud points in the image as the standard for judging the alignment degree of the light receiving and transmitting path, can simply and effectively reflect the global characteristics, and avoids the deviation caused by judging only according to local data.
[0010] In some embodiments, the evaluation index is a weighted average gray value, and the evaluation index of the first point cloud image is calculated based on the gray value of each point cloud point, including: obtaining a weight value of each point cloud point according to the distance between each point cloud point and a center point of the first point cloud image and a normal distribution function; and calculating the weighted average gray value of the first point cloud image according to the weight value of each point cloud point and the gray value of each point cloud point.
[0011] The method performs weighted sampling on the gray values of the point cloud points, so that the point cloud points near the center point obtain higher weights, can effectively highlight a region of interest (ROI), weaken the influence of noise points or irrelevant points far from the center point, and improve the accuracy of local analysis.
[0012] In some embodiments, the evaluation index is a point cloud gap distance, and the calculation of the evaluation index of the first point cloud image based on the gray value of each point cloud point comprises: selecting L rows of point cloud points in the first point cloud image as a region of interest, where L is a positive integer greater than 1; summing the gray values of the L rows of point cloud points by column to obtain a gray integral value of each column of point cloud points in the region of interest; and calculating the point cloud gap distance of the first point cloud image according to a first gray threshold and the gray integral value of each column of point cloud points, where the first gray threshold is determined according to a gray range of the first point cloud image.
[0013] The above embodiments determine the position of the point cloud gap by applying the first gray threshold to the gray integral value of each column of point cloud points in the region of interest and then determining whether the column produces a point cloud gap in combination with the gray threshold, and then calculate the first emission panel point cloud gap distance according to the position of the point cloud gap, which is low in calculation amount, fast in running speed, and can effectively reduce the interference of noise points.
[0014] In some embodiments, the evaluation index is a two-dimensional distribution characteristic value, and the calculation of the evaluation index of the first point cloud image based on the gray value of each point cloud point comprises: selecting L rows of point cloud points in the first point cloud image as a region of interest, where L is a positive integer greater than 1; calculating a probability density value of a two-dimensional Gaussian distribution corresponding to each point cloud point in the region of interest based on the region of interest; multiplying the gray value of each point cloud point in the region of interest by the corresponding probability density value to obtain a weighted gray value of each point cloud point in the region of interest; and summing the weighted gray values of each point cloud point in the region of interest to calculate the two-dimensional distribution characteristic value of the first point cloud image.
[0015] The above embodiments analyze the gray characteristics of a specific image region by a two-dimensional normal distribution weighting method, and the calculated two-dimensional distribution characteristic value can effectively reflect the gray distribution characteristics of the region of interest, the method is efficient and general, is conducive to highlighting the central region of the field of view and reducing the influence of edge noise, and enhances the robustness of the algorithm.
[0016] In some embodiments, the evaluation index is a first evaluation function value. Calculating the evaluation index of the first point cloud image based on the grayscale value of each point cloud point includes: selecting L rows of point cloud points in the first point cloud image as a region of interest, where L is a positive integer greater than 1; obtaining the point cloud gap spacing of the first point cloud image based on the grayscale value of each point cloud point within the region of interest and a first grayscale threshold, where the first grayscale threshold is determined based on the grayscale range of the first point cloud image; obtaining the two-dimensional distribution feature value of the first point cloud image based on the grayscale value of each point cloud point within the region of interest and a Gaussian probability density function; and calculating the first evaluation function value of the first point cloud image based on the point cloud gap spacing and the two-dimensional distribution feature value.
[0017] Combining two evaluation indicators allows for the acquisition of more information and provides high sensitivity across the entire region, enabling a more comprehensive and objective assessment of the alignment of the receiving and transmitting optical paths. Furthermore, the combination of multiple indicators allows them to play different roles in different regions, enhancing the stability and robustness of the evaluation and achieving better alignment results.
[0018] In some embodiments, after determining the first target position from N first candidate positions based on the evaluation index of the N frames of first point cloud images, the method further includes: acquiring M frames of second point cloud images collected by the lidar, where M is a positive integer, the M frames of second point cloud images correspond one-to-one with M second candidate positions of the second emitting plate, the M second candidate positions are spaced apart along a second direction, the second direction being perpendicular to the first direction; calculating the evaluation index of the M frames of second point cloud images based on the reflectivity information of the M frames of second point cloud images; and determining the second target position from the M second candidate positions based on the evaluation index of the M frames of second point cloud images.
[0019] The above embodiments find the optimal positions of the first and second transmitters by aligning the transmit and receive paths in the x-axis and y-axis directions of the point cloud.
[0020] Secondly, embodiments of this application provide an electronic device, the electronic device comprising: a memory for storing executable program code; and a processor for calling and running the executable program code from the memory, causing the electronic device to execute the active alignment method of receiving and transmitting optical paths as described in any of the above embodiments.
[0021] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed, implements the active alignment method for receiving and transmitting optical paths described in any of the above embodiments. Attached Figure Description
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0023] Figure 1 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0024] Figure 2 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0025] Figure 3 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0026] Figure 4 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0027] Figure 5 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0028] Figure 6 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0029] Figure 7 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0030] Figure 8 is a flowchart of a method for active alignment of a transmitting and receiving light path provided by an embodiment of the present application;
[0031] Figure 9 is a structural block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present application more clear, the following will further describe the embodiments of the present application in combination with the drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0033] Automated active alignment of a lidar system generally involves three steps: active transmission alignment, active reception alignment, and active transmit / receive alignment. The purpose of active transmit / receive alignment is to align the transmit and receive mappings, achieving a one-to-one correspondence between the transmission and reception areas. For example, by designing an evaluation function to quantitatively assess the size of the point cloud gaps, the degree of transmit / receive alignment can be evaluated relatively quickly and easily, thereby enabling automated optical tuning of the lidar.
[0034] Existing LiDAR optical modulation methods include signal modulation and image modulation. Signal modulation uses the signal amplitude at a single pixel as the criterion for alignment. Because it only acquires a signal from one location at a time, this method is not suitable for flash LiDAR. Image modulation uses an external light source to illuminate the receiving area and observes and adjusts the relative relationship between the emitted light spot and the received image in the rangefinder to achieve optical modulation. This modulation method requires the identification of feature points in the received image and has high requirements for the clarity of the received image, thus also having limitations.
[0035] like Figure 1 As shown in the figure, this application provides an active alignment method for light-emitting paths, applied to a lidar. The lidar includes a first emitting board and a second emitting board. The method includes:
[0036] S100: Acquire N frames of first point cloud images collected by the lidar, where N is a positive integer, and the N frames of first point cloud images correspond one-to-one with the N first candidate positions of the first transmitter, and the N first candidate positions are set at intervals along the first direction.
[0037] The first point cloud image is obtained by the lidar by emitting probe light and receiving the reflected light signal. For example, a flash lidar uses a vertical-cavity surface-emitting laser array as the emission source and a two-dimensional detector array (such as an avalanche photodiode array or a single-photon avalanche diode array) to receive the reflected light signal. Unlike mechanical rotating lidar, which detects point by point, flash lidar acquires the point cloud of the entire field of view at once.
[0038] Specifically, while keeping the position of the second transmitting plate unchanged, the first transmitting plate is translated and traversed along the first direction to obtain N frames of first point cloud images acquired by the lidar when the first transmitting plate is at N first candidate positions. In some embodiments, the first direction is the row direction of the laser array on the first transmitting plate or the column direction of the laser array on the first transmitting plate. In some embodiments, the first direction is a horizontal direction or a vertical direction.
[0039] S200: Calculate the evaluation index of the first point cloud image in N frames based on the reflectance information of the first point cloud image in N frames.
[0040] Specifically, the echo signal of the laser radar can be used to analyze the characteristics of the reflectivity information, and the evaluation method is designed according to the reflectivity information obtained from the first point cloud image.
[0041] S300: determining a first target position from N first candidate positions according to the evaluation index of the N first point cloud images.
[0042] Specifically, the maximum value in the evaluation index of the N first point cloud images is found, and the first candidate position corresponding to the frame of the first point cloud image is determined as the first target position.
[0043] The evaluation index is positively correlated with the alignment degree of the transmitting and receiving light path, so the greater the value of the evaluation index, the better the active alignment effect of the transmitting area and the receiving area. By judging the alignment degree of the transmitting and receiving light path through the evaluation index, the best position of the first emitting plate in the first direction can be determined from the N first candidate positions.
[0044] The above embodiment uses the reflectivity information of the point cloud image as a parameter for evaluating the alignment degree of the transmitting and receiving light path, which is applicable to laser radars of all DTOF systems, and can quickly and simply complete the active alignment of the transmitting and receiving light path of the laser radar, realizing the automatic light adjustment of the laser radar.
[0045] The specific implementation of each step in the embodiment shown in Figure 1 will be described below:
[0046] In some embodiments, as shown in Figure 2 , the implementation of step 200 includes S210 to S220 as follows:
[0047] S210: For each frame of the first point cloud image, the gray value of each point cloud point is obtained according to the reflectivity of each point cloud point of the first point cloud image.
[0048] Reflectivity refers to the proportion of light reflected back to the object surface after the light is incident on the object surface, usually expressed in percentage. Gray value refers to the brightness level of each pixel point in the image. In digital image processing, the gray value is usually represented by an integer from 0 to 255. Among them, 0 represents black, 255 represents white, and the intermediate values represent different levels of gray. Point cloud data itself is usually composed of a series of spatial coordinates (x, y, z) and other additional information (such as intensity, color, reflectivity, timestamp, etc.). For point cloud data collected by laser radar or optical sensors, the gray value is usually used to represent the intensity of the reflected signal received by the sensor. In most LiDAR systems, the gray value of the point cloud corresponds to the reflectivity of each point. In some embodiments, the relationship between reflectivity and gray value is linear, that is, when the reflectivity increases, the gray value also increases accordingly; conversely, when the reflectivity decreases, the gray value also decreases accordingly. Specifically, when the reflectivity is 100%, the gray value is 255; when the reflectivity is 0, the gray value is 0.
[0049] S220: Calculate the evaluation index of the first point cloud image based on the gray value of each point cloud point.
[0050] In some embodiments, as shown in FIG. 2B, the evaluation index is the weighted average gray value, and the implementation of step 220 includes the following S2202 and S2203: Figure 3
[0051] S2201: Calculate the average of the gray values of the point cloud points of the first point cloud image to obtain the average gray value of the first point cloud image.
[0052] The above method takes the average of the gray values corresponding to the reflectivity of the point cloud points in the whole image as the judgment standard for the degree of alignment of the transmitting and receiving light paths, which can simply and effectively reflect the global characteristics and avoid the deviation caused by relying only on local data.
[0053] In some embodiments, as shown in FIG. 2B, the evaluation index is the weighted average gray value, and the implementation of step 220 includes the following S2202 and S2203: Figure 4
[0054] S2202: Obtain the weight value of each point cloud point according to the distance between each point cloud point and the center point of the first point cloud image and the normal distribution function.
[0055] Specifically, the distance from each point cloud point to the center point of the first point cloud image is calculated, and then the normal function is applied to calculate the weight value of each point cloud point. The weight value of the point cloud point decreases with the increase of the distance.
[0056] In some embodiments, the coordinates of the center point of the first point cloud image are the mean of the coordinates of all point cloud points in the first point cloud image, which emphasizes the importance of the central region of the field of view. In other embodiments, the coordinates of the center point of the first point cloud image can be determined according to actual conditions. By defining the center point and weighting sampling the gray values of the point cloud points, the point cloud points located near the center point are given higher weights, which can effectively highlight the region of interest (ROI) and weaken the influence of noise points or irrelevant points away from the center point, thereby improving the accuracy of the local analysis, and the parameters (mean and standard deviation) of the normal distribution function can be adjusted according to specific scenarios, which has high flexibility.
[0057] S2203: Calculate the weighted average gray value of the first point cloud image according to the weight value of each point cloud point and the gray value of each point cloud point.
[0058] Specifically, the weighted average gray value of the first point cloud image is calculated by taking the weight value of each point cloud point as the weight, i.e., the weighted average gray value of the first point cloud image is calculated by taking the weight value of each point cloud point as the weight.
[0059] In some embodiments, as shown in FIG. 22B, the evaluation index is the point cloud gap distance, and the implementation of step 220 includes S2204-S2206 as follows: Figure 5
[0060] S2204: Select L rows of point cloud points in the first point cloud image as the region of interest, where L is a positive integer greater than 1.
[0061] S2205: Sum the gray values of the L rows of point cloud points by column to obtain the gray integral value of each column of point cloud points in the region of interest.
[0062] S2206: Calculate the point cloud gap distance of the first point cloud image according to the first gray threshold and the gray integral value of each column of point cloud points, wherein the first gray threshold is determined according to the gray range of the first point cloud image.
[0063] The above embodiment selects a specified number of point cloud points in the first point cloud image and calculates the gray integral value of each column of point cloud points in the selected region, wherein the gray integral value of a column of point cloud points refers to the sum of the gray values of all point cloud points in the column. By comparing the gray integral value of each column of point cloud points with the preset first gray threshold, it is determined which positions in the first point cloud image have point cloud gaps, and then the point cloud gap distance is calculated according to the positions of the identified point cloud gaps.
[0064] In some embodiments, the implementation of step 2206 includes:
[0065] According to the first gray threshold and the gray integral value of each column of point cloud points, the position of the point cloud gap is obtained.
[0066] According to the position of the point cloud gap, a first point cloud gap and a second point cloud gap are determined from the point cloud gap, wherein the position of the first point cloud gap is in a first region, and the position of the second point cloud gap is in the first region, the first region is a region corresponding to the first emission plate in the first point cloud image, and the second region is a region corresponding to the second emission plate in the first point cloud image.
[0067] A distance between the first point cloud gap and the second point cloud gap is calculated to obtain a point cloud gap interval of the first point cloud image.
[0068] In some embodiments, the position of the point cloud gap is obtained according to the first gray threshold and the gray integral value of each column of point cloud points, and the position of the point cloud gap is determined as the position of the column of point cloud points when the gray integral value of the column of point cloud points is less than the first gray threshold.
[0069] It can be understood that the point cloud gap is a low gray region in the first point cloud image. The first gray threshold can be set according to actual conditions. In an embodiment, the first gray threshold is an average value of gray values of all point cloud points in the first point cloud image. For example, the first gray threshold is 750.
[0070] In some embodiments, the first point cloud gap and the second point cloud gap are determined from the point cloud gap according to the position of the point cloud gap, and the first point cloud gap is determined as a point cloud gap with the smallest distance between the first region and the second emission plate, and the second point cloud gap is determined as a point cloud gap with the smallest distance between the second region and the first emission plate.
[0071] In some embodiments, the point cloud gap interval of the first point cloud image refers to an absolute value of a difference between a horizontal coordinate corresponding to the first point cloud gap and a horizontal coordinate corresponding to the second point cloud gap, or a horizontal distance between the first point cloud gap and the second point cloud gap.
[0072] In one embodiment, the first direction is horizontal. Ten rows of point cloud points in the first point cloud image are selected as the region of interest, for example, rows 67 to 77. The points in these ten rows are summed column-wise to obtain a one-dimensional array, where each element represents the sum of the grayscale values of all point cloud points within that column, i.e., the grayscale integral value of that column. The one-dimensional array is binarized using a first grayscale threshold. Specifically, the grayscale integral value of the point cloud column whose sum of grayscale values is less than the first grayscale threshold is set to 0, and the grayscale integral value of the point cloud column whose sum of grayscale values is greater than the first grayscale threshold is set to 1. The coordinates of all elements with a value of 0 are found, indicating the presence of point cloud gaps at these locations. All point cloud gaps with coordinates located in the first region are filtered out, and the point cloud gap with the largest corresponding x-coordinate value is identified as the first point cloud gap. Similarly, all point cloud gaps with coordinates located in the second region are filtered out, and the point cloud gap with the smallest corresponding x-coordinate value is identified as the second point cloud gap. Calculate the distance between the first point cloud gap and the second point cloud gap, which is the gap spacing of the first point cloud image. For example, if the x-coordinate of the first point cloud gap is 90 and the x-coordinate of the second point cloud gap is 190, then the gap spacing of the first point cloud image is 190-90=100.
[0073] The above embodiment divides each column of point cloud points in the region of interest by applying a first grayscale threshold to the grayscale integral value, and then determines whether a point cloud gap is generated in the column by combining the grayscale threshold, thereby determining the position of the point cloud gap. Then, the gap spacing of the first transmitter plate is calculated based on the position of the point cloud gap. The calculation is low and the running speed is fast, which can effectively reduce noise interference.
[0074] In some embodiments, such as Figure 6 As shown, the evaluation index is a two-dimensional distribution characteristic value, and the implementation of step 220 includes the following steps S2207 to S2210:
[0075] S2207: Select L rows of point cloud points in the first point cloud image as the region of interest, where L is a positive integer greater than 1.
[0076] S2208: Based on the region of interest, calculate the probability density value of the two-dimensional Gaussian distribution corresponding to each point cloud point within the region of interest.
[0077] Specifically, the mean and covariance matrix of a two-dimensional Gaussian distribution are defined. For example, the covariance matrix is a standard normal distribution [[500,0],[0,500]], with no correlation between the x-axis and y-axis directions; the mean is set at the origin [0,0]. Using the defined mean and covariance matrix, the probability density value of the two-dimensional Gaussian distribution corresponding to each point cloud point within the region of interest is calculated.
[0078] S2209: multiplying the gray value of each point cloud point in the region of interest with the corresponding probability density value to obtain a weighted gray value of each point cloud point in the region of interest.
[0079] The weighted value represents the contribution degree of a data point in the entire weighted average. For example, the value of a certain data point is larger and the weight is higher, so its influence on the weighted average value is greater. By taking the probability density of the two-dimensional normal distribution as the weight, more attention can be paid to the central part of the region of interest.
[0080] S2210: summing up the weighted gray values of each point cloud point in the region of interest to calculate the two-dimensional distribution feature value of the first point cloud image.
[0081] Specifically, the two-dimensional distribution feature value is the sum of the weighted gray values of each point cloud point in the region of interest. The weighted average value calculates a representative average value by assigning different weights to different data points. Compared with the ordinary arithmetic average value, the weighted average value can reflect the importance of the position of the point cloud point, and by increasing the weight of the region of interest, a better light path active alignment effect is achieved.
[0082] The above embodiment analyzes the gray scale characteristics of a specific image region by the two-dimensional normal distribution weighting method, and the calculated two-dimensional distribution feature value can effectively reflect the gray scale distribution characteristics of the region of interest. The method is efficient and universal, which is conducive to highlighting the central region of the field of view, reducing the influence of edge noise, and enhancing the robustness of the algorithm.
[0083] In some embodiments, as shown in FIG. 22B, the evaluation index is the target evaluation function value, and the implementation manner of step 220 includes S2211-S2214 as follows: Figure 7
[0084] S2211: selecting L rows of point cloud points in the first point cloud image as the region of interest, wherein L is a positive integer greater than 1;
[0085] S2212: obtaining the point cloud gap spacing of the first point cloud image according to the gray value of each point cloud point in the region of interest and the first gray threshold, wherein the first gray threshold is determined according to the gray scale range of the first point cloud image;
[0086] S2213: obtaining the two-dimensional distribution feature value of the first point cloud image according to the gray value of each point cloud point in the region of interest and the Gaussian probability density function;
[0087] S2214: calculating the target evaluation function value of the first point cloud image according to the point cloud gap spacing and the two-dimensional distribution feature value of the first point cloud image.
[0088] It can be understood that the specific implementation of step 2212 and the specific implementation of step S2213 are similar to the above-mentioned embodiments, and will not be repeated here.
[0089] The point cloud gap spacing and the two-dimensional distribution feature value are both judgment criteria for evaluating the state of the point cloud, and are positively correlated with the state of the point cloud. Therefore, the two evaluation indexes can be combined into a function form through a weight value, and serve as evaluation indexes of the point cloud together.
[0090] In one embodiment, the first evaluation function Y = A + WB; wherein A is the two-dimensional distribution feature value of the first point cloud image, B is the point cloud gap spacing of the first point cloud image, and W is a self-defined weight value. For example, A = 75, B = 100, and W = 0.125, then the first evaluation function Y = 75 + 0.125 * 100 = 87.5.
[0091] Combining the two evaluation indexes can obtain more information and has high sensitivity to the whole area, so that the degree of alignment of the transmitting and receiving light paths can be more comprehensively and objectively evaluated. At the same time, the combination of multiple indexes can play different roles in different areas, improving the stability and robustness of the evaluation. Each index in the evaluation function can be assigned a weight according to the specific alignment requirements, which is conducive to paying more attention to more important aspects and achieving better alignment effect of the transmitting and receiving light paths.
[0092] In some embodiments, as shown in FIG. 3, after step 300, method 10 further includes: Figure 8
[0093] S400: Obtain M frames of second point cloud images collected by the laser radar, wherein M is a positive integer, the M frames of second point cloud images correspond one-to-one to M second candidate positions of the second emitting plate, and the M second candidate positions are arranged at intervals along a second direction perpendicular to the first direction.
[0094] S500: Calculate evaluation indexes of the M frames of second point cloud images according to reflectivity information of the M frames of second point cloud images.
[0095] S600: Determine a second target position from the M second candidate positions according to the evaluation indexes of the M frames of second point cloud images.
[0096] It can be understood that the transmitting and receiving light paths need to be aligned in both the X-axis and Y-axis directions of the point cloud, steps 100 to 300 complete alignment of the transmitting and receiving mapping relationship in one direction, and steps 400 to 600 complete alignment of the transmitting and receiving mapping relationship in the other direction, so the specific implementation of steps 400 to 600 can refer to the above-mentioned embodiments. The order of X-axis transmitting and receiving alignment and Y-axis transmitting and receiving alignment is not limited.
[0097] In some embodiments, the evaluation index of the M-frame second point cloud image is calculated according to the reflectivity information of the M-frame second point cloud image, including: for each second point cloud image, obtaining a gray value of each point cloud point in the second point cloud image according to the reflectivity of each point cloud point in the second point cloud image; and calculating the evaluation index of the second point cloud image based on the gray values of the point cloud points in the second point cloud image.
[0098] In some embodiments, the evaluation index is an average gray value, and the evaluation index of the second point cloud image is calculated based on the gray values of the point cloud points in the second point cloud image, including: calculating an average value of the gray values of the point cloud points in the second point cloud image to obtain the average gray value of the second point cloud image.
[0099] In some embodiments, the evaluation index is a weighted average gray value, and the evaluation index of the second point cloud image is calculated based on the gray values of the point cloud points in the second point cloud image, including: obtaining a weight value of each point cloud point according to a distance between each point cloud point and a center point of the second point cloud image and a normal distribution function; and calculating a weighted average gray value of the second point cloud image according to the weight value of each point cloud point and the gray value of each point cloud point.
[0100] In some embodiments, the evaluation index is a point cloud gap distance, and the evaluation index of the second point cloud image is calculated based on the gray values of the point cloud points, including: selecting R columns of point cloud points in the second point cloud image as a region of interest, where R is a positive integer greater than 1; summing the gray values of the R columns of point cloud points by row to obtain a gray integral value of each row of point cloud points in the region of interest; and calculating the point cloud gap distance of the second point cloud image according to a second gray threshold and the gray integral value of each row of point cloud points, where the second gray threshold is determined according to a gray range of the second point cloud image.
[0101] In some embodiments, the evaluation index is a two-dimensional distribution feature value, and the evaluation index of the second point cloud image is calculated based on the gray values of the point cloud points, including: selecting R columns of point cloud points in the second point cloud image as a region of interest, where R is a positive integer greater than 1; calculating a probability density value of a two-dimensional Gaussian distribution corresponding to each point cloud point in the region of interest based on the region of interest; multiplying the gray value of each point cloud point in the region of interest by the corresponding probability density value to obtain a weighted gray value of each point cloud point in the region of interest; and summing the weighted gray values of the point cloud points in the region of interest to calculate the two-dimensional distribution feature value of the second point cloud image.
[0102] In some embodiments, the evaluation index is a second evaluation function value, and the evaluation index of the second point cloud image is calculated based on the gray value of each point cloud point, including: selecting R column point cloud points in the second point cloud image as a region of interest, where R is a positive integer greater than 1; obtaining a point cloud gap spacing of the second point cloud image according to the gray value of each point cloud point in the region of interest and a second gray threshold, where the second gray threshold is determined according to the gray range of the second point cloud image; obtaining a two-dimensional distribution feature value of the second point cloud image according to the gray value of each point cloud point in the region of interest and a Gaussian probability density function; and calculating the second evaluation function value of the second point cloud image according to the point cloud gap spacing and the two-dimensional distribution feature value of the second point cloud image.
[0103] The above embodiments ensure that the optical element maintains high precision during installation, the position and angle are optimized, and optical errors are reduced, which helps to improve the performance and reliability of the entire system. In addition, the active alignment technology of the transmitting and receiving light path can realize automatic adjustment, reduce manual intervention, and improve production efficiency.
[0104] The active alignment method of the transmitting and receiving light path provided by the present application can analyze the reflectivity information of the laser radar signal, and can design an evaluation function according to the reflectivity information to judge the alignment degree of the transmitting and receiving to complete the active alignment of the laser radar transmitting and receiving, thereby meeting the automatic light adjustment requirement of the laser radar.
[0105] The present application also provides an electronic device 2, please refer to Figure 9 , Figure 9 is a hardware structure schematic diagram of an electronic device 2 provided by the present application. As Figure 9 shown, the electronic device 2 includes at least one processor 201 and memory 202 connected in communication (for example, one processor is taken as an example) connected by a bus. Figure 9
[0106] The processor 201 is configured to provide computing and control capabilities to control the electronic device 2 to perform the transceiver optical path active alignment method in any of the above method embodiments. In some embodiments, the processor 201 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0107] The memory 202 is a non-transitory computer readable storage medium, which can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the motor speed fluctuation measurement method in the embodiments of the present application. The processor 201 can implement the transceiver optical path active alignment method in any of the above method embodiments by running the non-transitory software programs, instructions and modules stored in the memory 202. In some embodiments, the memory 202 can include a volatile memory (VM), such as a random access memory (RAM); the memory 202 can also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or other non-transitory solid-state storage devices; the memory 202 can also include a combination of the above types of memories. In some embodiments, the memory 202 can also include remotely located memories relative to the processor, which can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0108] Obviously, those skilled in the art should understand that each module or each step of the above-mentioned embodiments can be realized by a general computing device, which can be centralized on a single computing device or distributed on a network composed of multiple computing devices. In some embodiments, each module or each step of the above-mentioned embodiments can be realized by program codes executable by a computing device, so that each module or each step can be stored in a storage device and executed by a computing device. In some embodiments, each module or each step of the above-mentioned embodiments can be respectively manufactured into each integrated circuit module, or multiple modules or steps of them can be manufactured into a single integrated circuit module. In the description of the embodiments of the present application, "module", "processor / control device" can include hardware, software or a combination of both. A module can include hardware circuit, various suitable sensors, communication ports, memories, and can also include a software part such as program codes, and can be a combination of software and hardware. The processor / control device can be a central processor, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor / control device has data and / or signal processing functions.
[0109] The embodiments of the present application also provide a computer readable storage medium, which stores computer program codes, and when the computer program codes are run on a computer, the computer executes the above-mentioned related method steps and realizes any one of the active alignment methods of the transmitting and receiving light paths provided by the above-mentioned embodiments. The computer readable medium includes any entity or device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, such as U disk, mobile hard disk, magnetic disk or optical disk, etc., which can carry computer program codes to a photographing device / electronic device.
[0110] The embodiments of the present application also provide a computer program product, which, when run on a computer, makes the computer execute the above-mentioned related steps to realize an active alignment method of the transmitting and receiving light paths provided by the above-mentioned embodiments.
[0111] In the embodiments of the present application, the computer readable storage medium, the computer program product or the chip are used to execute the corresponding methods provided above, so the beneficial effects achieved by them can refer to the beneficial effects of the corresponding methods provided above, which will not be described here.
[0112] In the description of the present application, it needs to be understood that the terms "first", "second" and the like are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. The association relationship of the associated objects is described, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship.
[0113] It should be noted that the above-described workflow is only illustrative and does not limit the scope of protection of the present application. In actual application, those skilled in the art can select part or all of them according to actual needs to achieve the purpose of the embodiment scheme, which is not limited here. In addition, in this paper, the terms "include", "contain" or any other variant are intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the sentence "including a…" does not exclude the existence of other identical elements in the process, method, article or system including the element. Unless otherwise defined, all technical and scientific terms used in this paper have the same meaning as understood by those skilled in the art of the technology to which the present application belongs.
[0114] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields based on the content of the present application specification and drawings, are also included in the patent protection scope of the present application.
Claims
1. A method for actively aligning light-receiving paths, characterized in that, Applied to a lidar system, the lidar system comprising a first emitting board and a second emitting board, the method includes: Acquire N frames of first point cloud images collected by the lidar, where N is a positive integer. The N frames of first point cloud images correspond one-to-one with N first candidate positions of the first emitting plate. The N first candidate positions are spaced apart along a first direction. Based on the reflectance information of the N frames of the first point cloud image, calculate the evaluation index of the N frames of the first point cloud image; Based on the evaluation metrics of the N frames of the first point cloud image, the first target location is determined from the N first candidate locations.
2. The method as described in claim 1, characterized in that, The step of calculating the evaluation index of the N frames of the first point cloud image based on the reflectance information of the first point cloud image includes: For each frame of the first point cloud image, the gray value of each point cloud point is obtained based on the reflectance of each point cloud point in the first point cloud image; The evaluation index of the first point cloud image is calculated based on the gray value of each point cloud point.
3. The method as described in claim 2, characterized in that, The evaluation metric is the average gray value. The calculation of the evaluation metric for the first point cloud image based on the gray value of each point cloud point includes: Calculate the average gray value of the point cloud points in the first point cloud image to obtain the average gray value of the first point cloud image.
4. The method as described in claim 2, characterized in that, The evaluation metric is a weighted average gray value. The calculation of the evaluation metric for the first point cloud image based on the gray value of each point cloud point includes: The weight of each point cloud point is obtained based on the distance between each point cloud point and the center point of the first point cloud image and the normal distribution function; The weighted average gray value of the first point cloud image is calculated based on the weight of each point cloud point and the gray value of each point cloud point.
5. The method as described in claim 2, characterized in that, The evaluation metric is the gap spacing in the point cloud. The calculation of the evaluation metric for the first point cloud image based on the grayscale value of each point cloud point includes: Select L rows of point cloud points in the first point cloud image as the region of interest, where L is a positive integer greater than 1; The grayscale values of the L rows of point cloud points are summed column-wise to obtain the grayscale integral value of each column of point cloud points within the region of interest. The point cloud gap spacing of the first point cloud image is calculated based on the first gray level threshold and the gray level integral value of each column of point cloud points, wherein the first gray level threshold is determined based on the gray level range of the first point cloud image.
6. The method as described in claim 2, characterized in that, The evaluation index is a two-dimensional distribution feature value. The calculation of the evaluation index for the first point cloud image based on the grayscale value of each point cloud point includes: Select L rows of point cloud points in the first point cloud image as the region of interest, where L is a positive integer greater than 1; Based on the region of interest, calculate the probability density value of the two-dimensional Gaussian distribution corresponding to each point cloud point within the region of interest; Multiply the gray value of each point cloud point in the region of interest by the corresponding probability density value to obtain the weighted gray value of each point cloud point in the region of interest; The weighted gray values of each point cloud point within the region of interest are summed to calculate the two-dimensional distribution feature value of the first point cloud image.
7. The method as described in claim 2, characterized in that, The evaluation index is the value of a first evaluation function. The calculation of the evaluation index for the first point cloud image based on the grayscale value of each point cloud point includes: Select L rows of point cloud points in the first point cloud image as the region of interest, where L is a positive integer greater than 1; The point cloud gap spacing of the first point cloud image is obtained based on the gray value of each point cloud point in the region of interest and a first gray value threshold, wherein the first gray value threshold is determined based on the gray value range of the first point cloud image. Based on the gray value and Gaussian probability density function of each point cloud point within the region of interest, the two-dimensional distribution feature value of the first point cloud image is obtained; The first evaluation function value of the first point cloud image is calculated based on the point cloud gap spacing and two-dimensional distribution feature value of the first point cloud image.
8. The method as described in claim 1, characterized in that, After determining the first target location from N first candidate locations based on the evaluation metrics of the N frames of the first point cloud images, the method further includes: The M frames of second point cloud images collected by the lidar are acquired, where M is a positive integer. The M frames of second point cloud images correspond one-to-one with the M second candidate positions of the second emitting plate. The M second candidate positions are spaced apart along a second direction, which is perpendicular to the first direction. Based on the reflectance information of the M-frame second point cloud image, calculate the evaluation index of the M-frame second point cloud image; Based on the evaluation metrics of the M-frame second point cloud images, the second target location is determined from the M second candidate locations.
9. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the electronic device to perform the active alignment method of the receiver and receiver optical paths as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the active alignment method for receiving and transmitting optical paths as described in any one of claims 1 to 8.