Point cloud sampling method and device, electronic equipment and storage medium
By scaling, approximating and data splicing of point cloud data, determining the characteristic values of the sampling points, solving the problems of large amount of point cloud sampling and low efficiency in the prior art, and achieving efficient point cloud sampling.
Patent Information
- Application Number
- CN202311151898.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-07
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art has a large amount of computing, consumes a lot of computing resources, and is relatively inefficient during point cloud sampling.
By scaling, approximating and data splicing the multi-dimensional original coordinate values of the collected points in the original point cloud data, the characteristic values of the collected points are obtained, and when there is no matching sampling point, it is determined as the target sampling point.
This reduces the amount of computing in the point cloud sampling process, saves computing resources, and improves point cloud sampling efficiency.
Smart Images

Figure CN119624763A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a point cloud sampling method, device, electronic device and storage medium. Background Art
[0002] Point cloud sampling method is a method of selecting a representative point cloud subset from the original point cloud data, aiming to reduce the point cloud scale and computational complexity while retaining the geometric information of the original point cloud as much as possible. There are two main types of point cloud sampling algorithms: offline point cloud sampling algorithms and online point cloud sampling algorithms. Point cloud sampling methods in the prior art may include voxel grid-based point cloud sampling methods, incremental farthest point sampling, and octree-based point cloud sampling methods. Based on these existing point cloud sampling methods, a large amount of calculation is required when performing point cloud sampling, which consumes a lot of computing resources, and the point cloud sampling efficiency is low. Summary of the invention
[0003] The technical problem to be solved by the present application is to provide a point cloud sampling method, device, electronic device and storage medium, which can reduce the amount of calculation in the point cloud sampling process, save computing resources and improve the efficiency of point cloud sampling.
[0004] In order to solve the above technical problems, on the one hand, the present application provides a point cloud sampling method, including:
[0005] Acquire original point cloud data obtained by performing point cloud data collection on the target scene; the original point cloud data includes original coordinate values of the collection points in multiple dimensions;
[0006] Performing data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain scaled coordinate values of the acquisition points in multiple dimensions; the unit distance in the scaled point cloud space is consistent with the unit distance in the mathematical coordinate system; the scaled point cloud space is the point cloud space corresponding to the scaled coordinate values of the acquisition points in multiple dimensions;
[0007] Approximately processing the scaled coordinate values of the acquisition points in multiple dimensions to obtain approximate coordinate values of the acquisition points in multiple dimensions;
[0008] Performing data splicing processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain characteristic values of the collection points;
[0009] In the case that there is no matching sampling point corresponding to the collection point, the collection point is determined as a target sampling point; the matching sampling point is at least one sampling point among the existing sampling points, and a feature value of the matching sampling point is consistent with a feature value of the collection point.
[0010] On the other hand, the present application provides a point cloud sampling device, comprising:
[0011] The original data acquisition module is used to acquire the original point cloud data obtained by collecting point cloud data of the target scene; the original point cloud data includes the original coordinate values of the collection points in multiple dimensions;
[0012] A data scaling module is used to perform data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain the scaled coordinate values of the acquisition points in multiple dimensions; the unit distance in the scaled point cloud space is consistent with the unit distance in the mathematical coordinate system; the scaled point cloud space is the point cloud space corresponding to the scaled coordinate values of the acquisition points in multiple dimensions;
[0013] A data approximation module, used for approximating the scaled coordinate values of the acquisition points in multiple dimensions to obtain approximate coordinate values of the acquisition points in multiple dimensions;
[0014] A data splicing module, used for performing data splicing processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain the characteristic values of the collection points;
[0015] A sampling point determination module is used to determine the collection point as a target sampling point when there is no matching sampling point corresponding to the collection point; the matching sampling point is at least one sampling point among the existing sampling points, and the feature value of the matching sampling point is consistent with the feature value of the collection point.
[0016] On the other hand, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the point cloud sampling method as described above.
[0017] On the other hand, the present application provides a computer storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded by a processor and executes the point cloud sampling method as described above.
[0018] Implementing the embodiments of the present application has the following beneficial effects:
[0019] The present application performs data scaling processing on the original coordinate values of the acquisition points in multiple dimensions in the original point cloud data to obtain the scaled coordinate values of the acquisition points in multiple dimensions; performs approximate processing on the scaled coordinate values in multiple dimensions to obtain the approximate coordinate values of the acquisition points in multiple dimensions; through the approximate processing, similar scaled coordinate values can be approximated to the same approximate coordinate values, thereby facilitating the determination of subsequent sampling points; further, data splicing processing is performed based on the approximate coordinate values of the acquisition points in multiple dimensions to obtain the characteristic values of the acquisition points, and in the absence of matching sampling points corresponding to the acquisition points, it can be determined that the acquisition points can be determined as target sampling points. Therefore, in the process of sampling point cloud data in the present application, there is no need to perform complex calculations, but point cloud sampling is achieved through data operations such as data scaling, data approximation, and data splicing, thereby reducing the amount of calculation in the point cloud sampling process, saving computing resources, and improving the efficiency of point cloud sampling. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a schematic diagram of the implementation environment provided by the embodiment of the present application;
[0022] Figure 2 is a flow chart of a point cloud sampling method provided in an embodiment of the present application;
[0023] Figure 3 This is a flow chart of a point cloud sampling method based on rounding processing provided in an embodiment of the present application;
[0024] Figure 4 is a flow chart of a data stitching method for approximate coordinate values provided in an embodiment of the present application;
[0025] Figure 5 is a flow chart of a characteristic value comparison method provided in an embodiment of the present application;
[0026] Figure 6 is a flow chart of a method for determining a target sampling point provided in an embodiment of the present application;
[0027] Figure 7 is a flow chart of a point cloud sampling algorithm provided in an embodiment of the present application;
[0028] Figure 8 It is a schematic diagram of a point cloud sampling application scenario provided in an embodiment of the present application;
[0029] Fig. 9 is a schematic diagram of a point cloud sampling device provided in an embodiment of the present application;
[0030] Fig.10 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0031] Fig.11 This is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] To make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] See also Figure 1 , which shows a schematic diagram of the implementation environment provided by an embodiment of the present application, the implementation environment may include: a point cloud data acquisition terminal 110, a data sampling terminal 120 and a business terminal 130, the point cloud data acquisition terminal 110 and the data sampling terminal 120, the data sampling terminal 120 and the business terminal 130 can communicate data through the network.
[0035] The point cloud data collection terminal 110 can collect point cloud data of the target scene to obtain raw point cloud data, and then send the raw point cloud data to the data sampling terminal 120; the point cloud data collection terminal 110 can specifically include laser radar, binocular camera, depth camera and other equipment.
[0036] The data sampling end 120 can receive the original point cloud data sent by the point cloud data acquisition end 110, perform point cloud sampling based on the original point cloud data, and obtain the target sampling point; send the point cloud data corresponding to the target sampling point to the business end 130; the data sampling end can include an independently running server, or a distributed server, or a server cluster composed of multiple servers, wherein the server can be a cloud server.
[0037] The service end 130 can receive the point cloud data corresponding to the target sampling point sent by the data sampling end 120, analyze the target scene based on the point cloud data corresponding to the target sampling point, and obtain the scene analysis result. The service end 130 may include: physical devices such as smart phones, tablet computers, laptops, digital assistants, smart wearable devices, vehicle terminals, servers, etc., and may also include software running in physical devices, such as applications, etc. The operating system running on the service end 130 in the embodiment of the present application may include but is not limited to Android system, IOS system, Linux, Windows, etc.
[0038] In order to solve the problem in the prior art that a large amount of calculations need to be performed when performing point cloud sampling, a large amount of computing resources need to be consumed, and the point cloud sampling efficiency is low, the embodiment of the present application provides a point cloud sampling method, and the execution subject of the method can be the above-mentioned data sampling end. Specifically, please refer to Figure 2 , the method may include:
[0039] S210. Acquire original point cloud data obtained by collecting point cloud data of the target scene; the original point cloud data includes original coordinate values of the collected points in multiple dimensions.
[0040] The main features of point cloud data are high-precision, high-resolution and high-dimensional geometric information, which can intuitively represent the shape, surface and texture of objects in space. The target scene can refer to the scene where point cloud data collection is required. Specifically, in the field of autonomous driving technology, the target scene can be the vehicle's surrounding environment information; in the map construction scene, the target scene can be the geographical environment information; in the field of three-dimensional reconstruction technology, the target scene can be the object to be reconstructed that needs to be reconstructed in three dimensions; in the field of object recognition technology, the target scene can be the object to be recognized that needs to be recognized, etc. Therefore, the corresponding original point cloud data can be the data obtained by collecting point cloud data for the vehicle's surrounding environment information, the data obtained by collecting point cloud data for geographical environment information, the data obtained by collecting point cloud data for the object to be reconstructed, or the data obtained by collecting point cloud data for the object to be recognized.
[0041] In this embodiment, the original coordinate values of the collection points in multiple dimensions may specifically include the original coordinate values of the collection points in three dimensions, so that the spatial distribution characteristics of the collection points in three-dimensional space can be represented by the three-dimensional original coordinate values of the collection points; the original coordinate values of the collection points in multiple dimensions may specifically include the original coordinate values of the collection points in higher dimensions, so that the spatial distribution characteristics of the collection points in higher-dimensional space can be represented by the higher-dimensional original coordinate values of the collection points, and the higher dimension here may be a dimension greater than three.
[0042] Furthermore, the original coordinate values of the collection points in multiple dimensions are matched with the corresponding point cloud collection devices, that is, when different point cloud collection devices are used to collect point cloud data for the same target scene, the original point cloud data obtained by different point cloud collection devices are different.
[0043] S220. Perform data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain scaled coordinate values of the acquisition points in multiple dimensions; the unit distance in the scaled point cloud space is consistent with the unit distance in the mathematical coordinate system; the scaled point cloud space is the point cloud space corresponding to the scaled coordinate values of the acquisition points in multiple dimensions.
[0044] In this embodiment, the original coordinate values of the acquisition points in multiple dimensions can be subjected to corresponding data scaling processing respectively, and the scaling ratio of the original coordinate values in each dimension can be the same, that is, the same scaling factor can be used to perform data scaling processing on the original coordinate values in multiple dimensions respectively. Through the data scaling processing, the unit distance in the point cloud space can be standardized, that is, the unit distance in the scaled point cloud space is made consistent with the unit distance in the mathematical coordinate system, thereby facilitating subsequent unified standardized data processing and improving the convenience of data processing.
[0045] S230. Approximate the scaled coordinate values of the acquisition points in multiple dimensions to obtain approximate coordinate values of the acquisition points in multiple dimensions.
[0046] The scaled coordinate values of different acquisition points in multiple dimensions may be numerically similar. For the sake of data sampling, by approximating the scaled coordinate values, similar scaled coordinate values can be approximated to the same coordinate value, so that one of the different sampling points with the same approximate coordinate value can be selected as the sampling point.
[0047] In this embodiment, the scaled coordinate values of the acquisition points in multiple dimensions may be integers or floating-point numbers; when the scaled coordinate values are integers, after approximation, the number of digits of the approximate coordinate value of any dimension may be equal to the number of digits of the scaled coordinate value of the dimension; when the scaled coordinate values are floating-point numbers, after approximation, the number of digits of the approximate coordinate value of any dimension may be less than the number of digits of the scaled coordinate value of the dimension. That is, when the scaled coordinate value is an integer, the number of digits of the coordinate value may not be changed after approximation, for example, if the scaled coordinate value is 201 and the approximate coordinate value is 200, the number of digits of the scaled coordinate value 201 and the approximate coordinate value 200 are both 3; when the scaled coordinate value is an integer, the integer coordinate value may not be approximated. When the scaled coordinate value is a floating point number, one or more decimal places can be reduced so that the number of decimal places of the approximate coordinate value after approximation is smaller than the number of decimal places of the scaled coordinate value before approximation. For example, if the scaled coordinate value is 200.41 and the approximate coordinate value is 200.4, the number of decimal places of the scaled coordinate value 200.41 is 5, and the number of decimal places of the approximate coordinate value 200.4 is 4; for another example, if the scaled coordinate value is 200.41 and the approximate coordinate value is 200, the number of decimal places of the scaled coordinate value 200.41 is 5, and the number of decimal places of the approximate coordinate value 200 is 3.
[0048] S240. Perform data splicing processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain feature values of the collection points.
[0049] When the approximate coordinate values of the collection point in multiple dimensions are determined, the approximate coordinate values of the multiple dimensions can be spliced according to a preset dimensional order. For example, if the multiple dimensions include a first dimension, a second dimension...an nth dimension, then the approximate coordinate values corresponding to the first dimension, the approximate coordinate values corresponding to the second dimension...the approximate coordinate values corresponding to the nth dimension can be spliced in sequence according to the arrangement order of the first dimension, the second dimension...the nth dimension to obtain the characteristic value of the collection point; or the approximate coordinate values corresponding to the nth dimension, the approximate coordinate values corresponding to the n-1th dimension...the approximate coordinate values corresponding to the first dimension can be spliced in sequence according to the arrangement order of the nth dimension, the n-2th dimension...the first dimension to obtain the characteristic value of the collection point; or the splicing order of each dimension can be changed for splicing to obtain the characteristic value of the collection point.
[0050] Specifically, when performing data splicing processing on approximate values of multiple dimensions, the approximate coordinate values of the acquisition points in multiple dimensions may be directly numerically spliced, or the approximate values of multiple dimensions may be processed in data format and then the processed approximate values may be spliced.
[0051] S250. If there is no matching sampling point corresponding to the collection point, determine the collection point as a target sampling point; the matching sampling point is at least one sampling point among the existing sampling points, and the feature value of the matching sampling point is consistent with the feature value of the collection point.
[0052] In this embodiment, the determined existing sampling points may be included in the target sampling point set, which may include feature values of the existing sampling points, approximate coordinate values of the existing sampling points, etc.; or the determined existing sampling points may also be included in a hash list, which may include feature values of the existing sampling points, approximate coordinate values of the existing sampling points, etc.
[0053] Thus, the characteristic value of the collection point can be matched with the characteristic value of the existing sampling point. When no matching sampling point is found in the target sampling point set or in the hash list, it means that there is no existing sampling point with the same characteristic value as the collection point. The current collection point can be determined as the target sampling point, and the characteristic value of the target sampling point and the approximate coordinate value of the target sampling point can be added to the corresponding target sampling point set or hash list.
[0054] The present application performs data scaling processing on the original coordinate values of the acquisition points in multiple dimensions in the original point cloud data to obtain the scaled coordinate values of the acquisition points in multiple dimensions; performs approximate processing on the scaled coordinate values in multiple dimensions to obtain the approximate coordinate values of the acquisition points in multiple dimensions; through the approximate processing, similar scaled coordinate values can be approximated to the same approximate coordinate values, thereby facilitating the determination of subsequent sampling points; further, data splicing processing is performed based on the approximate coordinate values of the acquisition points in multiple dimensions to obtain the characteristic values of the acquisition points, and in the absence of matching sampling points corresponding to the acquisition points, it can be determined that the acquisition points can be determined as target sampling points. Therefore, in the process of sampling point cloud data in the present application, there is no need to perform complex calculations, but point cloud sampling is achieved through data operations such as data scaling, data approximation, and data splicing, thereby reducing the amount of calculation in the point cloud sampling process, saving computing resources, and improving the efficiency of point cloud sampling.
[0055] According to the above content, the acquired original point cloud data needs to be processed by data scaling to obtain scaled coordinate values that meet the data processing standards; when performing data scaling, the original coordinate values of the acquisition points in multiple dimensions can be scaled based on the target scaling factor, and the target scaling factor here can vary with the point cloud data acquisition mode. Accordingly, the original coordinate values of the acquisition points in multiple dimensions are processed by data scaling to obtain the scaled coordinate values of the acquisition points in multiple dimensions, including:
[0056] Determining a target scaling factor corresponding to the original point cloud data based on a point cloud data acquisition mode for the target scene;
[0057] Data scaling processing is performed on the original coordinate values of the acquisition points in multiple dimensions based on the target scaling coefficients to obtain scaled coordinate values of the acquisition points in multiple dimensions.
[0058] In this embodiment, when performing point cloud collection on the target scene, different point cloud data collection methods can be used. Different point cloud data collection methods can correspond to different point cloud data collection modes. The point cloud data collection modes may include image collection mode, radar collection mode, etc. In the image collection mode, the corresponding target scaling factor can be determined based on the point cloud generation algorithm. In the radar collection mode, the corresponding target scaling factor can be based on a preset radar sampling interval.
[0059] In the field of image-based 3D reconstruction technology, it is assumed that the camera parameter information corresponding to the first image has been calculated in the camera parameter estimation stage, and based on this information, the function of reversely projecting the pixel coordinates (u, v) on the first image to the point cloud generation space is F(u, v) = [X, Y, Z], [X, Y, Z] is the spatial coordinate value of (u, v) corresponding to the point cloud generation space, then the calculation process of the target scaling factor can be expressed as:
[0060] α=1.0 / dist(F(u+offset,v)-F(u,v)) (1)
[0061] dist represents the Euclidean distance between two points in space, and offset is the size of the unit distance in the point cloud generation space in pixel coordinates, that is, the value of offset needs to be determined in advance according to the characteristics of the point cloud generation algorithm.
[0062] In the field of radar-based 3D reconstruction technology, the units of point cloud coordinate values obtained by radar-based point cloud scanning are usually known, usually meters, centimeters or millimeters. Therefore, once the point cloud sampling interval is determined, the target scaling factor can be quickly obtained. For example, assuming that the sampling interval set before scanning is δ, the point cloud scaling factor can be calculated to be 1.0 / δ.
[0063] Specifically, if the original three-dimensional coordinates of the acquisition point are (x i ,y i , z i ), the target scaling factor is α, and accordingly, the unit coordinates of the acquisition points are scaled using the following formula:
[0064]
[0065] To collect the three-dimensional scaled coordinate values of the points, the coordinate scaling transformation aims to ensure that a unit distance value in the point cloud generation space is equal to the unit 1 on the mathematical coordinates.
[0066] Therefore, in different point cloud data acquisition modes, the corresponding target scaling factor determination method is also different, that is, each point cloud acquisition mode has a target scaling factor determination method adapted thereto, thereby achieving adaptive determination of the target scaling factor and improving the accuracy of the target scaling factor determination.
[0067] When approximating the scaled coordinate values of the acquisition points in multiple dimensions, this can be achieved based on rounding. Figure 3 , which shows a point cloud sampling method based on rounding processing, which may include:
[0068] S310. Acquire original point cloud data obtained by collecting point cloud data of the target scene; the original point cloud data includes original coordinate values of the collected points in multiple dimensions.
[0069] In this embodiment, the original coordinate values of the collection points in multiple dimensions may specifically include the original coordinate values of the collection points in three dimensions, so that the spatial distribution characteristics of the collection points in three-dimensional space can be represented by the three-dimensional original coordinate values of the collection points; the original coordinate values of the collection points in multiple dimensions may specifically include the original coordinate values of the collection points in higher dimensions, so that the spatial distribution characteristics of the collection points in higher-dimensional space can be represented by the higher-dimensional original coordinate values of the collection points, and the higher dimension here may be a dimension greater than three.
[0070] Furthermore, the original coordinate values of the collection points in multiple dimensions are matched with the corresponding point cloud collection devices, that is, when different point cloud collection devices are used to collect point cloud data for the same target scene, the original point cloud data obtained by different point cloud collection devices are different.
[0071] S320. Perform data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain scaled coordinate values of the acquisition points in multiple dimensions; the unit distance in the scaled point cloud space is consistent with the unit distance in the mathematical coordinate system; the scaled point cloud space is the point cloud space corresponding to the scaled coordinate values of the acquisition points in multiple dimensions.
[0072] In this embodiment, the original coordinate values of the acquisition points in multiple dimensions can be subjected to corresponding data scaling processing respectively, and the scaling ratio of the original coordinate values in each dimension can be the same, that is, the same scaling factor can be used to perform data scaling processing on the original coordinate values in multiple dimensions respectively. Through the data scaling processing, the unit distance in the point cloud space can be standardized, that is, the unit distance in the scaled point cloud space is made consistent with the unit distance in the mathematical coordinate system, thereby facilitating subsequent unified standardized data processing and improving the convenience of data processing.
[0073] S330. Rounding the scaled coordinate values of the acquisition points in multiple dimensions to obtain integer coordinate values of the acquisition points in multiple dimensions.
[0074] The scaled coordinate values of the collection points in multiple dimensions are rounded to obtain integer coordinate values of the collection points in multiple dimensions; the integer coordinate values of the collection points in multiple dimensions are determined as approximate coordinate values of the collection points in multiple dimensions, that is, the approximate coordinate values of the collection points in multiple dimensions can specifically be integer coordinate values of the collection points in multiple dimensions.
[0075] The rounding method in this embodiment may include rounding, rounding up, rounding down and direct rounding, wherein the direct rounding method is to directly take the integer part of the scaled coordinate value as the arithmetical coordinate value and remove the decimal part of the scaled coordinate value.
[0076] Taking the rounding method as an example, the three-dimensional scaled coordinate value of the acquisition point is Then the three-dimensional integer coordinates of the collection point are:
[0077]
[0078] Among them, Round represents the rounding function.
[0079] S340. Perform data splicing processing based on the integer coordinate values of the collection points in multiple dimensions to obtain characteristic values of the collection points.
[0080] When the integer coordinate values of the acquisition points in multiple dimensions are obtained, splicing processing can be performed based on the integer coordinate values; the data splicing method here can refer to the above step S240, which will not be repeated here.
[0081] S350. If there is no matching sampling point corresponding to the collection point, determine the collection point as a target sampling point; the matching sampling point is at least one sampling point among the existing sampling points, and the feature value of the matching sampling point is consistent with the feature value of the collection point.
[0082] In this embodiment, the determined existing sampling points may be included in the target sampling point set, which may include feature values of the existing sampling points, approximate coordinate values of the existing sampling points, etc.; or the determined existing sampling points may also be included in a hash list, which may include feature values of the existing sampling points, approximate coordinate values of the existing sampling points, etc.
[0083] Thus, the characteristic value of the collection point can be matched with the characteristic value of the existing sampling point. When no matching sampling point is found in the target sampling point set or in the hash list, it means that there is no existing sampling point with the same characteristic value as the collection point. The current collection point can be determined as the target sampling point, and the characteristic value of the target sampling point and the approximate coordinate value of the target sampling point can be added to the corresponding target sampling point set or hash list.
[0084] When approximating the scaled coordinate values of the acquisition points in multiple dimensions, this can be achieved by rounding, so that the storage memory required for the obtained integer coordinate values is smaller, thereby saving storage space.
[0085] Considering the numerical accuracy of the approximate coordinate value after the approximate processing, in this embodiment, when performing the approximate processing, one or more decimal places of the scaled coordinate value can be retained. The higher the accuracy of the required approximate coordinate value, the more decimal places the corresponding approximate coordinate value after the approximation; conversely, the fewer decimal places the approximate coordinate value after the approximation; and the more decimal places the approximate coordinate value after the approximation has, the more corresponding sampling points there are. The number of decimal places of the approximate coordinate value can be preset as the target digit, and the target digit is greater than or equal to 1, that is, it includes the first digit, ... the target digit in sequence after the decimal point. Specifically, when performing the approximate processing, the decimals of the first target digit of the scaled coordinate value can be directly retained, and the decimal digits after the target digit can be discarded to obtain the approximate coordinate value; or the approximate coordinate value can be obtained by rounding based on the value of the last digit of the target data.
[0086] In an example, the data types of the scaled coordinate values of the sampling points in multiple dimensions may be different. For example, the scaled coordinate values of some dimensions are of integer type, and the scaled coordinate values of some dimensions are of floating-point type. The scaled coordinate values of integer type can be directly retained without being approximated. The scaled coordinate values of floating-point type can be approximated by rounding or retaining the decimal part of the target digit.
[0087] For more details, please refer to the data splicing method for approximate coordinate values. Figure 4 , the method may include:
[0088] S410. Perform character string conversion on the approximate coordinate values of the collection point in multiple dimensions respectively, to obtain character string data corresponding to the multiple dimensions of the collection point respectively.
[0089] When performing string conversion, the approximate value of each dimension can be used as a conversion object separately, so that string data corresponding to multiple dimensions can be obtained, that is, one collection point can correspond to multiple string data. When performing string conversion, the numerical value on each digit of the approximate value of each dimension can be used as a conversion object separately, so that string data corresponding to each digit of the approximate coordinate value of multiple dimensions can be obtained. In the case where the approximate coordinate values of the collection point in multiple dimensions are integer coordinate values, the integer coordinate values of the collection point in multiple dimensions can be converted into strings separately.
[0090] The string conversion function can be implemented using str. Taking the approximate value of each dimension as a conversion object, the approximate coordinate value can be converted into a string to obtain str(r), str(s), and str(t). For example, the three-dimensional approximate coordinate value of the acquisition point is r=77, s=-19, and t=520, and the corresponding string data is "77", "-19", and "520".
[0091] S420. Perform string concatenation on the string data corresponding to the multiple dimensions of the collection point to obtain a character feature value.
[0092] When the approximate coordinate values of the collection point in multiple dimensions are determined, the approximate coordinate values of the multiple dimensions can be spliced according to a preset dimensional order. For example, if the multiple dimensions include a first dimension, a second dimension...an nth dimension, then the approximate coordinate values corresponding to the first dimension, the approximate coordinate values corresponding to the second dimension...the approximate coordinate values corresponding to the nth dimension can be spliced in sequence according to the arrangement order of the first dimension, the second dimension...the nth dimension to obtain the characteristic value of the collection point; or the approximate coordinate values corresponding to the nth dimension, the approximate coordinate values corresponding to the n-1th dimension...the approximate coordinate values corresponding to the first dimension can be spliced in sequence according to the arrangement order of the nth dimension, the n-2th dimension...the first dimension to obtain the characteristic value of the collection point; or the splicing order of each dimension can be changed for splicing to obtain the characteristic value of the collection point.
[0093] For example, by splicing in the order of the first dimension, the second dimension, ... the nth dimension, the character string data "77", "-19" and "520" can be spliced into "77-19520", so that the character feature value of the collection point is "77-19520".
[0094] S430. Determine the character feature value as the feature value of the collection point.
[0095] The above-mentioned character feature value can be determined as the feature value of the collection point, that is, the feature value of the collection point is the feature value in the form of a character.
[0096] By converting the approximate coordinate values of the collection points in multiple dimensions into character strings, corresponding character string data is obtained, and the character string data is concatenated to obtain the characteristic value of the collection point. In the computer execution process, the relevant operation of the character string is relatively fast and convenient, so in this embodiment, by converting the approximate coordinate values of the collection points into character string data, and concatenating the character string data, the characteristic value of the collection point is obtained, which can improve the efficiency of characteristic value calculation.
[0097] Furthermore, data splicing processing is performed based on the approximate coordinate values of the collection points in multiple dimensions to obtain the characteristic values of the collection points, including:
[0098] Numerically concatenating the integer coordinate values of the acquisition points in multiple dimensions to obtain integer eigenvalues;
[0099] The integer eigenvalue is determined as the eigenvalue of the acquisition point.
[0100] After rounding the scaled coordinate values of the acquisition points in multiple dimensions to obtain the integer coordinate values of the acquisition points in multiple dimensions, the integer coordinate values of the acquisition points in multiple dimensions can be directly numerically spliced. Specifically, the approximate coordinate values of multiple dimensions can be data spliced in accordance with a preset dimensional order. For example, if the multiple dimensions include a first dimension, a second dimension, ... an nth dimension, then the approximate coordinate values corresponding to the first dimension, the approximate coordinate values corresponding to the second dimension, ... the approximate coordinate values corresponding to the nth dimension can be sequentially spliced in accordance with the arrangement order of the first dimension, the second dimension, ... the nth dimension to obtain the characteristic value of the acquisition point; or the approximate coordinate values corresponding to the nth dimension, the approximate coordinate values corresponding to the n-1th dimension, ... the approximate coordinate values corresponding to the first dimension can be sequentially spliced in accordance with the arrangement order of the nth dimension, the n-2th dimension, ... the first dimension to obtain the characteristic value of the acquisition point; or the splicing order of each dimension can be changed for splicing to obtain the characteristic value of the acquisition point.
[0101] When the integer coordinate values of the collection points in multiple dimensions are determined, the integer coordinate values are directly concatenated without performing other operations before the numerical concatenation, so that the characteristic values of the collection points can be obtained, thereby improving the calculation efficiency of the characteristic values of the collection points and saving the calculation resources required for calculating the characteristic values of the collection points.
[0102] In this embodiment, the feature value of the collection point and the feature value of the existing sampling point can both be character feature values, so that it is convenient to compare the feature value of the collection point with the feature value of the existing sampling point. Figure 5 , which shows a method for comparing characteristic values, which may include:
[0103] S510. Perform string matching on the character feature value of the collection point and the character feature value of the existing sampling point to obtain a string matching result.
[0104] For string comparison, the strcmp function can be used. This function is used to compare two strings and return an integer according to the comparison result. Its basic form is strcmp(str1, str2). If str1 = str2, it returns zero; if str1 < str2, it returns a negative number; if str1 > str2, it returns a positive number. Thus, the string matching result between the acquisition point and the existing sampled points can be obtained based on strcmp(characteristic value of the acquisition point, characteristic value of the existing sampled points).
[0105] S520. Determine whether the string matching result indicates that the characteristic values of any existing sampled points are all inconsistent with the characteristic values of the sampled point; if so, execute step S530; if not, execute step S540.
[0106] In the case where strcmp(characteristic value of the acquisition point, characteristic value of the existing sampled points) = 0, it indicates that the characteristic values of the acquisition point are consistent with the characteristic values of the existing sampled points; in the case where strcmp(characteristic value of the acquisition point, characteristic value of the existing sampled points) ≠ 0, it indicates that the characteristic values of the acquisition point are inconsistent with the characteristic values of the existing sampled points.
[0107] S530. Determine that there is no matching sampled point corresponding to the acquisition point.
[0108] S540. Determine that there is a matching sampled point corresponding to the acquisition point.
[0109] In the case where the characteristic values of the acquisition point and the existing sampled points can both be character characteristic values, the characteristic values of the acquisition point and the existing sampled points can be compared based on a preset string comparison function to determine whether there is an existing sampled point that matches the acquisition point. Comparing the character characteristic values based on the string comparison function can improve the efficiency and accuracy of the comparison of character characteristic values.
[0110] Further, since there may be a problem that the splicing results are the same when different characters are spliced, thus, in the case of determining that there is a matching sampled point corresponding to the acquisition point, it is also necessary to further determine whether the coordinate values of the acquisition point and the matching sampled point in multiple dimensions are the same or close; thus, please refer to Figure 6 , which shows a method for determining a target sampled point. The method may include:
[0111] S610. In the case where there is a matching sampled point corresponding to the acquisition point, match the approximate coordinate values of the acquisition point in multiple dimensions with the approximate coordinate values of the matching sampled point in multiple dimensions respectively to obtain a coordinate matching result.
[0112] When the eigenvalue of the acquisition point and the eigenvalues of the existing sampling points are all character eigenvalues, the acquisition point can be matched with the existing sampling points based on string matching. For the comparison of strings, the strcmp function can be used to implement it. This function is used to compare two strings and return an integer according to the comparison result. The basic form is strcmp(str1, str2). If str1 = str2, it returns zero; if str1 < str2, it returns a negative number; if str1 > str2, it returns a positive number. Thus, the string matching result between the acquisition point and the sampled point can be obtained based on strcmp(the character eigenvalue of the acquisition point, the character eigenvalue of the existing sampling point). When strcmp(the character eigenvalue of the acquisition point, the character eigenvalue of the existing sampling point) = 0, it indicates that the character eigenvalue of the acquisition point is the same as the character eigenvalue of the existing sampling point, so it is determined that there is a matching sampling point corresponding to the acquisition point among the existing sampling points.
[0113] When it is determined that there is a matching sampling point corresponding to the acquisition point among the existing sampling points, the approximate coordinate values of the acquisition point in multiple dimensions can be respectively matched with the approximate coordinate values of the matching sampling point in multiple dimensions to obtain a coordinate matching result.
[0114] S620. Determine whether the coordinate matching result indicates that the approximate coordinate values of the acquisition point in at least one dimension are inconsistent with the approximate coordinate values of the matching sampling point in the at least one dimension; if so, execute step S630; if not, execute step S640.
[0115] The approximate coordinate value of the acquisition point in each dimension can be respectively matched with the approximate coordinate value of the matching sampling point in the corresponding each dimension to obtain the coordinate matching results corresponding to multiple dimensions respectively, that is, the approximate coordinate value of the acquisition point in the first dimension is matched with the approximate coordinate value of the matching sampling point in the first dimension to obtain the coordinate matching result corresponding to the first dimension; the approximate coordinate value of the acquisition point in the second dimension is matched with the approximate coordinate value of the matching sampling point in the second dimension to obtain the coordinate matching result corresponding to the second dimension... The approximate coordinate value of the acquisition point in the nth dimension is matched with the approximate coordinate value of the matching sampling point in the nth dimension to obtain the coordinate matching result corresponding to the nth dimension. The coordinate matching result corresponding to each dimension may be consistent or inconsistent.
[0116] S630. Determine the acquisition point as the target sampling point.
[0117] When at least one of the coordinate matching results corresponding to multiple dimensions respectively indicates that the coordinate value of the acquisition point is inconsistent with the coordinate value of the matching sampling point, it means that the approximate coordinate value of the acquisition point is not equal to the approximate coordinate value of the matching sampling point. Therefore, the acquisition point and the matching sampling point are not approximate, and thus the acquisition point can be determined as the target sampling point.
[0118] S640. Determine the collection point as a non-target sampling point.
[0119] When the coordinate matching results corresponding to multiple dimensions respectively represent that the approximate coordinate values of the collection point in multiple dimensions are equal to the approximate coordinate values of the matching sampling point in multiple dimensions, it means that the collection point is similar to or the same as the matching sampling point, so that the spatial feature represented by the collection point can also be represented by the matching sampling point, so that the collection point can be directly removed without using the collection point as a sampling point.
[0120] The collection points and matching sampling points with equal character feature values may not correspond to two similar or identical points. For example, the approximate coordinate values of the collection point in three dimensions are 77, -19, 520, which are "77-19520" after string concatenation. The approximate coordinate values of the matching sampling point in three dimensions are 77, -195, 20, which are also "77-19520" after string concatenation. It can be seen that the collection point (77, -19, 520) and the matching sampling point (77, -195, 20) are two different points, but the character feature values obtained through string conversion and string concatenation are equal.
[0121] Therefore, when the matching sampling point corresponding to the collection point is determined, it is possible to further determine whether the approximate coordinate values of the collection point and the matching sampling point are equal, so as to further determine whether the collection point and the matching sampling point are similar or close, thereby avoiding the problem of missing sampling points due to direct abandonment of the collection point because of equal character feature values, thereby improving sampling accuracy.
[0122] The following is an example to illustrate the specific implementation process of the present application. Assume that the original point cloud sequence to be processed is Φ = {p1, p2, ..., p N}, N represents the size of the input point cloud sequence, any acquisition point p in the point cloud sequence i =(x i ,y i ,z i ) is a three-dimensional floating point vector; α represents the target scaling factor, α>1 represents the enlarged point cloud coordinate value, and α<1 represents the reduced point cloud coordinate value; the hash table used to store the sampled point cloud feature values is H, and the sampled point cloud set is Φ * The overall algorithm process is as follows Figure 7 As shown, including:
[0123] 1. Based on the target scaling factor α, the acquisition point p i =(x i ,y i ,z i ) is scaled to obtain
[0124] 2. Calculate the point cloud eigenvalues. The point cloud eigenvalues are mainly used to characterize its spatial distribution characteristics to uniquely characterize the point information. First, round off the scaled coordinate values to obtain the corresponding integer point coordinates r, s and Round represents the rounding function; then calculate the eigenvalue k of the new point i :k i =[str(r),str(s),str(t)], str represents the integer to string function, [*] represents concatenating all strings from left to right. From the above, we can see that the feature value of the collection point is a string.
[0125] 3. Determine whether the collection point is a sampling point: Calculate the collection point p i After the feature value of , try to insert it into the hash table H. If a hash conflict occurs, it means that the collection point p i It does not belong to the sampling point. If no hash conflict occurs, it means that the collection point p i Belongs to the sampling point, add it to the sampling point cloud set Φ * The hash table H used here can complete the search and insertion of eigenvalues in O(1) time, and the computational efficiency is very high.
[0126] The point cloud sampling method of the present application can be encapsulated into a point cloud sampling module, which is plug-and-play. Its typical usage scenarios are as follows: Figure 8 When the original point cloud starts to be generated, the point cloud sampling module can be run to perform point cloud sampling in real time. After the sampling results are obtained, they can be used as input for other subsequent business modules or algorithm modules to obtain business processing results in the corresponding business scenarios.
[0127] This application does not involve complex calculation processes, and the calculations involved are relatively simple. Whether it is point cloud scaling, eigenvalue calculation, or hash table insertion and lookup calculation, the calculation consumption is O(1) level, which greatly reduces the computing resource overhead of the online point cloud sampling algorithm. Among them, a hash table is used to store the eigenvalue data of the sampled point cloud data, which reduces memory resource consumption.
[0128] This application can be applied to application scenarios related to point cloud sampling, including but not limited to the following known scenarios:
[0129] 1. Real-time 3D reconstruction: Online point cloud sampling algorithms can ensure that the point cloud datasets obtained from dynamic sensors (such as lidar, RGB-D cameras, etc.) or real-time modeling algorithms have a processable scale in the real-time 3D reconstruction process, thereby achieving better scene or model modeling quality.
[0130] 2. SLAM (Simultaneous Localization and Mapping) system: The online point cloud sampling algorithm can reduce the amount of map data and the computational complexity during real-time map construction and positioning, thereby improving the operating efficiency and performance of the SLAM system.
[0131] 3. Autonomous driving: Autonomous driving systems need to extract key environmental information (such as obstacle detection and tracking, road segmentation, and type recognition) from point cloud data acquired in real time. The use of online point cloud sampling algorithms can reduce the size of the data set, speed up data processing, and improve the real-time performance and safety of autonomous driving systems.
[0132] 4. Mobile robot navigation: Online point cloud sampling algorithms can help mobile robots understand their surroundings in real time, knowing where they are and where they are going. The efficient performance of the sampling algorithm ensures that mobile robots can effectively perform navigation tasks.
[0133] 5. Virtual Reality (VR) and Augmented Reality (AR): Online point cloud sampling algorithms help provide VR / AR systems with real-time updated point cloud data, in which useful information of the real-time scene is retained to achieve better interaction and processing in virtual or augmented reality.
[0134] It should be noted that any of the above methods in this embodiment can be combined based on actual implementation conditions and have corresponding beneficial effects, which will not be described in detail here.
[0135] See also Fig. 9 This embodiment also provides a point cloud sampling device, including:
[0136] The original data acquisition module 910 is used to acquire original point cloud data obtained by collecting point cloud data of the target scene; the original point cloud data includes original coordinate values of the collection points in multiple dimensions;
[0137] The data scaling module 920 is used to perform data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain the scaled coordinate values of the acquisition points in multiple dimensions; the unit distance in the scaled point cloud space is consistent with the unit distance in the mathematical coordinate system; the scaled point cloud space is the point cloud space corresponding to the scaled coordinate values of the acquisition points in multiple dimensions;
[0138] A data approximation module 930 is used to perform approximate processing on the scaled coordinate values of the acquisition points in multiple dimensions to obtain approximate coordinate values of the acquisition points in multiple dimensions;
[0139] A data stitching module 940 is used to perform data stitching processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain the characteristic values of the collection points;
[0140] The sampling point determination module 950 is used to determine the collection point as a target sampling point when there is no matching sampling point corresponding to the collection point; the matching sampling point is at least one sampling point among the existing sampling points, and the feature value of the matching sampling point is consistent with the feature value of the collection point.
[0141] Furthermore, the data scaling module includes:
[0142] A scaling factor determination module, configured to determine a target scaling factor corresponding to the original point cloud data based on a point cloud data acquisition mode for the target scene;
[0143] The scaling coordinate value determination module is used to perform data scaling processing on the original coordinate values of the acquisition points in multiple dimensions based on the target scaling coefficient to obtain the scaling coordinate values of the acquisition points in multiple dimensions.
[0144] Furthermore, the data approximation module includes:
[0145] A rounding module, used for rounding the scaled coordinate values of the acquisition points in multiple dimensions to obtain integer coordinate values of the acquisition points in multiple dimensions;
[0146] The approximate coordinate value determination module is used to determine the integer coordinate values of the acquisition point in multiple dimensions as the approximate coordinate values of the acquisition point in multiple dimensions.
[0147] Furthermore, the data splicing module includes:
[0148] A character string conversion module, used to perform character string conversion on the approximate coordinate values of the collection point in multiple dimensions respectively, to obtain character string data corresponding to the multiple dimensions of the collection point respectively;
[0149] A string concatenation module, used for concatenating the string data corresponding to the multiple dimensions of the collection point to obtain a character feature value;
[0150] The first determining module is used to determine the character feature value as the feature value of the collection point.
[0151] Furthermore, the feature value of the existing sampling point is a character feature value;
[0152] The device also includes:
[0153] A string matching module, used for performing string matching on the character feature value of the collection point and the character feature value of the existing sampling point to obtain a string matching result;
[0154] The second determination module is configured to determine that there is no matching sampling point corresponding to the acquisition point when the character string matching result indicates that the character feature value of any existing sampling point is inconsistent with the character feature value of the sampling point.
[0155] Furthermore, the device also includes:
[0156] An approximate coordinate value matching module, used for matching the approximate coordinate values of the acquisition point in multiple dimensions with the approximate coordinate values of the matching sampling point in multiple dimensions respectively to obtain a coordinate matching result when there is a matching sampling point corresponding to the acquisition point;
[0157] A third determination module is configured to determine the collection point as the target sampling point when the coordinate matching result indicates that the approximate coordinate value of the collection point in at least one dimension is inconsistent with the approximate coordinate value of the matching sampling point in the at least one dimension.
[0158] Furthermore, the data splicing module includes:
[0159] A numerical splicing module, used for numerically splicing the integer coordinate values of the acquisition points in multiple dimensions to obtain integer eigenvalues;
[0160] The fourth determining module is used to determine the integer characteristic value as the characteristic value of the collection point.
[0161] The device provided in the above embodiment can execute the method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiment, please refer to the method provided in any embodiment of the present application.
[0162] This embodiment further provides a computer-readable storage medium, in which at least one instruction or at least one program is stored. The at least one instruction or at least one program is loaded by a processor and executed as any of the above methods of this embodiment.
[0163] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the above methods.
[0164] Fig.10 is a block diagram of an electronic device for point cloud sampling according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.10As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a point cloud sampling method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0165] Fig.11 is a block diagram of an electronic device for point cloud sampling according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The electronic device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a point cloud sampling method is implemented.
[0166] Those skilled in the art will understand that Fig.10 and Fig.11 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative labor. The steps and sequence listed in the embodiments are only one way of executing the sequence of many steps and do not represent the only execution sequence. When the actual system or interrupt product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).
[0168] The structure shown in this embodiment is only a partial structure related to the scheme of the present application, and does not constitute a limitation on the device to which the scheme of the present application is applied. The specific device may include more or fewer components than shown, or combine certain components, or have different arrangements of components. It should be understood that the method, device, etc. disclosed in this embodiment can be implemented in other ways. For example, the device embodiment described above is only schematic. For example, the division of the modules is only a division of a logical function. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or unit modules.
[0169] Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.
[0170] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0171] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A point cloud sampling method, characterized in that: include: Acquire original point cloud data obtained by collecting point cloud data of the target scene; The original point cloud data includes original coordinate values of the acquisition points in multiple dimensions; Performing data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain scaled coordinate values of the acquisition points in multiple dimensions; the unit distance in the scaled point cloud space is consistent with the unit distance in the mathematical coordinate system; The scaled point cloud space is a point cloud space corresponding to the scaled coordinate values of the acquisition points in multiple dimensions; Approximately processing the scaled coordinate values of the acquisition points in multiple dimensions to obtain approximate coordinate values of the acquisition points in multiple dimensions; Performing data splicing processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain characteristic values of the collection points; If there is no matching sampling point corresponding to the collection point, determining the collection point as a target sampling point; The matching sampling point is at least one sampling point among the existing sampling points, and the feature value of the matching sampling point is consistent with the feature value of the acquisition point.
2. The method according to claim 1, characterized in that The step of performing data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain scaled coordinate values of the acquisition points in multiple dimensions includes: Determining a target scaling factor corresponding to the original point cloud data based on a point cloud data acquisition mode for the target scene; Data scaling processing is performed on the original coordinate values of the acquisition points in multiple dimensions based on the target scaling coefficients to obtain scaled coordinate values of the acquisition points in multiple dimensions.
3. The method according to claim 1, characterized in that The approximate processing of the scaled coordinate values of the acquisition points in multiple dimensions to obtain the approximate coordinate values of the acquisition points in multiple dimensions includes: Rounding the scaled coordinate values of the acquisition points in multiple dimensions to obtain integer coordinate values of the acquisition points in multiple dimensions; The integer coordinate values of the acquisition points in multiple dimensions are determined as approximate coordinate values of the acquisition points in multiple dimensions.
4. The method according to claim 1 or 3, characterized in that: The step of performing data splicing processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain the characteristic values of the collection points includes: Performing character string conversion on the approximate coordinate values of the collection point in multiple dimensions respectively, to obtain character string data corresponding to the multiple dimensions of the collection point respectively; Performing string concatenation on the string data corresponding to the multiple dimensions of the collection point to obtain a character feature value; The character feature value is determined as the feature value of the collection point.
5. The method according to claim 4, characterized in that The feature value of the existing sampling point is a character feature value; The method further comprises: Performing string matching on the character feature value of the collection point and the character feature value of the existing sampling point to obtain a string matching result; When the string matching result indicates that the character feature value of any existing sampling point is inconsistent with the character feature value of the sampling point, it is determined that there is no matching sampling point corresponding to the acquisition point.
6. The method according to claim 5, characterized in that The method further comprises: In the case where there is a matching sampling point corresponding to the collection point, respectively matching the approximate coordinate values of the collection point in multiple dimensions with the approximate coordinate values of the matching sampling point in multiple dimensions to obtain a coordinate matching result; When the coordinate matching result indicates that the approximate coordinate value of the acquisition point in at least one dimension is inconsistent with the approximate coordinate value of the matching sampling point in the at least one dimension, the acquisition point is determined as the target sampling point.
7. The method according to claim 3, characterized in that The step of performing data splicing processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain the characteristic values of the collection points includes: Numerically concatenating the integer coordinate values of the acquisition points in multiple dimensions to obtain integer eigenvalues; The integer eigenvalue is determined as the eigenvalue of the acquisition point.
8. A point cloud sampling device, characterized in that: include: The original data acquisition module is used to acquire the original point cloud data obtained by collecting point cloud data of the target scene; The original point cloud data includes original coordinate values of the acquisition points in multiple dimensions; A data scaling module is used to perform data scaling processing on the original coordinate values of the acquisition points in multiple dimensions to obtain scaled coordinate values of the acquisition points in multiple dimensions; the unit distance in the scaled point cloud space is consistent with the unit distance in the mathematical coordinate system; The scaled point cloud space is a point cloud space corresponding to the scaled coordinate values of the acquisition points in multiple dimensions; A data approximation module, used for approximating the scaled coordinate values of the acquisition points in multiple dimensions to obtain approximate coordinate values of the acquisition points in multiple dimensions; A data splicing module, used for performing data splicing processing based on the approximate coordinate values of the collection points in multiple dimensions to obtain the characteristic values of the collection points; A sampling point determination module, configured to determine the collection point as a target sampling point when there is no matching sampling point corresponding to the collection point; The matching sampling point is at least one sampling point among the existing sampling points, and the feature value of the matching sampling point is consistent with the feature value of the acquisition point.
9. An electronic device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the point cloud sampling method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executes the point cloud sampling method according to any one of claims 1 to 7.