Point cloud target identification method and device, electronic equipment and storage medium
By using the target template image and mask image for traversal matching in laser point cloud data processing, the accuracy and stability of target recognition in the prior art are solved, a more efficient and economical recognition process is achieved, and the application scenario of recognition technology is expanded.
Patent Information
- Application Number
- CN202411741329.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-28
AI Technical Summary
In the existing laser point cloud data processing, the control point target recognition technology has problems such as limited scenario applicability, high cost, complex identification process, low accuracy, poor recognition accuracy and high labor costs.
By obtaining the target template image, mask image and point cloud data to be identified in the target scene, the template image and mask image are used for traversal matching, and the optimal plane position and elevation estimates of the target are determined, simplifying the recognition process and improving accuracy.
It improves the accuracy and stability of target recognition, reduces the identification cost and labor cost, simplifies the identification process, and expands the scenario applicability of the identification technology.
Smart Images

Figure CN119723014A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of point cloud data processing, and discloses a point cloud target recognition method and device, an electronic device, and a storage medium. Background Art
[0002] LiDAR is a laser detection and ranging system that can actively observe the earth and obtain object coordinate information to generate laser point cloud data. Due to its high angular resolution and strong anti-interference ability, it has been widely used in remote sensing data detection, topographic mapping and 3D reconstruction, and has broad application prospects. Control point targets have many important uses in point cloud data processing, such as point cloud registration, equipment calibration, point cloud accuracy verification, etc. By using control point targets, the accuracy, reliability and availability of point cloud data processing can be significantly improved, thereby achieving better results in various application scenarios.
[0003] In the existing laser point cloud data processing, there are three main ways to identify control point targets. One is to use a highly reflective spherical target for a stand-mounted laser radar scanner. The algorithm automatically searches and fits the target sphere center, and uses the sphere center as the same-name point for multi-station data splicing. However, due to the limitation of the spherical radius, the spherical target is not suitable for airborne point cloud data processing. Another is to use a high-precision positioning system for airborne laser radar scanners to identify targets with complex special shapes, but this method is costly and complicated to use. Currently, circular, square checkerboard and other planar targets with high reflectivity are commonly used. This method has low target production costs. The target position is found in the point cloud data by the human eye, and then the position of the target center point is determined according to the contrast of the point cloud reflection intensity on the target. However, due to the discrete sampling characteristics of the laser point cloud, the planar position of the target center point cannot be accurately measured, resulting in errors between the determined target position and its true position. The sparser the laser points, the greater the error. In addition, due to the limitation of the human eye's ability to recognize the contrast of the target point cloud, the target center cannot be well located, thereby introducing new measurement errors.
[0004] In summary, target recognition technology has the defects of limited scenario applicability, high cost, complex recognition process, low accuracy, poor recognition accuracy stability and high labor cost. Summary of the invention
[0005] The present disclosure at least provides a point cloud target recognition method and device, electronic device, and storage medium to improve scene applicability, reduce recognition cost and labor cost, simplify the recognition process, and improve recognition accuracy and stability.
[0006] According to one aspect of the present disclosure, a point cloud target recognition method is provided, comprising:
[0007] Acquire a template image of a target set in a target scene, a mask image corresponding to each template image, and point cloud data to be identified containing the target; the template image is a two-dimensional image;
[0008] The template image and the mask image are used as a template image group;
[0009] In the case where the target is of the first preset type, the template image is rotated according to the angle sampling interval, and the rotated image is scaled according to the scaling coefficient sampling interval to obtain a plurality of first target image groups; wherein one first target image group includes the rotated and scaled template image and the mask image;
[0010] In the case where the target is of the second preset type, scaling the template image according to the scaling coefficient sampling interval to obtain multiple groups of second target image groups; wherein one second target image group includes the scaled template image and the mask image;
[0011] Determining an intensity image of the point cloud data to be identified;
[0012] Each group of third target image groups is used to perform traversal matching in the intensity image, and the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold is used as the optimal plane position of the target; wherein the third target image group includes: the first target image group or the second target image group; and the template image group;
[0013] The laser points are searched with the optimal plane position of the target as the center and the preset length as the radius; the mean and standard deviation of the elevation values of all the searched laser points are determined, and the preset multiple of the standard deviation is used as the limit difference; the laser points whose absolute value of the difference between the elevation value and the mean is greater than the limit difference are eliminated; and the mean of the elevation values of the remaining laser points is used as the estimated value of the optimal elevation of the target.
[0014] In a possible implementation manner, the first preset type includes a non-circular target type;
[0015] The second preset type includes a circular target type;
[0016] The scaling factor is less than or equal to 2 times of the preset approximate size of the target; the scaling factor is greater than or equal to 0.5 times of the preset approximate size of the target.
[0017] In a possible implementation, the step of using each group of third target images to perform traversal matching in the intensity image includes:
[0018] For each group of third target image groups, the relevance of the third target image group at the current position is determined by using the pixel value of the template image at each pixel in the third target image group, the pixel value of the mask image at each pixel in the third target image group, the pixel value of the intensity image at each pixel, the intensity mean of the intensity image, and the mean of the effective pixel values of the template image.
[0019] In a possible implementation manner, the mean effective pixel value of the template image is determined in the following manner:
[0020] The effective pixel value mean of the template image is determined by using the pixel value of each pixel of the template image in the third target image group and the pixel value of each effective pixel of the mask image in the third target image group.
[0021] In a possible implementation manner, determining the intensity image of the point cloud data to be identified includes:
[0022] Projecting all points in the point cloud data to be identified onto a projection plane to obtain a two-dimensional point cloud;
[0023] For each point in the two-dimensional point cloud, calculate the average of the distances from the point to the N points closest to it, and obtain the plane distance corresponding to the point; wherein N is a positive integer;
[0024] Calculating the average of the plane distances of each point in the projection plane to obtain the resolution of the intensity image;
[0025] Using the resolution as a grid size, the two-dimensional point cloud is grid-segmented;
[0026] For each grid, the average intensity or maximum intensity of the points in the grid is taken as the intensity of the grid to obtain the intensity image.
[0027] In a possible implementation, the template image may be pre-generated in the following manner:
[0028] Determine the resolution of the intensity image;
[0029] Determine the size of the template image according to the preset approximate size corresponding to the resolution and target type;
[0030] According to the target type, the pixel value of each pixel point corresponding to the black part of the target in the template image is set to 0, and the pixel value of each pixel point corresponding to the white part of the target in the template image is set to 255;
[0031] Among them, when the target type is a concentric circle type, the concentric circle radius is determined according to the preset approximate size corresponding to the resolution and the target type; the pixel value of the pixel point whose distance to the center point of the template image is less than half of the concentric circle radius is set to 255, and the pixel value of the pixel point whose distance to the center point of the template image is greater than half of the concentric circle radius is set to 0.
[0032] In a possible implementation, the mask image may be pre-generated in the following manner:
[0033] Setting the size of the mask image to be the same as the corresponding template image;
[0034] For a target of the concentric circle type, an area in the mask image whose distance to the center point of the mask image is less than the radius of the concentric circle is set as a valid area, and the pixel value of the pixel point in the valid area is set to 1; an area in the mask image whose distance to the center point of the mask image is greater than the radius of the concentric circle is set as an invalid area, and the pixel value of the pixel point in the invalid area is set to 0;
[0035] For a square checkerboard type mask image and a triangle type mask image, the pixel values of all pixels in the mask image are set to 1.
[0036] According to another aspect of the present disclosure, a point cloud target recognition device is provided, comprising:
[0037] A data acquisition module is used to acquire a template image of a target set in a target scene, a mask image corresponding to each template image, and point cloud data to be identified containing the target; the template image is a two-dimensional image;
[0038] A template processing module, used to use the template image and the mask image as a template image group; when the target is of the first preset type, the template image is rotated according to the angle sampling interval, and the rotated image is scaled according to the scaling factor sampling interval to obtain multiple groups of first target image groups; wherein one first target image group includes the template image and the mask image after the rotation and scaling processing; when the target is of the second preset type, the template image is scaled according to the scaling factor sampling interval to obtain multiple groups of second target image groups; wherein one second target image group includes the template image and the mask image after the scaling processing;
[0039] An intensity projection module, used to determine the intensity image of the point cloud data to be identified;
[0040] A template matching module, for performing traversal matching in the intensity image using each third target image group respectively, and taking the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold as the target optimal plane position; wherein the third target image group includes: the first target image group or the second target image group; and the template image group;
[0041] The elevation estimation module is used to search for laser points with the optimal plane position of the target as the center and a preset length as the radius; determine the mean and standard deviation of the elevation values of all the searched laser points, and use the preset multiple of the standard deviation as the limit difference; eliminate the laser points whose absolute value of the difference between the elevation value and the mean is greater than the limit difference; and use the mean of the elevation values of the remaining laser points as the optimal elevation estimate of the target.
[0042] According to another aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements any of the above methods when executing the computer program.
[0043] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned methods is implemented.
[0044] The point cloud target recognition method and device, electronic device, and storage medium disclosed in the present invention project point cloud data into an intensity image, then use a plane-type template image and a mask image to traverse and match on the intensity image, and use the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold as the optimal plane position of the target, finally perform laser point search based on the optimal plane position of the target, eliminate abnormal laser points obtained by the search, and use the average of the elevation values of the remaining laser points as the optimal elevation estimate of the target. The above-mentioned scheme uses plane-type template images and mask images to obtain not only the optimal plane position estimate of the target, but also the optimal elevation estimate. Compared with the costly and complex three-dimensional target recognition, it is low-cost, easy to use and easy to promote; at the same time, the above-mentioned scheme of the present invention adopts an automated target detection method to obtain the optimal plane position estimate. Compared with the traditional manual method of searching for targets in point cloud data, the efficiency is greatly improved, and there is no need to manually identify and select the center position of the point cloud on the target, avoiding the problem of large point selection errors caused by the sparsity of the point cloud, and greatly improving the accuracy and stability of target identification; in addition, the present invention can use pre-generated template images of different types of targets during the recognition process, that is, it can identify multiple types of targets, effectively improving the scenario applicability of the target recognition scheme.
[0045] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0047] Figure 1 is a flow chart of a point cloud target recognition method according to the present disclosure;
[0048] Figure 2 is a schematic diagram of a target according to the present disclosure;
[0049] Figure 3 is another flow chart of the point cloud target recognition method according to the present disclosure;
[0050] Figure 4 is a schematic diagram of the structure of a point cloud target recognition device according to the present disclosure;
[0051] Figure 5 is a schematic structural diagram of an electronic device according to the present disclosure. DETAILED DESCRIPTION
[0052] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0053] In view of the defects of current target recognition technology, such as limited scene applicability, high cost, complex recognition process, low accuracy, poor stability of recognition accuracy and high labor cost, the present invention proposes a point cloud target recognition method and device, electronic device and storage medium. The present invention projects point cloud data into an intensity image, then uses a plane-type template image and a mask image to perform traversal matching on the intensity image, and takes the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold as the optimal plane position of the target, and finally performs a laser point search based on the optimal plane position of the target, removes abnormal laser points obtained by the search, and takes the average of the elevation values of the remaining laser points as the optimal elevation estimate of the target. The above-mentioned scheme uses plane-type template images and mask images to obtain not only the optimal plane position estimate of the target, but also the optimal elevation estimate. Compared with the costly and complex three-dimensional target recognition, it is low-cost, easy to use and easy to promote; at the same time, the above-mentioned scheme of the present invention adopts an automated target detection method to obtain the optimal plane position estimate. Compared with the traditional manual method of searching for targets in point cloud data, the efficiency is greatly improved, and there is no need to manually identify and select the center position of the point cloud on the target, avoiding the problem of large point selection errors caused by the sparsity of the point cloud, and greatly improving the accuracy and stability of target identification; in addition, the present invention can use pre-generated template images of different types of targets during the recognition process, that is, it can identify multiple types of targets, effectively improving the scenario applicability of the target recognition scheme.
[0054] The technical solution of the present disclosure is described below through specific embodiments.
[0055] like Figure 1 As shown, it is a flow chart of the point cloud target recognition method of this embodiment. The execution subject of this embodiment is a computing device or component with data processing capability. The specific method of this embodiment may include the following steps:
[0056] S110, acquiring a template image of a target set in a target scene, a mask image corresponding to each template image, and point cloud data to be identified containing the target; the template image is a two-dimensional image.
[0057] Generally, only one target is set in a scene, and the template image obtained here is a template image corresponding to the target set in the target scene.
[0058] The above template image and its corresponding mask image are pre-generated and are both two-dimensional plane images. The pixel values in the mask image are used to represent the valid area and invalid area in the template image.
[0059] S120: Use the template image and the corresponding mask image as a template image group.
[0060] The mask image is generated based on the template image and is used to represent the valid area and the invalid area in the template image. Here, the template image and its corresponding mask image are regarded as a set of images.
[0061] S130. When the target is of the first preset type, the template image is rotated according to the angle sampling interval, and the rotated image is scaled according to the scaling factor sampling interval to obtain a plurality of first target image groups; wherein a first target image group includes a template image and a mask image after rotation and scaling; when the target is of the second preset type, the template image is scaled according to the scaling factor sampling interval to obtain a plurality of second target image groups; wherein a second target image group includes a template image and a mask image after scaling.
[0062] The first preset type includes non-circular target types, such as square checkerboard, triangle and other target types. The scaling factor is less than or equal to 2 times the preset approximate size of the target; the scaling factor is greater than or equal to 0.5 times the preset approximate size of the target. The preset approximate size is preset based on experience.
[0063] For non-circular targets, since the target may appear at any angle on the intensity image and the actual size is unknown, the template image and mask image of the non-circular target need to be rotated and scaled equally to adapt to the situation that the target may appear in the point cloud at different angles and scales. The sampling value of the rotation angle and the sampling value of the scale scaling factor are set according to the specific situation. The smaller the sampling interval, the finer the template image, but the search time will be increased. Generally, 2 degrees is used as the angle sampling interval, 0.2 is used as the scaling factor sampling interval, and the maximum is not more than 2 times the preset approximate size, and the minimum is not less than 0.5 times the preset approximate size.
[0064] The second preset type includes a circular target type, and the template image of this type of target only needs to be scaled.
[0065] S140: Determine the intensity image of the point cloud data to be identified.
[0066] Since the target is made of high reflectivity material, it has high intensity and contrast in the point cloud data. After converting the point cloud data into an intensity image, the image template matching algorithm can be used for target recognition and positioning. The intensity image calculation requires determining the resolution and intensity values, which can be determined using the following steps:
[0067] Step 1: Project all points in the point cloud data to be identified onto a projection plane to obtain a two-dimensional point cloud. For each point in the two-dimensional point cloud, calculate the average of the distances between the point and its nearest N points to obtain the plane distance corresponding to the point; where N is a positive integer. Calculate the average of the plane distances of each point in the projection plane to obtain the resolution of the intensity image.
[0068] Specifically, all laser points in the point cloud data to be identified can be projected onto the XY plane, and the average distance between each point in the XY plane and the five nearest points around it can be calculated as the plane distance between the point and its adjacent points. The mean of the average plane distances between all points and their adjacent points can be calculated as the resolution of the intensity image.
[0069] Step 2: Using the resolution as the grid size, the two-dimensional point cloud is grid-segmented; for each grid, the average intensity or maximum intensity of the points in the grid is used as the intensity of the grid to obtain the intensity image.
[0070] Specifically, the resolution may be used as the grid size, all laser points in the grid may be searched, and the average intensity or maximum intensity of all laser points in the grid may be used as the intensity of the grid.
[0071] S150, using each group of third target image groups to perform traversal matching in the intensity image, and taking the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold as the optimal plane position of the target; wherein the third target image group includes: the first target image group or the second target image group; and, the template image group.
[0072] This step performs target search, that is, uses the template image and the mask image to perform traversal matching in the intensity image. When the correlation between the template image and the area to be matched reaches the specified threshold and the correlation is maximum, the match is successful, and the position of the center point of the template image in the area to be matched is used as the plane position of the target, that is, the optimal plane position of the target mentioned above. Common image template matching methods include square difference matching, correlation matching, normalized correlation matching, cross correlation, normalized cross correlation, etc. Since the intensity of the target in the point cloud data has different intensity value ranges due to different measurement distances, angles, and laser equipment types, the normalized correlation matching algorithm is more suitable. The result is between 0 and 1. The larger the value, the better the match and the greater the correlation. This method can be applied to point cloud data matching in different scenarios and different laser equipment types.
[0073] S160, searching for laser points with the optimal plane position of the target as the center and a preset length as the radius; determining the mean and standard deviation of the elevation values of all the searched laser points, and taking a preset multiple of the standard deviation as the limit; eliminating the laser points whose absolute value of the difference between the elevation value and the mean is greater than the limit; taking the mean of the elevation values of the remaining laser points as the estimated value of the optimal elevation of the target.
[0074] The above-mentioned preset length is half of the preset approximate size of the target, and the preset approximate size is recorded as L.
[0075] Specifically, let the optimal plane position of the target be (x, y), and take the position (x, y) as the center, and search all laser points within the range with a radius of L / 2. For example, the number of laser points searched is n, and the elevation value set of all laser points within the radius is Ω = {z i |i=1,2,...,n}, due to the high reflectivity of the target, there may be outliers in the elevation value set Ω. The gross error elimination method is used, and the three times of the standard deviation of the elevation values of all laser points are used as the limit error. The laser points whose absolute value of the difference between the elevation value and the mean is greater than the limit error are eliminated, and the set Γ={z i |i=1,2,...,k}, find the average value of all points in the set Γ The best estimate of the target's elevation.
[0076] In some embodiments, the above-mentioned use of each group of third target images to perform traversal matching in the intensity image can be specifically implemented by the following steps:
[0077] For each group of third target image groups, the relevance of the third target image group at the current position is determined by using the pixel value of the template image at each pixel in the third target image group, the pixel value of the mask image at each pixel in the third target image group, the pixel value of the intensity image at each pixel, the intensity mean of the intensity image, and the mean of the effective pixel values of the template image.
[0078] The normalized correlation matching calculation formula introduced into the mask image is as follows:
[0079]
[0080] I(x,y): pixel value of the intensity image at pixel coordinate (x,y);
[0081] T(x,y): pixel value of the template image at pixel coordinates (x,y);
[0082] M(x,y): pixel value of the mask image at pixel coordinate (x,y);
[0083] The intensity mean of the intensity image,
[0084] The mean effective pixel value of the template image,
[0085] NCC(T,I) is the result value of normalized correlation matching, that is, the above correlation, and its value range is between [-1,1].
[0086] The effective pixel value mean of the above template image can be determined in the following way:
[0087] The effective pixel value mean of the template image is determined by using the pixel value of each pixel of the template image in the third target image group and the pixel value of each effective pixel of the mask image in the third target image group. The specific formula is as follows:
[0088] in It is the sum of all non-zero pixel values in the mask image, that is, the sum of the pixel values of the mask image in the effective area.
[0089] The so-called mask image is actually used to determine the valid range of the template image (because invalid areas will appear on the template image after rotation). The mask image has been introduced in the above formula; the mask image is used to determine whether the pixel value in the template image is used in the calculation. If the pixel value of the mask image corresponding to the (x, y) position is 0, that is, M(x, y) is 0, that is, I(x, y) and T(x, y) in the formula do not contribute to the calculation of the correlation coefficient.
[0090] In some embodiments, common styles of planar targets include square checkerboards, concentric circles, and triangles. After the target type is determined, a corresponding template image can be generated according to the target type. The preset approximate size is the approximate size of the target in the laser point cloud, which is used to determine the size of the template image. Different target styles are as follows: Figure 2 shown.
[0091] The target type and preset approximate size are a priori information provided by the data collector. The targets are manually arranged in the measurement area by the data collector. In order to better control the measurement accuracy, multiple targets of the same type are generally arranged at different locations in the measurement area.
[0092] Specifically, the template image can be pre-generated as follows:
[0093] Step 1: Determine the resolution of the intensity image.
[0094] The resolution here may be the resolution of the intensity image generated by the point cloud data to be identified, or a preset resolution.
[0095] Step 2: Determine the size of the template image based on the preset approximate size corresponding to the resolution and target type.
[0096] Assuming the resolution of the intensity image is α and the preset approximate size of the target is L, the width and height of the template image are both L / α pixels.
[0097] Step 3: According to the target type, the pixel value of each pixel point corresponding to the black part of the target in the template image is set to 0, and the pixel value of each pixel point corresponding to the white part of the target in the template image is set to 255.
[0098] Among them, when the target type is a concentric circle type, the concentric circle radius is determined according to the preset approximate size corresponding to the resolution and the target type; the pixel value of the pixel point whose distance to the center point of the template image is less than half of the concentric circle radius is set to 255, and the pixel value of the pixel point whose distance to the center point of the template image is greater than half of the concentric circle radius is set to 0.
[0099] Specifically, the radius of the concentric circle is r=L / 2α pixels. On the template image, when the pixel distance from each pixel point to the center point of the image is less than r / 2, the pixel value is set to 255, and when it is greater than or equal to r / 2, the pixel value is set to 0.
[0100] This embodiment generates a binary target template image according to the target type and the preset approximate size, and sets the pixel value of each pixel point corresponding to the black part of the target in the template image to 0, and sets the pixel value of each pixel point corresponding to the white part of the target in the template image to 255.
[0101] In some embodiments, the mask image may be pre-generated as follows:
[0102] Step 1: Set the size of the mask image to be the same as the corresponding template image.
[0103] Step 2: For targets of the concentric circle type, the area in the mask image whose distance to the center point of the mask image is less than the radius of the concentric circle is set as a valid area, and the pixel values of the pixels in the valid area are set to 1; the area in the mask image whose distance to the center point of the mask image is greater than the radius of the concentric circle is set to an invalid area, and the pixel values of the pixels in the invalid area are set to 0.
[0104] Step 3: For the square checkerboard type mask image and the triangle type mask image, the pixel values of all pixels in the mask image are set to 1.
[0105] The mask image is used to determine the valid area of the corresponding template image. For example, in the mask image, if the pixel value of the 10th row and 10th column is 1, it means that the pixel value of the 10th row and 10th column of the corresponding template image is a valid value and will participate in the correlation coefficient calculation, otherwise it will not participate in the calculation.
[0106] Since the target has a high reflectivity and a high intensity in the point cloud data, the point cloud data is projected into an intensity image, and the target is identified by image template matching. Considering the scale and rotation changes of the target, the target search is performed at different scales and rotation angles, and the center position of the template image with the highest matching degree is taken as the target center. For concentric circular targets, only the scale change is considered, and there is no need to consider the effect of the rotation angle on target identification; for non-circular targets, the effect of the rotation angle and scale on target identification needs to be considered. The process is as follows: Figure 3 As shown:
[0107] The template image and the mask image corresponding to the template image are rotated in angle and scaled in scale; the rotated and scaled template image, mask image and original template image are used to perform traversal matching on the intensity image of the point cloud data to be identified. Specifically, the correlation can be determined by normalized correlation matching, and the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold is used as the optimal plane position of the target.
[0108] Based on the same inventive concept, the present disclosure provides a point cloud target recognition device, the steps performed by the components of the device are the same or similar to the above method, so similar parts are not repeated. Figure 4 As shown, the point cloud target recognition device of this embodiment includes:
[0109] The data acquisition module 410 is used to acquire the template image of the target set in the target scene, the mask image corresponding to each template image, and the point cloud data to be identified containing the target; the template image is a two-dimensional image.
[0110] The template processing module 420 is used to use the template image and the mask image as a template image group; when the target is of the first preset type, the template image is rotated according to the angle sampling interval, and the rotated image is scaled according to the scaling factor sampling interval to obtain multiple groups of first target image groups; wherein one first target image group includes the rotated and scaled template image and the mask image; when the target is of the second preset type, the template image is scaled according to the scaling factor sampling interval to obtain multiple groups of second target image groups; wherein one second target image group includes the scaled template image and the mask image.
[0111] The intensity projection module 430 is used to determine the intensity image of the point cloud data to be identified.
[0112] The template matching module 440 is used to use each group of third target image groups to perform traversal matching in the intensity image, and take the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold as the optimal plane position of the target; wherein the third target image group includes: the first target image group or the second target image group; and, the template image group.
[0113] The elevation estimation module 450 is used to search for laser points with the optimal plane position of the target as the center and a preset length as the radius; determine the mean and standard deviation of the elevation values of all the searched laser points, and use the preset multiple of the standard deviation as the limit difference; eliminate the laser points whose absolute value of the difference between the elevation value and the mean is greater than the limit difference; and use the mean of the elevation values of the remaining laser points as the optimal elevation estimation value of the target.
[0114] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a computer-readable storage medium.
[0115] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0116] like Figure 5 As shown, the device 500 includes a computing unit 510, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 520 or a computer program loaded from a storage unit 580 into a random access memory (RAM) 530. In the RAM 530, various programs and data required for the operation of the device 500 can also be stored. The computing unit 510, the ROM 520, and the RAM 530 are connected to each other via a bus 540. An input / output (I / O) interface 550 is also connected to the bus 540.
[0117] A number of components in the device 500 are connected to the I / O interface 550, including: an input unit 560, such as a keyboard, a mouse, etc.; an output unit 570, such as various types of displays, speakers, etc.; a storage unit 580, such as a disk, an optical disk, etc.; and a communication unit 590, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 590 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0118] The computing unit 510 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 510 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 510 performs the various methods and processes described above. For example, in some embodiments, any of the above methods may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 580. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via ROM520 and / or communication unit 590. When the computer program is loaded into RAM530 and executed by the computing unit 510, one or more steps of any of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 510 may be configured to perform any of the methods described above in any other appropriate manner (e.g., by means of firmware).
[0119] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0121] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0123] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0124] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0126] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A point cloud target recognition method, characterized in that: include: Acquire template images of targets set in the target scene, mask images corresponding to each template image, and point cloud data to be identified containing the targets; The template image is a two-dimensional image; The template image and the mask image are used as a template image group; In the case where the target is of the first preset type, the template image is rotated according to the angle sampling interval, and the rotated image is scaled according to the scaling coefficient sampling interval to obtain a plurality of first target image groups; wherein one first target image group includes the rotated and scaled template image and the mask image; In the case where the target is of the second preset type, scaling the template image according to the scaling coefficient sampling interval to obtain multiple groups of second target image groups; wherein one second target image group includes the scaled template image and the mask image; Determining an intensity image of the point cloud data to be identified; Each group of third target image groups is used to perform traversal matching in the intensity image, and the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold is used as the optimal plane position of the target; wherein the third target image group includes: the first target image group or the second target image group; and the template image group; The laser points are searched with the optimal plane position of the target as the center and the preset length as the radius; the mean and standard deviation of the elevation values of all the searched laser points are determined, and the preset multiple of the standard deviation is used as the limit difference; the laser points whose absolute value of the difference between the elevation value and the mean is greater than the limit difference are eliminated; and the mean of the elevation values of the remaining laser points is used as the estimated value of the optimal elevation of the target.
2. The method according to claim 1, characterized in that The first preset type includes a non-circular target type; The second preset type includes a circular target type; The scaling factor is less than or equal to 2 times of the preset approximate size of the target; the scaling factor is greater than or equal to 0.5 times of the preset approximate size of the target.
3. The method according to claim 1, characterized in that The step of using each group of third target images to perform traversal matching in the intensity image comprises: For each group of third target image groups, the relevance of the third target image group at the current position is determined by using the pixel value of the template image at each pixel in the third target image group, the pixel value of the mask image at each pixel in the third target image group, the pixel value of the intensity image at each pixel, the intensity mean of the intensity image, and the mean of the effective pixel values of the template image.
4. The method according to claim 3, characterized in that The effective pixel value mean of the template image is determined in the following manner: The effective pixel value mean of the template image is determined by using the pixel value of each pixel of the template image in the third target image group and the pixel value of each effective pixel of the mask image in the third target image group.
5. The method according to claim 1, characterized in that The step of determining the intensity image of the point cloud data to be identified comprises: Projecting all points in the point cloud data to be identified onto a projection plane to obtain a two-dimensional point cloud; For each point in the two-dimensional point cloud, calculate the average of the distances from the point to the N points closest to the point, and obtain the plane distance corresponding to the point; wherein N is a positive integer; Calculating the average of the plane distances of each point in the projection plane to obtain the resolution of the intensity image; Using the resolution as a grid size, the two-dimensional point cloud is grid-segmented; For each grid, the average intensity or maximum intensity of the points in the grid is taken as the intensity of the grid to obtain the intensity image.
6. The method according to claim 1, characterized in that The template image can be pre-generated in the following manner: Determine the resolution of the intensity image; Determine the size of the template image according to the preset approximate size corresponding to the resolution and target type; According to the target type, the pixel value of each pixel point corresponding to the black part of the target in the template image is set to 0, and the pixel value of each pixel point corresponding to the white part of the target in the template image is set to 255; Among them, when the target type is a concentric circle type, the concentric circle radius is determined according to the preset approximate size corresponding to the resolution and the target type; the pixel value of the pixel point whose distance to the center point of the template image is less than half of the concentric circle radius is set to 255, and the pixel value of the pixel point whose distance to the center point of the template image is greater than half of the concentric circle radius is set to 0.
7. The method according to claim 6, characterized in that The mask image can be pre-generated in the following manner: Setting the size of the mask image to be the same as the corresponding template image; For a target of the concentric circle type, an area in the mask image whose distance to the center point of the mask image is less than the radius of the concentric circle is set as a valid area, and a pixel value of a pixel point in the valid area is set to 1; Setting an area in the mask image whose distance to the center point of the mask image is greater than the radius of the concentric circle as an invalid area, and setting the pixel values of the pixels in the invalid area to 0; For a square checkerboard type mask image and a triangle type mask image, the pixel values of all pixels in the mask image are set to 1.
8. A point cloud target recognition device, characterized in that: include: A data acquisition module is used to acquire a template image of a target set in a target scene, a mask image corresponding to each template image, and point cloud data to be identified containing the target; the template image is a two-dimensional image; A template processing module, used for taking the template image and the mask image as a template image group; In the case where the target is of the first preset type, the template image is rotated according to the angle sampling interval, and the rotated image is scaled according to the scaling factor sampling interval to obtain multiple groups of first target image groups; wherein one first target image group includes the template image and the mask image after the rotation and scaling processing; in the case where the target is of the second preset type, the template image is scaled according to the scaling factor sampling interval to obtain multiple groups of second target image groups; wherein one second target image group includes the template image and the mask image after the scaling processing; An intensity projection module, used to determine the intensity image of the point cloud data to be identified; A template matching module, for performing traversal matching in the intensity image using each third target image group respectively, and taking the position of the center point of the template image in the intensity image when the correlation is maximum and greater than a preset threshold as the target optimal plane position; wherein the third target image group includes: the first target image group or the second target image group; and the template image group; The elevation estimation module is used to search for laser points with the optimal plane position of the target as the center and a preset length as the radius; determine the mean and standard deviation of the elevation values of all the searched laser points, and use the preset multiple of the standard deviation as the limit difference; eliminate the laser points whose absolute value of the difference between the elevation value and the mean is greater than the limit difference; and use the mean of the elevation values of the remaining laser points as the optimal elevation estimation value of the target.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.