Method for segmenting plant petals based on point cloud

By extracting and rotating the 3D point cloud data of the flower and transforming it into cylindrical coordinates, and combining the region growing method and adjacency list, the problem of low petal segmentation accuracy was solved, and fast and efficient petal segmentation was achieved.

CN116012563BActive Publication Date: 2026-06-05南昌职业大学

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
南昌职业大学
Filing Date
2022-12-31
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently segment flower petals, primarily due to a lack of sufficient flower point cloud data for model training, resulting in low segmentation accuracy.

Method used

By extracting the 3D point cloud data of plant flowers, calculating the point cloud coordinates, rotating the flower's principal axis until it coincides with the Y-axis, transforming it into cylindrical coordinates, and combining the region growing method and adjacency list, the bottom and boundary of the flower are segmented to determine the position and boundary of the petals.

Benefits of technology

It enables fast and accurate petal segmentation without requiring a large amount of point cloud data, thus improving the accuracy of petal segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116012563B_ABST
    Figure CN116012563B_ABST
Patent Text Reader

Abstract

The application discloses a kind of plant petal segmentation methods based on point cloud, belong to the field of forestry technology, for many petal flat type plant flower, first extract the three-dimensional point cloud data of plant flower;According to the three-dimensional point cloud data of plant flower, the coordinates of point in point cloud are calculated, the approximate longitude and latitude of flower main shaft are determined, and the main shaft of flower point cloud is rotated to coincide with Y axis;Then according to the direction of flower main shaft, the rectangular coordinates of flower point cloud are transformed into cylindrical coordinates;According to the transformed flower point cloud coordinates, the bottom of flower is segmented, the position of petal is determined, and finally the boundary of petal is segmented, to obtain the petal after segmentation.The method can quickly segment the petal in flower, without a large amount of point cloud data, and the segmentation precision is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural and forestry technology, and in particular to a method for segmenting plant petals based on point clouds. Background Technology

[0002] Ornamental plants are widely loved for their benefits, such as bringing joy and purifying the air. Research shows that people have a greater interest in the flowers of ornamental plants. Unlike leaves, the colorful flowers are a key part of flowering plants. Different types of flowers have different petal shapes and sizes; therefore, the accuracy of flower image segmentation directly affects the accuracy of automatic classification and recognition.

[0003] The invention patent with publication number CN112907602B discloses a 3D scene point cloud segmentation method based on an improved K-nearest neighbor algorithm. This method combines a neural network with the K-nearest neighbor algorithm, using the k-neighborhood features of a point instead of individual point features as input for feature extraction. By adjusting the network depth for local feature extraction, the interrelationships between local neighboring points are enhanced. This point cloud segmentation network exhibits high segmentation accuracy.

[0004] The invention patent with publication number CN112927248B discloses a point cloud segmentation method based on local feature enhancement and conditional random fields. The method involves inputting a dataset into a pre-trained point cloud segmentation network model for segmentation, obtaining the segmentation results. The point cloud segmentation network model is trained before use. This invention can solve both the problems of poor local feature extraction capability and poor edge segmentation performance.

[0005] Both of the above methods employ point cloud-based image segmentation techniques. Most point cloud-based image segmentation methods utilize clustering analysis or artificial intelligence methods, requiring a large amount of point cloud data for training. Currently, flower point cloud data is extremely scarce, and obtaining high-precision flower point clouds is also difficult. Therefore, the two methods mentioned above are difficult to directly apply to flower petal segmentation, and the lack of sufficient point cloud data for model training results in very low final segmentation accuracy. Summary of the Invention

[0006] To address the aforementioned problems, this invention aims to provide a point cloud-based method for plant petal segmentation, which can directly and quickly segment petals in flowers.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] A point cloud-based method for plant petal segmentation, characterized by comprising the following steps:

[0009] S1: Extract the 3D point cloud data of plant flowers;

[0010] S2: Calculate the coordinates of the points in the point cloud based on the three-dimensional point cloud data of the plant flowers;

[0011] S3: Determine the approximate latitude and longitude of the flower's main axis, and rotate the main axis of the flower dot cloud until it coincides with the Y-axis;

[0012] S4: Based on the main axis direction of the flower, transform the rectangular coordinates of the flower point cloud into cylindrical coordinates;

[0013] S5: Based on the transformed flower point cloud coordinates, segment the bottom of the flower to determine the position of the petals;

[0014] S6: Divide the boundaries of the petals to obtain the divided petals.

[0015] Furthermore, the three-dimensional point cloud data mentioned in step S1 is in txt file format, and the three-dimensional point cloud data includes the XYZ coordinate values ​​of the point cloud.

[0016] Furthermore, the specific operation of step S2 includes the following steps:

[0017] S201: Calculate the average of all point cloud coordinates and use it as the midpoint coordinate of the point cloud;

[0018] S202: Perform a translation transformation on all point cloud data of the plant flower, moving the midpoint coordinates to the origin.

[0019] Furthermore, the specific operation of step S3 includes the following steps:

[0020] S301: Rotate the initial flower point cloud around the Y-axis. During the rotation, the rotation angle corresponding to the position of the flower's maximum width is the approximate latitude r of the flower's principal axis. y ;

[0021] S302: Rotate the initial flower dot cloud around the Y-axis by an angle r y Next, rotate the flower dot cloud around the X-axis. The rotation angle corresponding to the position where the principal axis of the flower dot cloud is parallel to the Y-axis during the rotation is the approximate longitude r of the flower's principal axis. x ;

[0022] S303: Based on the approximate latitude and longitude of the flower's main axis determined in steps S301 and S302, rotate the main axis of the flower point cloud until it coincides with the Y-axis.

[0023] Furthermore, the specific operation of step S4 includes the following steps:

[0024] S401: Translate the center of the bottom of the flower to the origin of the coordinate system;

[0025] S402: Convert the rectangular coordinates of the flower point cloud to cylindrical coordinates; the specific method for converting rectangular coordinates to cylindrical coordinates is as follows:

[0026]

[0027] h = y

[0028]

[0029] In the formula, In cylindrical coordinates, (x, y, z) are rectangular coordinates;

[0030] S403: Use an adjacency list to store data with the same height and angle. This corresponds to multiple points with different radial radii r.

[0031] Furthermore, the specific operation of step S5 includes the following steps:

[0032] S501: Analyze the characteristics of the top-view projection of the flower base and calculate the circularity of the flower point cloud at different heights;

[0033] S502: Segment the dot cloud at the bottom of the flower; determine the cutoff height of the bottom of the flower based on the roundness of the dot cloud at different heights, which is the position where the petals appear. At the bottom of the flower, the roundness is close to 1; when petals appear, the roundness becomes smaller.

[0034] Furthermore, the method for calculating the roundness of the flower point cloud in step S501 is as follows:

[0035] Step 1: Merge the point cloud at any height with the point clouds at all previous heights, extract the point cloud at the bottom of the flower using the region growing method, extract the range r of the region, and calculate the area A of the flower region by pixel counting;

[0036] Step 2: Calculate the perimeter P of the flower region using the area method;

[0037] Step 3: Based on the area A and perimeter P of the region obtained in Steps 1 and 2, calculate the circularity C.

[0038] Furthermore, the specific operation steps of step S6 include: extracting the radius information of all point clouds based on the characteristics of cylindrical coordinates; for all point clouds with the same radius, the boundary of the petals is a cavity; based on this characteristic, the boundaries of petals with different radii can be obtained, and finally the petals are segmented.

[0039] The beneficial effects of this invention are:

[0040] This invention presents a point cloud-based method for plant petal segmentation. For multi-petaled, flattened plant flowers, the method first extracts 3D point cloud data of the flower. Based on this data, the coordinates of the midpoints are calculated to determine the approximate latitude and longitude of the flower's principal axis. The principal axis of the flower's point cloud is then rotated to coincide with the Y-axis. Next, based on the direction of the principal axis, the Cartesian coordinates of the flower's point cloud are transformed into cylindrical coordinates. Using the transformed point cloud coordinates, the bottom of the flower is segmented to determine the petal positions. Finally, the boundaries of the petals are segmented to obtain the segmented petals. This method can quickly segment the petals of a flower without requiring a large amount of point cloud data and offers high segmentation accuracy. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of flower dot clouds in this invention.

[0042] Figure 2 This is a schematic diagram of the process of rotating the initial flower dot cloud around the Y-axis in this invention.

[0043] Figure 3 In this invention, the initial flower dot cloud is rotated around the Y-axis by an angle r. y Then, a schematic diagram of the process of rotating the flower cloud around the X-axis.

[0044] Figure 4 This is a schematic diagram of the process of determining the main axis of the flower in this invention.

[0045] Figure 5 This is a schematic diagram illustrating the process of translating the center of the bottom of the flower to the origin of the coordinate system in this invention.

[0046] Figure 6 This is a top-down projection of the flower dot cloud at different heights in this invention.

[0047] Figure 7 This is a top-view projection of the dot cloud at the bottom of the flower in this invention at different heights.

[0048] Figure 8 This is a top-down projection of flower dot clouds at different heights in this invention.

[0049] Figure 9 This is a schematic diagram showing the top-view projection area of ​​flowers at different heights in this invention.

[0050] Figure 10 This is a schematic diagram of the perimeter of flowers at different heights in this invention, viewed from above.

[0051] Figure 11 This is a diagram illustrating the point cloud segmentation process at the bottom of the flower in this invention.

[0052] Figure 12 These are segmented projections of the bottom of the flower at different angles in this invention.

[0053] Figure 13 These are feature diagrams of the petals at different angles in this invention.

[0054] Figure 14 These are top-view projections of point clouds with different radii in this invention.

[0055] Figure 15 This is a schematic diagram of the petal boundaries divided by different radii in this invention.

[0056] Figure 16 This is a schematic diagram of the petals that were finally segmented in this invention. Detailed Implementation

[0057] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0058] A point cloud-based method for plant petal segmentation includes the following steps:

[0059] S1: Extract the 3D point cloud data of plant flowers;

[0060] Specifically, the dot clouds of plant flowers are shown in the attached image. Figure 1 As shown, the 3D point cloud data is in txt file format, and only the XYZ coordinate values ​​of the point cloud are retained. If it is another format file, it can be converted into a text file using relevant software. The point cloud data in the externally stored text file txt can be stored in memory, which can speed up the processing speed of the point cloud data. In this invention, the 3D point cloud data of plant flowers is stored in memory in the form of a singly linked list.

[0061] Further, step S2: Calculate the coordinates of the points in the point cloud based on the three-dimensional point cloud data of the plant flowers;

[0062] Specifically, S201: Calculate the average value of all point cloud coordinates, and use it as the coordinate of the midpoint of the point cloud;

[0063] S202: Perform a translation transformation on all point cloud data of the plant flower, moving the midpoint coordinates to the origin.

[0064] Further, step S3: Determine the approximate latitude and longitude of the flower's main axis, and rotate the main axis of the flower point cloud until it coincides with the Y-axis;

[0065] Specifically, S301: Rotate the initial flower dot cloud around the Y-axis, as shown in the attached diagram. Figure 2 As shown, the rotation angle corresponding to the maximum width position of the flower during rotation is the approximate latitude r of the flower's main axis. y In the appendix Figure 2 In the diagram, the top row for each point cloud represents the point cloud width, and the bottom row represents the rotation angle. (From the attached...) Figure 2As can be seen, during the initial rotation of the flower dot cloud, the maximum width is 65.4, and the approximate latitude is 90 degrees.

[0066] S302: Rotate the initial flower dot cloud around the Y-axis by an angle r y Then, rotate the flower-shaped cloud pattern around the X-axis, as shown in the attached image. Figure 3 As shown, the rotation angle corresponding to the position where the main axis of the flower point cloud is parallel to the Y-axis (where the point cloud height is minimum) during rotation is the approximate longitude r of the flower's main axis. x In the appendix Figure 3 In the diagram, the top row for each point cloud represents the point cloud height, and the bottom row represents the rotation angle. (From the attached...) Figure 3 As can be seen, during the initial rotation of the flower dot cloud around the X-axis, the minimum height is 27.2, and the approximate longitude is 90 degrees.

[0067] S303: Based on the approximate latitude and longitude of the flower's main axis determined in steps S301 and S302, rotate the main axis of the flower point cloud until it coincides with the Y-axis, as shown in the attached figure. Figure 4 As shown, first rotate the initial flower dot cloud 90 degrees around the Y-axis, and then rotate it 90 degrees around the X-axis.

[0068] Further, step S4: Based on the main axis direction of the flower, transform the rectangular coordinates of the flower point cloud into cylindrical coordinates;

[0069] Specifically, S401: Translate the center of the bottom of the flower to the origin of the coordinate system, as shown in the attached diagram. Figure 5 As shown, since the center point of the flower is already at the origin, we only need to translate the flower along the Y-axis to its minimum y-value so that the center of the bottom of the flower is located at the origin.

[0070] S402: Convert the rectangular coordinates of the flower point cloud to cylindrical coordinates; the specific method for converting rectangular coordinates to cylindrical coordinates is as follows:

[0071]

[0072] h = y

[0073]

[0074] In the formula, In cylindrical coordinates, (x, y, z) are rectangular coordinates; angles The increment depends on the size of the flower and can generally be set to 1°;

[0075] S403: Convert rectangular coordinates (x, y, z) to cylindrical coordinates. Afterwards, there may be a radial radius r and The values ​​represent a one-to-many relationship, and this information needs to be saved for subsequent processing. In this invention, an adjacency list is used to store values ​​at the same height and angle. This corresponds to multiple points with different radial radii r.

[0076] Further, in step S5: based on the transformed flower point cloud coordinates, the bottom of the flower is segmented to determine the position of the petals;

[0077] Specifically, after converting the Cartesian coordinates of plant flowers to cylindrical coordinates, point clouds at different heights can be quickly obtained, as shown in the attached figure. Figure 6 As shown in the attached image, the dot cloud pattern at the base of the flowers at different heights is as follows. Figure 7 As shown, based on the top-view projections of the flower point cloud at different heights, it can be seen that starting from the bottom of the flower, different heights are all within the same connected region. When the connected region suddenly increases, it indicates the appearance of petals, at which point the flower ends at the bottom. Specifically, the petal position is determined by the roundness at different heights. First, the characteristics of the top-view projection of the flower's bottom are analyzed, and the roundness of the flower point cloud at different heights is calculated. Then, based on the roundness of the point cloud at different heights, the bottom point cloud of the flower is segmented, and the height at which the flower ends is determined, which is the position where the petals appear. At the bottom of the flower, the roundness is close to 1; when petals appear, the roundness decreases.

[0078] The method for calculating roundness is as follows;

[0079] Step 1: Merge the point cloud at any height with the point clouds at all previous heights, so that the point cloud at height h at the bottom of the flower has denser points on the petals (as shown in the attached image). Figure 8 As shown in the attached diagram, the point cloud at the bottom of the flower is extracted using the region growing method. The extraction region is defined as r. These points are used to calculate the number of point clouds at the bottom of the flower at a given height h (pixel counting method), which is the area A of the flower region. As the height increases, point clouds of other petals will appear. It is necessary to extract the point cloud of the flower's bottom at the center, temporarily removing the point clouds of other petals. (See attached diagram). Figure 9 As shown, the calculation formula is:

[0080] Step 2: Calculate the perimeter of the flower area using the area method, as shown in the attached diagram. Figure 10 As shown, the key to calculating the perimeter is extracting the region boundary. In this invention, the four-neighbor method is used to calculate the perimeter: if the current pixel is the target, and the number of its left, top, right, and bottom neighbor pixels that are also the target is greater than or equal to 1 and less than or equal to 3, then the current pixel is the target boundary and is used as a count for perimeter calculation;

[0081] Step 3: Based on the area A and perimeter P of the region obtained in Steps 1 and 2, calculate the circularity C.

[0082] S504: Segmenting the point cloud at the bottom of the flower; when the point cloud is at the bottom of the flower, it is nearly circular. When the height of the point cloud approaches the petal position, the point cloud range increases, the shape becomes more complex, and the circularity decreases, indicating the presence of petals. At the bottom of the flower, the top-view projection is nearly circular, with a circularity close to 1. When petals appear, the circularity decreases, generally less than 0.5, as shown in the attached diagram. Figure 11 As shown in the attached image, the projection effect of the segmented flower's bottom point cloud rotating arbitrarily around its bottom center point is as follows. Figure 12 As shown.

[0083] Further, step S6: Segment the boundaries of the petals to obtain the segmented petals.

[0084] Specifically, the characteristics of the petals from different angles are shown in the attached image. Figure 13 As shown, the smaller radius angles generally mark the dividing boundaries of the petals. However, due to the curvature of the petals, if only the same angle is used for division, at larger radius locations, the same petal may appear to be divided into two parts. Based on the characteristics of cylindrical coordinates, the radius information of all point clouds is extracted. Top-view projections of point clouds with different radii are attached. Figure 14 As shown, for all point clouds with the same radius, the boundaries of the petals are cavities. Based on this characteristic, the boundaries of petals with different radii can be derived, as shown in the attached figure. Figure 15 As shown in the attached image, the petals are finally separated. Figure 16 As shown.

[0085] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for segmenting plant petals based on point clouds, characterized in that, Includes the following steps, S1: Extract the 3D point cloud data of plant flowers; S2: Calculate the coordinates of the points in the point cloud based on the three-dimensional point cloud data of the plant flowers; S3: Determine the approximate latitude and longitude of the flower's main axis, and rotate the main axis of the flower dot cloud until it coincides with the Y-axis; S4: Based on the main axis direction of the flower, transform the rectangular coordinates of the flower point cloud into cylindrical coordinates; S5: Based on the transformed flower point cloud coordinates, segment the bottom of the flower to determine the position of the petals; S6: Divide the boundaries of the petals to obtain the divided petals; Step S5 specifically includes the following steps: S501: Analyze the characteristics of the top-view projection of the flower base and calculate the circularity of the flower point cloud at different heights; S502: Segment the dot cloud at the bottom of the flower; Based on the roundness of the dot cloud at different heights, determine the height at which the bottom of the flower ends, which is the position where the petals appear. At the bottom of the flower, the roundness is close to 1; When petals appear, the roundness decreases. The method for calculating the roundness of the flower dot cloud in step S501 is as follows: Step 1: Merge the point cloud at any height with the point clouds at all previous heights, extract the point cloud at the bottom of the flower using the region growing method, extract the range r of the region, and calculate the area A of the flower region by pixel counting; Step 2: Calculate the perimeter P of the flower region using the area method; Step 3: Based on the area A and perimeter P of the region obtained in Steps 1 and 2, calculate the circularity C. .

2. The plant petal segmentation method based on point cloud according to claim 1, characterized in that: The three-dimensional point cloud data mentioned in step S1 is in txt file format, and the three-dimensional point cloud data includes the XYZ coordinate values ​​of the point cloud.

3. The plant petal segmentation method based on point cloud according to claim 2, characterized in that, Step S2 includes the following steps: S201: Calculate the average of all point cloud coordinates and use it as the midpoint coordinate of the point cloud; S202: Perform a translation transformation on all point cloud data of the plant flower, moving the midpoint coordinates to the origin.

4. The point cloud-based plant petal segmentation method according to claim 3, characterized in that, Step S3 includes the following steps: S301: Rotate the initial flower point cloud around the Y-axis. During the rotation, the rotation angle corresponding to the position of the flower's maximum width is the approximate latitude r of the flower's principal axis. y ; S302: Rotate the initial flower dot cloud around the Y-axis by an angle r y Next, rotate the flower dot cloud around the X-axis. The rotation angle corresponding to the position where the principal axis of the flower dot cloud is parallel to the Y-axis during the rotation is the approximate longitude r of the flower's principal axis. x ; S303: Based on the approximate latitude and longitude of the flower's main axis determined in steps S301 and S302, rotate the main axis of the flower point cloud until it coincides with the Y-axis.

5. The plant petal segmentation method based on point cloud according to claim 4, characterized in that, Step S4 includes the following steps: S401: Translate the center of the bottom of the flower to the origin of the coordinate system; S402: Convert the rectangular coordinates of the flower point cloud to cylindrical coordinates; the specific method for converting rectangular coordinates to cylindrical coordinates is as follows: ; In the formula, (h, (r) are cylindrical coordinates. (x, y, z) are rectangular coordinates; S403: Use an adjacency list to store data with the same height and angle (h, () Corresponds to multiple points with different radial radii r.

6. The plant petal segmentation method based on point cloud according to claim 1, characterized in that, The specific steps of step S6 include: extracting the radius information of all point clouds based on the characteristics of cylindrical coordinates; for all point clouds with the same radius, the boundary of the petals is a cavity; based on this characteristic, the boundaries of petals with different radii can be obtained, and finally the petals are segmented.