Cutter positioning method, device, electronic equipment and storage medium for tea picking

By obtaining the regional point cloud collection of tea dragons and combining random sampling consistency and particle swarm optimization algorithm, the cutting knife model is constructed and optimized, and the picking quality problems caused by the complex morphology and sparse distribution of tea trees in the existing technology are solved, and more efficient and high-quality tea picking is achieved.

CN119251292BActive Publication Date: 2025-03-25FUJIAN WUYISHAN YONGSHENG TEA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411780967.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-25
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

The prior art is difficult to adapt to the complex morphology and sparse distribution of tea trees, resulting in low tea picking quality.

Method used

By obtaining the regional point cloud collection of target tealong, calculating the sparseness and cumulative distribution function values ​​of each point, performing random weighted sampling, combining the random sampling consistency algorithm and particle swarm optimization algorithm, a cutting knife model is constructed and optimized to determine the cutting knife model under the workpiece coordinate system.

Benefits of technology

The accuracy and robustness of the cutting knife positioning are improved, so that the cutting knife can follow the tea leaves more accurately for cutting, improving the efficiency and quality of tea picking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251292B_ABST
    Figure CN119251292B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of agricultural machinery, and provides a method, device, electronic device and storage medium for positioning a cutter for tea ridge picking. The cumulative distribution function value of each point in the regional point cloud set is used to perform random weighted sampling on the regional point cloud set, so that the initial point set after sampling will retain dense points containing rich tea ridge information, which can adapt to the complex morphology and sparse distribution of tea trees, and has stronger adaptability, improves the quality of the initial point set and the utilization rate of spatial information, and provides a better data basis for subsequent model fitting and parameter optimization, and enhances the description ability of the random sampling consistency algorithm for the geometric information of the tea ridge. The random sampling consistency algorithm is combined with the particle swarm optimization algorithm, and the optimal cutter model parameter combination is used as the initial global optimal position. The cutter model parameter combination is globally optimized to obtain the global optimal model parameter combination, so that the obtained cutter model in the workpiece coordinate system is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer systems of agricultural machinery, and in particular to a method, device, electronic equipment and storage medium for positioning a cutting knife used for picking tea ridges. Background Art

[0002] Intelligent tea picking is of great significance in reducing the workload of tea farmers.

[0003] At present, tea can be picked by using some mechanized picking equipment and cutting with a knife. Therefore, accurately fitting the cutting knife model is crucial to improving the accuracy of tea picking.

[0004] Existing solutions usually use simple geometric fitting to determine the cutting knife model and pick tea leaves along a fixed path. This is difficult to adapt to the complex morphology and sparse distribution of tea trees, resulting in low quality of picked tea leaves. Summary of the invention

[0005] The invention provides a cutting knife positioning method, device, electronic equipment and storage medium for tea picking, so as to solve the defects in the prior art.

[0006] The present invention provides a cutting knife positioning method for tea picking, comprising:

[0007] Obtain the regional point cloud set of the target tea area;

[0008] For any point in the regional point cloud set, calculate the sparsity of the any point, and based on the sparsity of the any point, calculate the cumulative distribution function value of the any point;

[0009] Based on the cumulative distribution function value of each point in the regional point cloud set, the regional point cloud set is randomly weighted sampled to obtain an initial point set, and based on the height information and curvature information of the cutting knife, a candidate point set located on a horizontal plane in the initial point set is determined;

[0010] Based on the random sampling consistency algorithm, the candidate point set is fitted to construct a matrix equation, and based on the matrix equation, the interior points in the candidate point set are calculated, and based on the number of the interior points, the preferred cutting knife model parameter combination in the coefficient matrix of the matrix equation is screened out; the column elements of the coefficient matrix are the cutting knife model parameter combinations;

[0011] Based on the particle swarm optimization algorithm, taking the preferred cutter model parameter combination as the initial global optimal position, the cutter model parameter combination is globally optimized to obtain the global optimal model parameter combination;

[0012] Based on the global optimal model parameter combination, a cutting knife model in a workpiece coordinate system is determined.

[0013] According to a method for positioning a cutting knife for tea picking provided by the present invention, the regional point cloud set is obtained based on camera acquisition;

[0014] The step of obtaining a regional point cloud set of a target tea grove includes:

[0015] Based on the variety of the target tea field, determining the size information of the target tea field;

[0016] Based on the size information, determining the range of the region of interest of the camera;

[0017] Based on the scope of the region of interest, the regional point cloud set is collected.

[0018] According to a method for positioning a cutting knife for tea picking provided by the present invention, the cumulative distribution function value of any point is calculated based on the sparsity of any point, including:

[0019] Determining a sampling probability of the any point based on the sparsity of the any point;

[0020] Based on the sampling probability of the any point, a cumulative distribution function value of the any point is calculated.

[0021] According to a method for positioning a cutting knife for tea picking provided by the present invention, the candidate point set is fitted based on a random sampling consistency algorithm to construct a matrix equation, including:

[0022] Based on the random sampling consistency algorithm, in the candidate point set, a cutting knife model is fitted using the least square method to obtain multiple cutting knife models;

[0023] Based on the multiple cutter models, the matrix equation is constructed.

[0024] According to a method for positioning a cutting knife for tea picking provided by the present invention, the calculation of the interior points in the candidate point set based on the matrix equation includes:

[0025] Calculating the fitting deviation of each point in the candidate point set;

[0026] The points in the candidate point set whose corresponding fitting deviations are less than a preset threshold are taken as the inliers.

[0027] According to a method for positioning a cutting knife for tea picking provided by the present invention, the preferred cutting knife model parameter combination in the coefficient matrix of the matrix equation is screened out based on the number of the interior points, including:

[0028] Calculating an inlier rate based on the number of inliers and the total number of points in the candidate point set;

[0029] The cutting knife model parameter combination corresponding to the highest inlier rate in the coefficient matrix is ​​selected as the preferred cutting knife model parameter combination.

[0030] According to a method for positioning a cutting knife for tea picking provided by the present invention, the particle swarm optimization algorithm is used to take the preferred cutting knife model parameter combination as the initial global optimal position, and the cutting knife model parameter combination is globally optimized to obtain the global optimal model parameter combination, including:

[0031] Taking each combination of cutter model parameters as the position of each particle, taking the parameter change rate as the movement speed of each particle, adding an initial disturbance to the position of each particle, setting the initial movement speed and the initial individual optimal position of each particle, and initializing the particle swarm based on the initial global optimal position;

[0032] Iteratively updating the position and velocity of each particle in the particle swarm, and selecting the inverse of the fitting deviation at the position of each particle in the particle swarm as an adaptive function;

[0033] For any particle in the particle swarm, if the current fitness of any particle is better than the historical optimal fitness, the individual optimal position of any particle is updated; if the current fitness of any particle is better than the global optimal fitness, the global optimal position of any particle is updated until the preset conditions are met, and the global optimal position is output as the global optimal model parameter combination.

[0034] The present invention also provides a cutting knife positioning device for tea picking, comprising:

[0035] Point cloud acquisition module, used to obtain the regional point cloud set of the target tea area;

[0036] A cumulative distribution calculation module, used for calculating the sparsity of any point in the regional point cloud set, and calculating the cumulative distribution function value of any point based on the sparsity of any point;

[0037] A random weighted sampling module, used for performing random weighted sampling on the regional point cloud set based on the cumulative distribution function value of each point in the regional point cloud set to obtain an initial point set, and determining a candidate point set located on a horizontal plane in the initial point set based on the height information and curvature information of the cutting knife;

[0038] A model parameter screening module, used for fitting the candidate point set based on a random sampling consistency algorithm, constructing a matrix equation, and calculating the interior points in the candidate point set based on the matrix equation, and screening out the preferred cutter model parameter combination in the coefficient matrix of the matrix equation based on the number of the interior points; the column elements of the coefficient matrix are the cutter model parameter combinations;

[0039] A global optimization module is used to perform global optimization on the cutter model parameter combination based on a particle swarm optimization algorithm, taking the preferred cutter model parameter combination as an initial global optimal position, and obtain a global optimal model parameter combination;

[0040] The cutting knife positioning module is used to determine the cutting knife model in the workpiece coordinate system based on the global optimal model parameter combination.

[0041] The present invention also provides 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, a cutting knife positioning method for tea picking as described in any one of the above is implemented.

[0042] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for positioning a cutting knife for picking tea ridges as described in any one of the above is implemented.

[0043] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for positioning a cutting knife for picking tea ridges as described in any one of the above is implemented.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] The knife positioning method, device, electronic device and storage medium for tea ridge picking provided by the present invention utilize the cumulative distribution function value of each point in the regional point cloud set to perform random weighted sampling on the regional point cloud set, so that the initial point set after sampling retains dense points containing rich tea ridge information, can adapt to the complex morphology and sparse distribution of tea trees, has stronger adaptability, improves the quality of the initial point set and the utilization rate of spatial information, provides a better data basis for subsequent model fitting and parameter optimization, and enhances the ability of the random sampling consistency algorithm to describe the geometric information of the tea ridge. The random sampling consistency algorithm is used to perform preliminary fitting of the cutter model, process noise and outliers, screen out the optimal cutter model parameter combination in the coefficient matrix of the matrix equation, and combine the random sampling consistency algorithm with the particle swarm optimization algorithm. The optimal cutter model parameter combination is used as the initial global optimal position, and the cutter model parameter combination is globally optimized to obtain the global optimal model parameter combination, so that the obtained cutter model in the workpiece coordinate system is more accurate. The model fitting and optimization can be organically combined to form a complete closed-loop process, realizing efficient collaboration of the algorithm, further improving the accuracy and robustness of the model fitting, and achieving higher positioning accuracy of the cutter, ensuring that the cutter can accurately follow the tea ridge for cutting, improving the efficiency and quality of picking, and solving the problem of low efficiency and poor quality of tea picking by vision-guided tea picking robots. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on the drawings in the following description without paying any creative work.

[0047] Figure 1 It is a schematic diagram of the flow of the cutting knife positioning method for tea picking provided by the present invention;

[0048] Figure 2 It is a schematic diagram of the structure of a cutting knife in a cutting knife positioning method for tea picking provided by the present invention;

[0049] Figure 3 It is a structural schematic diagram of a cutting knife positioning device for tea picking provided by the present invention;

[0050] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Figure 1 FIG. 1 is a flow chart of a method for positioning a cutting knife for picking tea ridges provided in an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0053] S1, obtain the regional point cloud set of the target tea area;

[0054] S2, for any point in the regional point cloud set, calculating the sparsity of the any point, and based on the sparsity of the any point, calculating the cumulative distribution function value of the any point;

[0055] S3, based on the cumulative distribution function value of each point in the regional point cloud set, performing random weighted sampling on the regional point cloud set to obtain an initial point set, and based on the height information and curvature information of the cutting knife, determining a candidate point set located on a horizontal plane in the initial point set;

[0056] S4, based on the random sampling consistency algorithm, fitting the candidate point set, constructing a matrix equation, and based on the matrix equation, calculating the interior points in the candidate point set, and based on the number of the interior points, screening out the preferred cutting knife model parameter combination in the coefficient matrix of the matrix equation; the column elements of the coefficient matrix are the cutting knife model parameter combinations;

[0057] S5, based on the particle swarm optimization algorithm, taking the preferred cutter model parameter combination as the initial global optimal position, globally optimizing the cutter model parameter combination to obtain the global optimal model parameter combination;

[0058] S6, determining a cutting knife model in a workpiece coordinate system based on the global optimal model parameter combination.

[0059] Specifically, the method for positioning a cutting knife for picking tea ridges provided in an embodiment of the present invention is executed by a cutting knife positioning device for picking tea ridges, which can be configured in a computer, which can be a local computer or a cloud computer. The local computer can be a computer, a tablet, etc., which is not specifically limited here.

[0060] First, step S1 is performed, and a regional point cloud set of a target tea field can be collected by a camera. The camera can be connected to a cutting knife positioning device for tea field picking. After the camera collects the regional point cloud set, the regional point cloud set can be transmitted to the cutting knife positioning device for tea field picking. Here, the target tea field refers to the tea field that needs to be picked.

[0061] Then, step S2 is performed, for any point in the regional point cloud set , any point can be calculated by the following formula Sparsity: ;

[0062] in, For any point The sparsity of is the indicator function, when If true, the value is 1, otherwise it is 0. r is any point The neighborhood radius.

[0063] Use any point The sparsity , you can first determine any point by the following formula The sampling probability of: ,in, For any point The sampling probability of For any point The sparsity The reciprocal of , N is the number of points in the regional point cloud set.

[0064] Then, use any point The sampling probability , any point can be calculated by the following formula The cumulative distribution function value of is: ;

[0065] in, For any point The cumulative distribution function value of .

[0066] Then, step S3 is executed to perform random weighted sampling on the regional point cloud set using the cumulative distribution function value of each point in the regional point cloud set to obtain the initial point set. That is,

[0067] ;

[0068] Among them, S is the initial point set, Is a random number.

[0069] Afterwards, the height information and curvature information of the cutting knife are used to determine the candidate point set located on the horizontal plane in the initial point set. Figure 2 The figure shows the schematic diagram of the cutter structure. The coordinate system is constructed with the vertex of the cutter as the coordinate origin, the horizontal direction as the X-axis direction, and the vertical direction as the Y-axis direction. The height information of the cutter is [-0.15, 0.15] m, and the arc information is [0, 15°]. The motion range of the cutter on the XOY plane is x∈[-0.56, 0.56] m, y∈[-0.15, 0.15] m.

[0070] Assume that the input of the cutter model is , extract the candidate point set of the initial point set S on the XOY plane: ;

[0071] in, is the candidate point set, is the i-th point in the candidate point set The coordinates of .

[0072] Then, step S4 is executed to fit the candidate point set using the RANdom SAmple Consensus (RANRSAC) algorithm to construct a matrix equation. In the fitting process, since the shape of the cutter is a parabola, a parabola can be used as the cutter model.

[0073] The matrix equation can be expressed by multiple cutter models, namely:

[0074] , , , ;

[0075] Among them, Y is the dependent variable matrix of the matrix equation, X is the independent variable matrix of the matrix equation, P is the coefficient matrix of the matrix equation, and the column elements of the coefficient matrix are the combination of the cutting knife model parameters. Therefore, a, b, and c are the combination of the cutting knife model parameters.

[0076] The i-th cutter model can be expressed as: , n is the number of points in the candidate point set, is the ordinate of the i-th point in the candidate point set, is the horizontal coordinate of the i-th point in the candidate point set.

[0077] Using the matrix equation, calculate the inliers in the candidate point set. The inliers are the points in the candidate point set whose fitting deviation is less than the preset threshold.

[0078] According to the number of inliers, the preferred combination of cutter model parameters in the coefficient matrix of the matrix equation can be screened out. For example, the inlier rate can be calculated according to the number of inliers and the total number of points in the candidate point set, that is, the ratio of the number of inliers to the total number of points is taken as the inlier rate. Thereafter, the combination of cutter model parameters corresponding to the highest inlier rate in the coefficient matrix is ​​selected as the preferred combination of cutter model parameters.

[0079] Then, step S5 is executed, using the particle swarm optimization (PSO) algorithm, taking each combination of cutter model parameters as the position of each particle, taking the parameter change rate as the movement speed of each particle, and taking the preferred combination of cutter model parameters as the initial global optimal position, the cutter model parameter combination is globally optimized to obtain the global optimal model parameter combination. Here, the object solved by the particle swarm optimization algorithm is the global optimal position, that is, the global optimal model parameter combination.

[0080] Here, the random sampling consensus algorithm is combined with the particle swarm optimization algorithm to form the particle swarm optimization weighted sampling consensus (PSO-WSAC) algorithm.

[0081] Finally, step S6 is executed, and the global optimal model parameters obtained in step S5 are combined into model parameters in the camera coordinate system, and the obtained is the cutting knife model in the camera coordinate system. Then, the cutting knife model in the camera coordinate system needs to be converted into the cutting knife model in the workpiece coordinate system to realize the positioning of the cutting knife in the physical space. It can be understood that the workpiece coordinate system is the world coordinate system where the cutting knife is located.

[0082] Therefore, the rotation matrix of the camera coordinate system and the workpiece coordinate system can be determined by calibration, and then the rotation matrix is ​​multiplied by the cutting knife model in the camera coordinate system to obtain the cutting knife model in the workpiece coordinate system to realize cutting knife positioning.

[0083] The knife positioning method for tea ridge picking provided in the embodiment of the present invention utilizes the cumulative distribution function value of each point in the regional point cloud set to perform random weighted sampling on the regional point cloud set, so that the initial point set after sampling will retain dense points containing rich tea ridge information, which can adapt to the complex morphology and sparse distribution of tea trees, has stronger adaptability, improves the quality of the initial point set and the utilization rate of spatial information, provides a better data basis for subsequent model fitting and parameter optimization, and enhances the ability of the random sampling consistency algorithm to describe the geometric information of the tea ridge. The random sampling consistency algorithm is used to perform preliminary fitting of the cutter model, process noise and outliers, screen out the optimal cutter model parameter combination in the coefficient matrix of the matrix equation, and combine the random sampling consistency algorithm with the particle swarm optimization algorithm. The optimal cutter model parameter combination is used as the initial global optimal position, and the cutter model parameter combination is globally optimized to obtain the global optimal model parameter combination, so that the obtained cutter model in the workpiece coordinate system is more accurate. The model fitting and optimization can be organically combined to form a complete closed-loop process, realizing efficient collaboration of the algorithm, further improving the accuracy and robustness of the model fitting, and achieving higher positioning accuracy of the cutter, ensuring that the cutter can accurately follow the tea ridge for cutting, improving the efficiency and quality of picking, and solving the problem of low efficiency and poor quality of tea picking by vision-guided tea picking robots.

[0084] Based on the above embodiment, the regional point cloud set is obtained based on camera acquisition;

[0085] The step of obtaining a regional point cloud set of a target tea grove includes:

[0086] Based on the variety of the target tea field, determining the size information of the target tea field;

[0087] Based on the size information, determining the range of the region of interest of the camera;

[0088] Based on the scope of the region of interest, the regional point cloud set is collected.

[0089] Specifically, in the camera coordinate system, the Z-axis coordinate represents the length information of the tea ridge, the X-axis coordinate represents the width information of the tea ridge, and the Y-axis coordinate represents the height information of the tea ridge.

[0090] When the camera collects a regional point cloud set, the size information of the target tea field can be determined according to the variety of the target tea field, and then the region of interest (ROI) range in the camera's field of view can be dynamically set based on the size information of the target tea field.

[0091] Using the camera, a regional point cloud set P is collected within the area of ​​interest. The regional point cloud set P can include N points, each of which The position is represented by .

[0092] In the embodiment of the present invention, by determining the area of ​​interest of the camera to collect a regional point cloud set, the interference of background noise and irrelevant point clouds is effectively reduced, so that the obtained regional point cloud set can be made more accurate.

[0093] On the basis of the above embodiment, the random sampling consistency algorithm is used to fit the candidate point set and construct a matrix equation, including:

[0094] Based on the random sampling consistency algorithm, in the candidate point set, a cutting knife model is fitted using the least square method to obtain multiple cutting knife models;

[0095] Based on the multiple cutter models, the matrix equation is constructed.

[0096] Specifically, when constructing the matrix equation, the RANRSAC algorithm can be used to fit the cutter model in the candidate point set using the least square method to obtain multiple cutter models. The cutter model can be fitted by a parabolic function.

[0097] Furthermore, by combining multiple cutting knife models, a matrix equation can be constructed.

[0098] On the basis of the above embodiment, the step of calculating the interior points in the candidate point set based on the matrix equation includes:

[0099] Calculating the fitting deviation of each point in the candidate point set;

[0100] The points in the candidate point set whose corresponding fitting deviations are less than a preset threshold are taken as the inliers.

[0101] Specifically, when calculating the inner points in the candidate point set, the fitting deviation of each point in the candidate point set can be calculated first. The fitting deviation can be the ordinate deviation, that is, the absolute value of the difference between the ordinate of each point and the fitting ordinate obtained by the abscissa of the point in the cutter model, which is:

[0102] ;

[0103] in, is the fitting deviation of the i-th point in the candidate point set, is the ordinate of the i-th point, The fitted ordinate is obtained by taking the abscissa of the i-th point.

[0104] Thereafter, the points in the candidate point set whose corresponding fitting deviation is less than a preset threshold are taken as inliers.

[0105] On the basis of the above embodiment, the particle swarm optimization algorithm is used to globally optimize the cutter model parameter combination with the preferred cutter model parameter combination as the initial global optimal position to obtain the global optimal model parameter combination, including:

[0106] Taking each combination of cutter model parameters as the position of each particle, taking the parameter change rate as the movement speed of each particle, adding an initial disturbance to the position of each particle, setting the initial movement speed and the initial individual optimal position of each particle, and initializing the particle swarm based on the initial global optimal position;

[0107] Iteratively updating the position and velocity of each particle in the particle swarm, and selecting the inverse of the fitting deviation at the position of each particle in the particle swarm as an adaptive function;

[0108] For any particle in the particle swarm, if the current fitness of any particle is better than the historical optimal fitness, the individual optimal position of any particle is updated; if the current fitness of any particle is better than the global optimal fitness, the global optimal position of any particle is updated until the preset conditions are met, and the global optimal position is output as the global optimal model parameter combination.

[0109] Specifically, the particle swarm optimization algorithm approaches the global optimal solution and optimizes the model parameter combination a, b, and c by simulating the flying behavior of particles in the solution space.

[0110] First, initialize the particle swarm and use the position of each particle to represent a model parameter combination , the speed of each particle represents the rate of change of the parameter. Set the initial global optimal position as the initial solution of the particle swarm optimization algorithm. The initial position of the i-th particle is , , , is the initial disturbance; the initial velocity of the i-th particle is ; The optimal position of the initial individual is .

[0111] In each iteration of the particle swarm optimization algorithm, the position of the particle is updated according to the following formula:

[0112] ;

[0113] in, is the position of the ith particle at time t+1, is the position of the ith particle at time t, is the velocity of the ith particle at time t+1.

[0114] Update the particle's velocity according to the following formula:

[0115] ;

[0116] in, is the velocity of the ith particle at time t, is the inertia weight, and is the learning factor, and is a random number is the position of the ith particle at time t, is the individual optimal position of the ith particle at time t, is the global optimal position at time t.

[0117] For each particle, the fitness function can be calculated according to the following formula:

[0118] ;

[0119] For each particle, if the current fitness of the particle is better than the historical optimal fitness, the individual optimal position of the particle is updated. ; If the current fitness of the particle is better than the global optimal fitness, then update the global optimal position .

[0120] Finally, the iteration ends when the preset condition is reached, and the global optimal position at this time is output as the global optimal model parameter combination. Here, the preset condition may be reaching the maximum number of iterations or the fitness function converges.

[0121] In summary, the pseudo code of the PSO-WSAC algorithm provided in the embodiment of the present invention is shown in Table 1.

[0122]

[0123]

[0124] Among them, P is the regional point cloud set, max_iterations is the maximum number of iterations, inlier ratiothreshold is the inlier ratio threshold, d is the preset threshold, and neighborhood radius is the neighborhood radius.

[0125] like Figure 3 As shown, based on the above embodiment, a cutting knife positioning device for tea picking is provided in an embodiment of the present invention, comprising:

[0126] Point cloud acquisition module 31, used to acquire a regional point cloud set of a target tea valley;

[0127] A cumulative distribution calculation module 32, used for calculating the sparsity of any point in the regional point cloud set, and calculating the cumulative distribution function value of any point based on the sparsity of any point;

[0128] A random weighted sampling module 33 is used to perform random weighted sampling on the regional point cloud set based on the cumulative distribution function value of each point in the regional point cloud set to obtain an initial point set, and determine a candidate point set located on a horizontal plane in the initial point set based on the height information and curvature information of the cutting knife;

[0129] A model parameter screening module 34 is used to fit the candidate point set based on a random sampling consistency algorithm, construct a matrix equation, calculate the interior points in the candidate point set based on the matrix equation, and screen out the preferred cutter model parameter combination in the coefficient matrix of the matrix equation based on the number of the interior points; the column elements of the coefficient matrix are the cutter model parameter combinations;

[0130] A global optimization module 35 is used to perform global optimization on the cutter model parameter combination based on a particle swarm optimization algorithm, taking the preferred cutter model parameter combination as an initial global optimal position, and obtain a global optimal model parameter combination;

[0131] The cutting knife positioning module 36 is used to determine the cutting knife model in the workpiece coordinate system based on the global optimal model parameter combination.

[0132] Based on the above embodiment, the regional point cloud set is obtained based on camera acquisition;

[0133] The point cloud acquisition module is specifically used for:

[0134] Based on the variety of the target tea field, determining the size information of the target tea field;

[0135] Based on the size information, determining the range of the region of interest of the camera;

[0136] Based on the scope of the region of interest, the regional point cloud set is collected.

[0137] Based on the above embodiment, the cumulative distribution calculation module is specifically used for:

[0138] Determining a sampling probability of the any point based on the sparsity of the any point;

[0139] Based on the sampling probability of the any point, a cumulative distribution function value of the any point is calculated.

[0140] Based on the above embodiment, the model parameter screening module is specifically used for:

[0141] Based on the random sampling consistency algorithm, in the candidate point set, a cutting knife model is fitted using the least square method to obtain multiple cutting knife models;

[0142] Based on the multiple cutter models, the matrix equation is constructed.

[0143] Based on the above embodiment, the model parameter screening module is specifically used for:

[0144] Calculating the fitting deviation of each point in the candidate point set;

[0145] The points in the candidate point set whose corresponding fitting deviations are less than a preset threshold are taken as the inliers.

[0146] Based on the above embodiment, the model parameter screening module is specifically used for:

[0147] Calculating an inlier rate based on the number of inliers and the total number of points in the candidate point set;

[0148] The cutting knife model parameter combination corresponding to the highest inlier rate in the coefficient matrix is ​​selected as the preferred cutting knife model parameter combination.

[0149] Based on the above embodiment, the global optimization module is specifically used for:

[0150] Taking each combination of cutter model parameters as the position of each particle, taking the parameter change rate as the movement speed of each particle, adding an initial disturbance to the position of each particle, setting the initial movement speed and the initial individual optimal position of each particle, and initializing the particle swarm based on the initial global optimal position;

[0151] Iteratively updating the position and velocity of each particle in the particle swarm, and selecting the inverse of the fitting deviation at the position of each particle in the particle swarm as an adaptive function;

[0152] For any particle in the particle swarm, if the current fitness of any particle is better than the historical optimal fitness, the individual optimal position of any particle is updated; if the current fitness of any particle is better than the global optimal fitness, the global optimal position of any particle is updated until the preset conditions are met, and the global optimal position is output as the global optimal model parameter combination.

[0153] Specifically, the functions of each module in the cutting knife positioning device for tea picking provided in the embodiment of the present invention correspond one-to-one to the operating procedures of each step in the above-mentioned method embodiment, and the effects achieved are also consistent. Please refer to the above-mentioned embodiment for details, and no further details will be given in the embodiment of the present invention.

[0154] Figure 4An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor (Processor) 410, a communication interface (Communications Interface) 420, a memory (Memory) 430 and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the cutting knife positioning method for tea picking provided in the above embodiments.

[0155] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0156] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the cutting knife positioning method for tea picking provided in the above-mentioned embodiments.

[0157] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the knife positioning method for tea picking provided in the above-mentioned embodiments.

[0158] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art 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 ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 invention.

Claims

1. A method for positioning a cutting knife for tea picking, characterized in that: include: Obtain the regional point cloud set of the target tea area; For any point in the regional point cloud set, calculate the sparsity of the any point, and based on the sparsity of the any point, calculate the cumulative distribution function value of the any point; Based on the cumulative distribution function value of each point in the regional point cloud set, the regional point cloud set is randomly weighted sampled to obtain an initial point set, and based on the height information and curvature information of the cutting knife, a candidate point set located on a horizontal plane in the initial point set is determined; Based on the random sampling consistency algorithm, the candidate point set is fitted to construct a matrix equation, and based on the matrix equation, the interior points in the candidate point set are calculated, and based on the number of the interior points, the preferred combination of cutting knife model parameters in the coefficient matrix of the matrix equation is screened out; the column elements of the coefficient matrix are the combination of cutting knife model parameters; the cutting knife model is a parabola; Based on the particle swarm optimization algorithm, taking the preferred cutter model parameter combination as the initial global optimal position, the cutter model parameter combination is globally optimized to obtain the global optimal model parameter combination; Based on the global optimal model parameter combination, determining a cutting knife model in a workpiece coordinate system; The step of calculating the interior points in the candidate point set based on the matrix equation includes: Calculating the fitting deviation of each point in the candidate point set; The points in the candidate point set whose corresponding fitting deviations are less than a preset threshold are taken as the inliers.

2. The method for positioning a cutting knife for picking tea ridges according to claim 1, characterized in that: The regional point cloud set is obtained based on camera acquisition; The step of obtaining a regional point cloud set of a target tea grove includes: Based on the variety of the target tea field, determining the size information of the target tea field; Based on the size information, determining the range of the region of interest of the camera; Based on the scope of the region of interest, the regional point cloud set is collected.

3. The method for positioning a cutting knife for picking tea ridges according to claim 1, characterized in that: The calculating the cumulative distribution function value of any point based on the sparsity of any point comprises: Determining a sampling probability of the any point based on the sparsity of the any point; Based on the sampling probability of the any point, a cumulative distribution function value of the any point is calculated.

4. The method for positioning a cutting knife for picking tea ridges according to claim 1, characterized in that: The method of fitting the candidate point set based on the random sampling consistency algorithm and constructing a matrix equation includes: Based on the random sampling consistency algorithm, in the candidate point set, a cutting knife model is fitted using the least square method to obtain multiple cutting knife models; Based on the multiple cutter models, the matrix equation is constructed.

5. The method for positioning a cutting knife for tea picking according to any one of claims 1 to 4, characterized in that: The step of selecting the optimal combination of cutter model parameters in the coefficient matrix of the matrix equation based on the number of the interior points includes: Calculating an inlier rate based on the number of inliers and the total number of points in the candidate point set; The cutting knife model parameter combination corresponding to the highest inlier rate in the coefficient matrix is ​​selected as the preferred cutting knife model parameter combination.

6. The method for positioning a cutting knife for tea picking according to any one of claims 1 to 4, characterized in that: The particle swarm optimization algorithm is based on which the preferred cutter model parameter combination is used as the initial global optimal position, and the cutter model parameter combination is globally optimized to obtain the global optimal model parameter combination, including: Taking each combination of cutter model parameters as the position of each particle, taking the parameter change rate as the movement speed of each particle, adding an initial disturbance to the position of each particle, setting the initial movement speed and the initial individual optimal position of each particle, and initializing the particle swarm based on the initial global optimal position; Iteratively updating the position and velocity of each particle in the particle swarm, and selecting the inverse of the fitting deviation at the position of each particle in the particle swarm as an adaptive function; For any particle in the particle swarm, if the current fitness of any particle is better than the historical optimal fitness, the individual optimal position of any particle is updated; if the current fitness of any particle is better than the global optimal fitness, the global optimal position of any particle is updated until the preset conditions are met, and the global optimal position is output as the global optimal model parameter combination.

7. A cutting knife positioning device for tea picking, characterized in that: include: Point cloud acquisition module, used to obtain the regional point cloud set of the target tea area; A cumulative distribution calculation module, used for calculating the sparsity of any point in the regional point cloud set, and calculating the cumulative distribution function value of any point based on the sparsity of any point; A random weighted sampling module, used for performing random weighted sampling on the regional point cloud set based on the cumulative distribution function value of each point in the regional point cloud set to obtain an initial point set, and determining a candidate point set located on a horizontal plane in the initial point set based on the height information and curvature information of the cutting knife; A model parameter screening module, used for fitting the candidate point set based on a random sampling consistency algorithm, constructing a matrix equation, and calculating the interior points in the candidate point set based on the matrix equation, and screening out the preferred cutter model parameter combination in the coefficient matrix of the matrix equation based on the number of the interior points; the column elements of the coefficient matrix are the cutter model parameter combinations; the cutter model is a parabola; A global optimization module is used to perform global optimization on the cutter model parameter combination based on a particle swarm optimization algorithm, taking the preferred cutter model parameter combination as an initial global optimal position, and obtain a global optimal model parameter combination; A cutting knife positioning module, used for determining a cutting knife model in a workpiece coordinate system based on the global optimal model parameter combination; The step of calculating the interior points in the candidate point set based on the matrix equation includes: Calculating the fitting deviation of each point in the candidate point set; The points in the candidate point set whose corresponding fitting deviations are less than a preset threshold are taken as the inliers.

8. 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 cutting knife positioning method for tea picking as described in any one of claims 1-6 is implemented.

9. 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 positioning a cutting knife for picking tea ridges as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Fast point cloud boundary extraction technique combined with improved particle swarm algorithm

    CN108320293A

  • Automatic profiling tea picking method based on RGB-D camera

    CN117152671A