Method, device, equipment, medium and product for obtaining sparse point cloud
By extracting skeleton feature point clouds and contour feature point clouds from the original point cloud and randomly downsampling non-critical point clouds, the problem of poor accuracy of sparse point clouds is solved, and the accuracy of plant feature information and the precision of growth prediction are achieved.
Patent Information
- Application Number
- CN202210892506.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-07-27
AI Technical Summary
The accuracy of sparse point clouds in existing technologies is poor, resulting in poor accuracy of plant feature information and an inability to accurately predict plant growth.
By determining the skeleton feature point cloud and contour feature point cloud in the original point cloud, non-critical point cloud is obtained, and random downsampling is performed based on these point clouds to obtain the sparse point cloud of the target object.
It improves the accuracy of sparse point clouds, enhances the accuracy of plant characteristic information, and enables accurate prediction of plant growth.
Smart Images

Figure CN115345898B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional point cloud preprocessing, and particularly relates to a sparse point cloud acquisition method and device, equipment, medium and product. BACKGROUND
[0002] With the development of modern breeding and smart agriculture, analyzing the phenotype of a plant can predict the growth of the plant.
[0003] In the related art, in the process of analyzing the phenotype of a plant, the original point cloud of the plant can be uniformly down-sampled to obtain a sparse point cloud of the plant, and based on the sparse point cloud, feature information (such as leaf length information, leaf width information, and leaf edge information) of the plant can be obtained, and then the growth of the plant can be predicted based on the feature information.
[0004] In the above related art, the accuracy of the sparse point cloud obtained by uniformly down-sampling the original point cloud of the plant is usually poor, which leads to poor accuracy of the feature information of the plant, and thus the growth of the plant cannot be accurately predicted. SUMMARY
[0005] The present application provides a sparse point cloud acquisition method and device, equipment, medium and product to solve the problem of poor accuracy of the sparse point cloud in the prior art, and to achieve the purpose of improving the accuracy of the sparse point cloud.
[0006] The present application provides a sparse point cloud acquisition method, comprising:
[0007] acquiring an original point cloud of a target object; the original point cloud is obtained after three-dimensional point cloud collection of the target object;
[0008] determining a skeleton feature point cloud and a contour characteristic point cloud in the original point cloud;
[0009] acquiring a non-key point cloud in the original point cloud; the non-key point cloud does not overlap with the skeleton feature point cloud and the contour characteristic point cloud;
[0010] determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour characteristic point cloud, and the non-key point cloud.
[0011] According to the sparse point cloud acquisition method provided by the present application, the skeleton feature point cloud and the contour characteristic point cloud are determined in the original point cloud, comprising:
[0012] using a random farthest point sampling algorithm to down-sample the original point cloud to obtain an intermediate point cloud;
[0013] determining the skeleton feature point cloud and the contour characteristic point cloud in the intermediate point cloud.
[0014] The application provides a sparse point cloud acquisition method, which comprises the following steps of:
[0015] extracting skeleton points from the intermediate point cloud to obtain an initial skeleton point cloud;
[0016] determining a skeleton feature point cloud based on the initial skeleton point cloud and the intermediate point cloud;
[0017] extracting boundary points from the intermediate point cloud to obtain a contour feature point cloud.
[0018] The application provides a sparse point cloud acquisition method, which comprises the following steps of:
[0019] for each first point included in the initial skeleton point cloud, determining all points in the intermediate point cloud with a distance less than a preset value from the first point as a point cloud corresponding to the first point;
[0020] determining a skeleton feature point cloud based on the point cloud corresponding to each first point.
[0021] The application provides a sparse point cloud acquisition method, which comprises the following steps of:
[0022] determining non-key point clouds in the original point cloud as the remaining points in the intermediate point cloud except the skeleton feature point cloud and the contour feature point cloud.
[0023] The application provides a sparse point cloud acquisition method, which comprises the following steps of:
[0024] determining a first sampling amount as a product of a first weight and a total number of all points in the skeleton feature point cloud, determining a second sampling amount as a product of a second weight and a total number of all points in the contour feature point cloud, and determining a third sampling amount as a product of a third weight and a total number of all points in the non-key point cloud;
[0025] determining a target point cloud as a sum of a point cloud obtained by randomly down-sampling the skeleton feature point cloud according to the first sampling amount, a point cloud obtained by randomly down-sampling the contour feature point cloud according to the second sampling amount, and a point cloud obtained by randomly down-sampling the non-key point cloud according to the third sampling amount;
[0026] randomly down-sampling the target point cloud according to a target number to obtain a sparse point cloud of a target object.
[0027] The application further provides a sparse point cloud acquisition device, which comprises the following steps of:
[0028] The first obtaining module is configured to obtain an original point cloud of a target object, wherein the original point cloud is obtained after three-dimensional point cloud collection is performed on the target object;
[0029] The first determining module is configured to determine a skeleton feature point cloud and a contour characteristic point cloud in the original point cloud;
[0030] The second obtaining module is configured to obtain a non-key point cloud in the original point cloud, wherein the non-key point cloud is non-overlapping with the skeleton feature point cloud and the contour characteristic point cloud;
[0031] The second determining module is configured to determine a sparse point cloud of the target object based on the skeleton feature point cloud, the contour characteristic point cloud and the non-key point cloud.
[0032] According to the sparse point cloud obtaining device provided by the application, the first determining module is specifically configured to:
[0033] The original point cloud is down-sampled by using a random farthest point sampling algorithm to obtain an intermediate point cloud;
[0034] The skeleton feature point cloud and the contour characteristic point cloud are determined in the intermediate point cloud.
[0035] According to the sparse point cloud obtaining device provided by the application, the first determining module is specifically configured to:
[0036] The intermediate point cloud is subjected to skeleton point extraction processing to obtain an initial skeleton point cloud;
[0037] The skeleton feature point cloud is determined based on the initial skeleton point cloud and the intermediate point cloud;
[0038] The intermediate point cloud is subjected to boundary point extraction processing to obtain the contour characteristic point cloud.
[0039] According to the sparse point cloud obtaining device provided by the application, the first determining module is specifically configured to:
[0040] For each first point included in the initial skeleton point cloud, all points in the intermediate point cloud having a distance less than a preset value from the first point are determined as a point cloud corresponding to the first point;
[0041] The skeleton feature point cloud is determined based on the point cloud corresponding to each first point.
[0042] According to the sparse point cloud obtaining device provided by the application, the second obtaining module is specifically configured to:
[0043] All points in the intermediate point cloud other than the skeleton feature point cloud and the contour characteristic point cloud are determined as the non-key point cloud in the original point cloud.
[0044] According to the sparse point cloud obtaining device provided by the application, the second determining module is specifically configured to:
[0045] The product of the first weight and the total number of all points in the skeleton feature point cloud is determined as the first sampling amount; the product of the second weight and the total number of all points in the contour characteristic point cloud is determined as the second sampling amount; and the product of the third weight and the total number of all points in the non-key point cloud is determined as the third sampling amount;
[0046] The sum of the point cloud obtained by randomly down-sampling the skeleton feature point cloud according to the first sampling amount, the point cloud obtained by randomly down-sampling the contour characteristic point cloud according to the second sampling amount, and the point cloud obtained by randomly down-sampling the non-key point cloud according to the third sampling amount is determined as the target point cloud.
[0047] The target point cloud is randomly down-sampled according to the target number to obtain the sparse point cloud of the target object.
[0048] The application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method for acquiring the sparse point cloud according to any one of the above when executing the program.
[0049] The application further provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the method for acquiring the sparse point cloud according to any one of the above.
[0050] The application further provides a computer program product, which includes a computer program, and the computer program is executable on a processor to implement the method for acquiring the sparse point cloud according to any one of the above.
[0051] The application provides a method, device, equipment, medium and product for acquiring a sparse point cloud, which determines a skeleton feature point cloud and a contour characteristic point cloud in an original point cloud, acquires a non-key point cloud in the original point cloud, and determines a sparse point cloud of a target object based on the skeleton feature point cloud, the contour characteristic point cloud and the non-key point cloud, so that the sparse point cloud can reflect the detailed features of the target object, the accuracy of the sparse point cloud is improved, the accuracy of feature information of a plant obtained based on the sparse point cloud is improved, and the purpose of accurately predicting the growth of the plant is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can also be obtained by those skilled in the art without any creative effort.
[0053] Figure 1 is one of the flowcharts of the method for acquiring a sparse point cloud provided by the application;
[0054] Figure 2 Figure 2 is a flowchart of a method for obtaining a sparse point cloud according to the present application;
[0055] Figure 3 Figure 3 is a schematic diagram of a point cloud according to the present application;
[0056] Figure 4 Figure 4 is a schematic diagram of a sparse point cloud obtained by different methods according to the present application;
[0057] Figure 5 Figure 5 is a schematic diagram of a sparse point cloud of different target objects according to the present application;
[0058] Figure 6 Figure 6 is a schematic diagram of a sparse point cloud of different target objects according to the present application;
[0059] Figure 7 Figure 7 is a schematic diagram of a device for obtaining a sparse point cloud according to the present application;
[0060] Figure 8 Figure 8 is a schematic diagram of a physical structure of an electronic device according to the present application. DETAILED DESCRIPTION
[0061] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.
[0062] In plant phenotype analysis, three-dimensional point cloud is the most effective data for studying plant structure and plant morphology. This data naturally encodes the geometric features and spatial distribution of plants in the real world. However, due to the large amount of data of plant three-dimensional point cloud and the unordered nature of three-dimensional point cloud, if the characteristic information (such as leaf length information and leaf width information, etc.) of the plant is directly obtained based on the plant three-dimensional point cloud, and the growth of the plant is predicted based on the characteristic information, the prediction calculation amount will be large, and a large amount of time and computing power will be consumed.
[0063] In order to reduce the prediction calculation amount, save time and computing power, in the related art, the original point cloud (i.e. three-dimensional point cloud) of the plant is usually uniformly down-sampled to obtain a sparse point cloud of the plant; based on the sparse point cloud, feature information of the plant is obtained; and the growth of the plant is predicted based on the feature information. In the above related art, the sparse point cloud obtained by uniformly down-sampling the original point cloud of the plant cannot reflect the detailed features (such as edge features and skeleton features, etc.) of the plant, so the accuracy of the sparse point cloud is usually poor, which leads to poor accuracy of the feature information of the plant, and thus the growth of the plant cannot be accurately predicted.
[0064] In the present application, in order to improve the accuracy of the sparse point cloud, and thus improve the accuracy of the feature information of the plant, and achieve the purpose of accurately predicting the growth of the plant, the present application provides a sparse point cloud acquisition method, in which the sparse point cloud is obtained through the skeleton feature points, the cloud contour feature point cloud and the non-key point cloud of the target object (such as a plant), so that the sparse point cloud can reflect the detailed features of the target object, and the accuracy of the sparse point cloud is improved.
[0065] The following will be described in combination with Figures 1 to 6 The sparse point cloud acquisition method provided by the present application is described.
[0066] Figure 1 is one of the flowcharts of the sparse point cloud acquisition method provided by the present application. As Figure 1 shown, the method comprises:
[0067] S101, acquiring an original point cloud of a target object; the original point cloud is obtained after three-dimensional point cloud collection is performed on the target object.
[0068] Optionally, the execution subject of the sparse point cloud acquisition method can be an electronic device, or a sparse point cloud acquisition device provided in the electronic device, and the acquisition device can be realized by the combination of software and / or hardware.
[0069] The target object can be a plant, an animal or an object, etc.
[0070] The original point cloud can be obtained after three-dimensional point cloud collection is performed on the target object by a three-dimensional scanning device or a depth sensor.
[0071] In some embodiments, the three-dimensional scanning device (or the depth sensor) is in communication connection with the electronic device, and after the three-dimensional scanning device (or the depth sensor) performs three-dimensional point cloud collection on the target object to obtain the original point cloud, the original point cloud can be sent to the electronic device.
[0072] S102, determining a skeleton feature point cloud and a contour feature point cloud in the original point cloud.
[0073] The skeleton feature point cloud and the contour feature point cloud can reflect the detailed features of the target object.
[0074] Specifically, the skeleton feature point cloud reflects the skeleton features of the target object, and the contour feature point cloud can reflect the contour features of the target object.
[0075] In the case where the target object is a plant, the skeleton feature point cloud can reflect the branch features of the plant, and the contour feature point cloud can reflect the leaf edge features of the plant.
[0076] S103, obtaining non-key point clouds in the original point cloud; the non-key point clouds do not overlap with the skeleton feature point cloud and the contour feature point cloud, respectively.
[0077] In some embodiments, the remaining points in the original point cloud other than the skeleton feature point cloud and the contour feature point cloud can be determined as the non-key point clouds.
[0078] S104, determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour feature point cloud and the non-key point clouds.
[0079] In some embodiments, the skeleton feature point cloud, the contour feature point cloud and the non-key point clouds can be determined as the target point cloud; and the target point cloud is subjected to random down-sampling processing to obtain the sparse point cloud of the target object.
[0080] In Figure 1 The method for obtaining the sparse point cloud provided by the embodiments can determine the skeleton feature point cloud and the contour feature point cloud in the original point cloud, obtain the non-key point clouds in the original point cloud, and determine the sparse point cloud of the target object based on the skeleton feature point cloud, the contour feature point cloud and the non-key point clouds, so that the sparse point cloud can reflect the detailed features of the target object, the accuracy of the sparse point cloud is improved, the accuracy of the feature information of the plant obtained based on the sparse point cloud is improved, and the purpose of accurately predicting the growth of the plant is achieved.
[0081] Further, the method for obtaining the sparse point cloud provided by the embodiments will be described in detail below. Figure 2 The method for obtaining the sparse point cloud provided by the embodiments will be described in detail below.
[0082] Figure 2 is a flowchart of the method for obtaining the sparse point cloud provided by the embodiments. As Figure 2 shown, the method comprises:
[0083] S201, obtaining an original point cloud of a target object; the original point cloud is obtained after three-dimensional point cloud collection is performed on the target object.
[0084] Specifically, the execution method of S201 is the same as that of S101, and the execution process of S201 will not be described herein.
[0085] S202, adopting a random farthest point sampling algorithm, performing down-sampling processing on the original point cloud to obtain an intermediate point cloud.
[0086] In the present application, the intermediate cloud points are obtained by using the random farthest point sampling algorithm, which can preserve the original features of the target object on the basis of reducing the prediction calculation amount, so as to ensure that the sparse point cloud can reflect the detailed features of the target object, and further improve the accuracy of the sparse point cloud.
[0087] S203, determining a skeleton feature point cloud and a contour characteristic point cloud in the intermediate point cloud.
[0088] In some embodiments, S203 specifically includes: performing skeleton point extraction processing on the intermediate point cloud to obtain an initial skeleton point cloud; determining the skeleton feature point cloud based on the initial skeleton point cloud and the intermediate point cloud; performing boundary point extraction processing on the intermediate point cloud to obtain the contour characteristic point cloud.
[0089] In some embodiments, the L1 median skeleton extraction algorithm can be used to perform skeleton point extraction processing on the intermediate point cloud to obtain the initial skeleton point cloud.
[0090] In some embodiments, the skeleton feature point cloud is determined based on the initial skeleton point cloud and the intermediate point cloud, including: for each first point included in the initial skeleton point cloud, determining all points in the intermediate point cloud having a distance less than a preset value from the first point as a point cloud corresponding to the first point.
[0091] The skeleton feature point cloud is determined based on the point cloud corresponding to each first point.
[0092] Optionally, the skeleton feature point cloud can be determined in the following four ways.
[0093] Way 11, the point cloud having the maximum number of second points in the point cloud corresponding to each first point is determined as the skeleton feature point cloud.
[0094] Way 12, the point cloud having a preset number of second points in the point cloud corresponding to each first point is determined as the skeleton feature point cloud.
[0095] Way 13, for each second point included in the point cloud corresponding to each first point, it is judged whether the second point is in the skeleton feature point cloud; if yes, the second point is added to the skeleton feature point cloud.
[0096] For way 13, the point cloud corresponding to each first point can be determined by the following formula:
[0097]
[0098] wherein, S j represents the point cloud corresponding to the jth first point, (x j , y j , zj represents the jth first point in the initial skeleton point cloud, (x i , y i , z i ) represents the ith second point in the intermediate point cloud, which is less than a preset value from the jth first point, and r represents the preset value.
[0099] For example, in the case where the initial skeleton point cloud includes 2 first points, if S1={(x2, y2, z2), (x3, y3, z3)} and S2={(x1, y1, z1), (x3, y3, z3), (x4, y4, z4)}, for the second point (x2, y2, z2) in S1, it is determined whether (x2, y2, z2) is in the skeleton feature point cloud. Since it is the first time to determine, (x2, y2, z2) is not in the skeleton feature point cloud, so (x2, y2, z2) is added to the skeleton feature point cloud, and at this time the skeleton feature point cloud is {(x2, y2, z2)}; for the second point (x3, y3, z3) in S1, it is determined whether (x3, y3, z3) is in the skeleton feature point cloud. Since the current skeleton feature point cloud is {(x2, y2, z2)}, (x3, y3, z3) is not in the skeleton feature point cloud, so (x3, y3, z3) is added to the skeleton feature point cloud, and at this time the skeleton feature point cloud is {(x2, y2, z2), (x3, y3, z3)}; correspondingly, for the three second points ((x1, y1, z1), (x3, y3, z3), (x4, y4, z4)) in S2, since (x1, y1, z1) and (x4, y4, z4) are not in the current skeleton feature point cloud and (x3, y3, z3) is in the current skeleton feature point cloud, (x1, y1, z1) and (x4, y4, z4) are added to the current skeleton feature point cloud {(x2, y2, z2), (x3, y3, z3)}, and at this time the skeleton feature point cloud is {(x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4)}.
[0100] In the present application, for each second point included in the point cloud corresponding to each first point, it is determined whether the second point is in the skeleton feature point cloud; if so, the second point is added to the skeleton feature point cloud, which can make the skeleton feature point cloud include the complete skeleton detail features of the target object, and improve the accuracy of the skeleton feature point cloud.
[0101] Mode 14, any one of the point clouds in the point clouds corresponding to each first point is determined as an intermediate skeleton point cloud; the other point clouds in the point clouds corresponding to each first point except the intermediate skeleton point cloud are determined as remaining point clouds.
[0102] For each second point in each of the remaining point clouds, it is judged whether the second point is in the intermediate skeleton point cloud. If not, the second point is added to the intermediate skeleton point cloud to obtain the skeleton feature point cloud.
[0103] In some embodiments, a boundary extraction algorithm in a Point Cloud Library (PCL) is adopted to perform boundary point extraction processing on the intermediate point cloud to obtain the contour characteristic point cloud.
[0104] S204, the remaining points in the intermediate point cloud other than the skeleton feature point cloud and the contour characteristic point cloud are determined as non-key point clouds in the original point cloud.
[0105] S205, the product of the first weight and the total number of all points in the skeleton feature point cloud is determined as the first sampling amount.
[0106] S206, the product of the second weight and the total number of all points in the contour characteristic point cloud is determined as the second sampling amount.
[0107] S207, the product of the third weight and the total number of all points in the non-key point cloud is determined as the third sampling amount.
[0108] It should be noted that the sum of the first weight, the second weight and the third weight is equal to 1.
[0109] In actual application, the sizes of the first weight, the second weight and the third weight can be adjusted based on different target objects, so that more points in the corresponding point cloud are included in the sparse point cloud.
[0110] For example, in the case of a target object being a wheat plant, the size of the first weight can be increased to more than 50% so that more points in the skeleton feature point cloud are included in the sparse point cloud to maximize the retention of the stem features of the wheat plant.
[0111] For example, in the case of a target object being a tomato plant, the size of the first weight can be appropriately reduced and the size of the second weight can be increased so that more points in the contour characteristic point cloud are included in the sparse point cloud to retain more leaf features of the tomato plant.
[0112] S208, the sum of the point cloud obtained by randomly down-sampling the skeleton feature point cloud according to the first sampling amount, the point cloud obtained by randomly down-sampling the contour characteristic point cloud according to the second sampling amount, and the point cloud obtained by randomly down-sampling the non-key point cloud according to the third sampling amount is determined as the target point cloud.
[0113] Optionally, the skeleton feature point cloud is randomly down-sampled according to the first sampling amount, the contour characteristic point cloud is randomly down-sampled according to the second sampling amount, and the non-key point cloud is randomly down-sampled according to the third sampling amount by a random down-sampling algorithm.
[0114] S209, randomly down-sample the target point cloud according to a target number to obtain a sparse point cloud of the target object.
[0115] Optionally, the target point cloud is randomly down-sampled according to the target number by a random down-sampling algorithm to obtain the sparse point cloud of the target object.
[0116] The total number of all points included in the sparse point cloud is equal to the target number.
[0117] In the present application, the skeleton feature point cloud is randomly down-sampled based on a first weight, the contour feature point cloud is randomly down-sampled based on a second weight, and the non-key point cloud is randomly down-sampled based on a third weight to obtain the sparse point cloud. The first weight, the second weight, and the third weight can be flexibly controlled to make the sparse point cloud more reflect the skeleton feature or the contour feature, so as to facilitate subsequent research on the feature information of different target objects.
[0118] Further, in the present application, the target point cloud is randomly down-sampled according to the target number to obtain the sparse point cloud of the target object, which can include points of the target number in the sparse point cloud, so as to achieve the purpose of accurately obtaining the sparse point cloud with a fixed number of points.
[0119] Figure 3 The point cloud schematic diagram provided by the present application is shown in the figure. Figure 3 As shown, it includes an original point cloud, an intermediate point cloud, an initial skeleton point cloud, a skeleton feature point cloud, a contour feature point cloud, and a sparse point cloud.
[0120] It should be noted that, Figure 3 The target object is taken as a tomato plant as an example for illustrative description.
[0121] Figure 4 The contrast schematic diagram of the sparse point cloud obtained by different methods provided by the present application is shown in the figure. Figure 4 As shown, it includes sparse point clouds A, B, C, and D.
[0122] The sparse point cloud A is obtained by processing the original point cloud by the sparse point cloud acquisition method provided by the present application.
[0123] The sparse point cloud B is obtained by down-sampling the original point cloud by the curvature down-sampling method.
[0124] The sparse point cloud C is obtained by down-sampling the original point cloud by the uniform down-sampling method.
[0125] The sparse point cloud D is obtained by down-sampling the original point cloud by the random down-sampling method.
[0126] For example, in Figure 4 , the sparse point cloud A can better reflect the leaf edge characteristics of the target object relative to the sparse point clouds B, C and D, and therefore the accuracy of the sparse point cloud obtained by the method shown in the present application is higher.
[0127] Figure 5 is one of the schematic diagrams of sparse point clouds of different target objects provided by the present application. As Figure 5 shown, it includes: point cloud A1 to A5, point cloud B1 to B5, point cloud C1 to C5.
[0128] Among them, point cloud A1 to A5 is the point cloud corresponding to the tobacco plant, point cloud B1 to B5 is the point cloud corresponding to the corn plant, and point cloud C1 to C5 is the point cloud corresponding to the sorghum plant.
[0129] Specifically, A1 is the original point cloud of the tobacco plant, A2 is the initial skeleton point cloud of the tobacco plant, A3 is the skeleton feature point cloud of the tobacco plant, A4 is the contour feature point cloud of the tobacco plant, and A5 is the sparse point cloud of the tobacco plant.
[0130] Specifically, B1 is the original point cloud of the corn plant, B2 is the initial skeleton point cloud of the corn plant, B3 is the skeleton feature point cloud of the corn plant, B4 is the contour feature point cloud of the corn plant, and B5 is the sparse point cloud of the corn plant.
[0131] Specifically, C1 is the original point cloud of the sorghum plant, C2 is the initial skeleton point cloud of the sorghum plant, C3 is the skeleton feature point cloud of the sorghum plant, C4 is the contour feature point cloud of the sorghum plant, and C5 is the sparse point cloud of the sorghum plant.
[0132] As can be seen from Figure 5 , the method for obtaining a sparse point cloud provided by the present application can obtain a sparse point cloud of any plant.
[0133] Figure 6 is the second schematic diagram of sparse point clouds of different target objects provided by the present application. As Figure 6 shown, it includes: original point cloud D1, E1, F1, sparse point cloud D2, E2, F2.
[0134] Among them, the original point cloud D1 corresponds to the sparse point cloud D2, the original point cloud E1 corresponds to the sparse point cloud E2, and the original point cloud F1 corresponds to the sparse point cloud F2.
[0135] As can be seen from Figure 6 , the method for obtaining a sparse point cloud provided by the present application has generalization, i.e. in the case of target objects being animals, objects, etc., the corresponding sparse point cloud can be obtained.
[0136] The sparse point cloud acquisition device provided by the present application is described below. The sparse point cloud acquisition device described below can be referred to in correspondence with the sparse point cloud acquisition method described above.
[0137] Figure 7 FIG. 1 is a structural schematic diagram of a sparse point cloud acquisition device provided by the present application. As shown in FIG. 1, the sparse point cloud acquisition device comprises: Figure 7
[0138] A first acquisition module 710 is configured to acquire an original point cloud of a target object; the original point cloud is obtained after three-dimensional point cloud collection is performed on the target object;
[0139] A first determination module 720 is configured to determine a skeleton feature point cloud and a contour characteristic point cloud in the original point cloud;
[0140] A second acquisition module 730 is configured to acquire a non-key point cloud in the original point cloud; the non-key point cloud does not overlap with the skeleton feature point cloud and the contour characteristic point cloud, respectively;
[0141] A second determination module 740 is configured to determine a sparse point cloud of the target object based on the skeleton feature point cloud, the contour characteristic point cloud, and the non-key point cloud.
[0142] According to the sparse point cloud acquisition device provided by the present application, the first determination module 720 is specifically configured to:
[0143] An original point cloud is down-sampled by using a random farthest point sampling algorithm to obtain an intermediate point cloud;
[0144] The skeleton feature point cloud and the contour characteristic point cloud are determined in the intermediate point cloud.
[0145] According to the sparse point cloud acquisition device provided by the present application, the first determination module 720 is specifically configured to:
[0146] An initial skeleton point cloud is obtained by performing skeleton point extraction processing on the intermediate point cloud;
[0147] The skeleton feature point cloud is determined based on the initial skeleton point cloud and the intermediate point cloud;
[0148] The contour characteristic point cloud is obtained by performing boundary point extraction processing on the intermediate point cloud.
[0149] According to the sparse point cloud acquisition device provided by the present application, the first determination module 720 is specifically configured to:
[0150] For each first point included in the initial skeleton point cloud, all points in the intermediate point cloud that have a distance less than a preset value from the first point are determined as a point cloud corresponding to the first point;
[0151] The skeleton feature point cloud is determined based on the point cloud corresponding to each first point.
[0152] The second obtaining module 730 is specifically configured to:
[0153] The remaining points in the intermediate point cloud, except for the skeleton feature point cloud and the contour characteristic point cloud, are determined as non-key point clouds in the original point cloud.
[0154] The second determining module 740 is specifically configured to:
[0155] The product of the first weight and the total number of points in the skeleton feature point cloud is determined as the first sampling amount; the product of the second weight and the total number of points in the contour characteristic point cloud is determined as the second sampling amount; and the product of the third weight and the total number of points in the non-key point cloud is determined as the third sampling amount.
[0156] The sum of the point cloud obtained by randomly down-sampling the skeleton feature point cloud according to the first sampling amount, the point cloud obtained by randomly down-sampling the contour characteristic point cloud according to the second sampling amount, and the point cloud obtained by randomly down-sampling the non-key point cloud according to the third sampling amount is determined as the target point cloud.
[0157] The target point cloud is randomly down-sampled according to the target number to obtain the sparse point cloud of the target object.
[0158] Figure 8 is a schematic diagram of the physical structure of an electronic device provided by the present application. As shown in Figure 8 The electronic device can include a processor 810, a communications interface 820, a memory 830, and a communications bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communications bus 840. The processor 810 can invoke the logical instructions in the memory 830 to execute the method for obtaining a sparse point cloud, which includes: obtaining an original point cloud of a target object; the original point cloud is obtained after three-dimensional point cloud collection of the target object; determining a skeleton feature point cloud and a contour characteristic point cloud in the original point cloud; obtaining a non-key point cloud in the original point cloud; the non-key point cloud does not overlap with the skeleton feature point cloud and the contour characteristic point cloud, respectively; and determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour characteristic point cloud, and the non-key point cloud.
[0159] In addition, the logic instructions in the memory 830 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0160] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the sparse point cloud acquisition method provided by the above-mentioned methods. The method comprises the following steps: acquiring an original point cloud of a target object; the original point cloud is obtained after three-dimensional point cloud collection is performed on the target object; determining a skeleton feature point cloud and a contour characteristic point cloud in the original point cloud; acquiring a non-key point cloud in the original point cloud; the non-key point cloud does not overlap with the skeleton feature point cloud and the contour characteristic point cloud respectively; and determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour characteristic point cloud and the non-key point cloud.
[0161] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the sparse point cloud acquisition method provided by the above-mentioned methods. The method comprises the following steps: acquiring an original point cloud of a target object; the original point cloud is obtained after three-dimensional point cloud collection is performed on the target object; determining a skeleton feature point cloud and a contour characteristic point cloud in the original point cloud; acquiring a non-key point cloud in the original point cloud; the non-key point cloud does not overlap with the skeleton feature point cloud and the contour characteristic point cloud respectively; and determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour characteristic point cloud and the non-key point cloud.
[0162] The device embodiments described above are only schematic, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0163] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and necessary general hardware platforms through the above description of the embodiments, and of course, the embodiments can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
[0164] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some technical features thereof; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A method for obtaining a sparse point cloud, characterized in that: include: Acquire an original point cloud of a target object; the original point cloud is obtained after performing three-dimensional point cloud acquisition on the target object; Determining a skeleton feature point cloud and a contour feature point cloud in the original point cloud; Acquire a non-key point cloud in the original point cloud; wherein the non-key point cloud does not overlap with the skeleton feature point cloud and the contour feature point cloud; Determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour feature point cloud, and the non-key point cloud; Determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour feature point cloud, and the non-key point cloud includes: The product of the first weight and the total number of all points in the skeleton feature point cloud is determined as a first sampling amount; the product of the second weight and the total number of all points in the contour feature point cloud is determined as a second sampling amount; and the product of the third weight and the total number of all points in the non-key point cloud is determined as a third sampling amount; determining a sum of a point cloud obtained by randomly downsampling the skeleton feature point cloud according to the first sampling amount, a point cloud obtained by randomly downsampling the contour feature point cloud according to the second sampling amount, and a point cloud obtained by randomly downsampling the non-key point cloud according to the third sampling amount as a target point cloud; The target point cloud is randomly downsampled according to the number of targets to obtain a sparse point cloud of the target object.
2. The method for obtaining a sparse point cloud according to claim 1, wherein: The determining of the skeleton feature point cloud and the contour feature point cloud in the original point cloud includes: Using a random farthest point sampling algorithm, the original point cloud is downsampled to obtain an intermediate point cloud; The skeleton feature point cloud and the contour feature point cloud are determined in the intermediate point cloud.
3. The method for obtaining a sparse point cloud according to claim 2, wherein: The determining of the skeleton feature point cloud and the contour feature point cloud in the intermediate point cloud comprises: Performing skeleton point extraction processing on the intermediate point cloud to obtain an initial skeleton point cloud; Determining the skeleton feature point cloud based on the initial skeleton point cloud and the intermediate point cloud; Boundary point extraction is performed on the intermediate point cloud to obtain the contour feature point cloud.
4. The method for obtaining a sparse point cloud according to claim 3, wherein: The determining of the skeleton feature point cloud based on the initial skeleton point cloud and the intermediate point cloud includes: For each first point included in the initial skeleton point cloud, all points in the intermediate point cloud whose distance from the first point is less than a preset value are determined as the point cloud corresponding to the first point; The skeleton feature point cloud is determined based on the point clouds corresponding to the first points.
5. The method for obtaining a sparse point cloud according to claim 2, wherein: The obtaining of the non-key point cloud in the original point cloud includes: The remaining points in the intermediate point cloud except the skeleton feature point cloud and the contour feature point cloud are determined as non-key point clouds in the original point cloud.
6. A device for acquiring sparse point clouds, characterized in that: include: A first acquisition module is used to acquire an original point cloud of a target object; the original point cloud is obtained after performing three-dimensional point cloud acquisition on the target object; A first determining module is used to determine a skeleton feature point cloud and a contour feature point cloud in the original point cloud; A second acquisition module is used to acquire a non-key point cloud in the original point cloud; the non-key point cloud does not overlap with the skeleton feature point cloud and the contour feature point cloud; A second determining module is configured to determine a sparse point cloud of the target object based on the skeleton feature point cloud, the contour feature point cloud, and the non-key point cloud; Determining a sparse point cloud of the target object based on the skeleton feature point cloud, the contour feature point cloud, and the non-key point cloud includes: The product of the first weight and the total number of all points in the skeleton feature point cloud is determined as a first sampling amount; the product of the second weight and the total number of all points in the contour feature point cloud is determined as a second sampling amount; and the product of the third weight and the total number of all points in the non-key point cloud is determined as a third sampling amount; determining a sum of a point cloud obtained by randomly downsampling the skeleton feature point cloud according to the first sampling amount, a point cloud obtained by randomly downsampling the contour feature point cloud according to the second sampling amount, and a point cloud obtained by randomly downsampling the non-key point cloud according to the third sampling amount as a target point cloud; The target point cloud is randomly downsampled according to the number of targets to obtain a sparse point cloud of the target object.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for obtaining a sparse point cloud according to any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for obtaining a sparse point cloud according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for obtaining a sparse point cloud according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Crop phenotypic parameter extraction method and device
CN111696122A
Point cloud processing method and system based on random downsampling
CN114299301A