Intelligent centering method and system for hedge trimmer
By collecting and processing data from the hedge trimmer in real time, and using intelligent algorithms to calculate the vibration and centering state of the tool, real-time centering control of the hedge trimmer is achieved, solving the problem of inflexible centering in traditional methods and improving the quality and efficiency of pruning.
Patent Information
- Application Number
- CN202510845052.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-23
AI Technical Summary
The existing hedge trimmers cannot achieve real-time centering and flexible adjustment based on the natural growth form of the hedge trimmer and the actual operating status of the pruning machine tool, resulting in poor trimming effect.
By collecting the inclination angle, acceleration data, operating power and RGB depth images of the trimmer, ICP, PointNet++, RANSAC, ant colony algorithm and YOLO algorithm are used to process point cloud data, identify tool and hedge areas, calculate tool vibration coefficient, centering coefficient and deviation degree, and perform real-time centering control.
The centering effect of the hedge trimmer is improved, ensuring that the trimming surface is flat and symmetrical, adapting to the trimming needs of complex shapes, and improving the trimming quality and efficiency.
Smart Images

Figure CN120355735A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hedge trimming control, and particularly relates to an intelligent centering method and system for a hedge trimmer. Background Art
[0002] A hedge trimmer is a mechanical device used for landscaping operations, widely applied in places such as highway isolation belts, parks, and residential areas to trim shrubs and hedges to make them neat and beautiful. Centering generally describes the adjustment of an object's position in space to make it in a central or symmetrical position. The centering of a hedge trimmer means making the cutting tool of the trimmer dynamically align with the geometric central axis of the hedge or a preset trimming path during operation, so as to ensure that the surface of the trimmed hedge is flat and symmetrical and can meet the trimming requirements for complex shapes. With the development of modern agriculture and garden management, higher requirements are put forward for the functionality, adaptability, battery life, and maintenance simplicity of garden operation equipment. Especially in complex terrains such as outdoor mountains, traditional garden operation equipment has gradually been unable to meet the needs of agronomic operations.
[0003] Currently, the trimming equipment for hedges still mainly relies on manual operation. However, in this method, the operator judges the alignment state between the cutter head and the hedge center line by the naked eye, which is easily affected by subjective factors such as fatigue and perspective error, resulting in an uneven trimming surface and making it difficult to achieve an ideal greening trimming effect. At the same time, current automatic hedge trimmers often use preset paths or mechanical guide rails for trimming, and cannot flexibly adjust the real-time centering based on the trimming effect and the actual operating state of the trimmer cutter, thus reducing the centering effect of the hedge trimmer. Summary of the Invention
[0004] In order to solve the technical problem that the existing method cannot flexibly adjust the real-time centering based on the natural growth form of the hedge and the actual operating state of the trimmer cutter, thereby reducing the centering effect of the hedge trimmer, the purpose of the present invention is to provide an intelligent centering method and system for a hedge trimmer, and the specific technical solutions adopted are as follows: The present invention proposes an intelligent centering method for a hedge trimmer, and the method includes: Determine the trimming path using the point cloud data of the hedge to be trimmed. During trimming, real-time obtain the tilt angle, acceleration data, operating power of the cutter, RGB depth image of the cutter direction, and the hue value, brightness value, and saturation value of the pixel points; Obtain the tool vibration coefficient at the current moment based on the tilt angle, operating power, and acceleration data at each moment within a preset time period before the current moment, as well as the change in the point cloud position of the trimming path; identify the tool area, the trimmed hedge area, and the untrimmed hedge area in the RGB-depth image; set multiple reference lines parallel to the center line of the tool area in the trimmed hedge area, and obtain the tool centering coefficient at the current moment according to the difference in depth values between the edge line pixel points of the tool area and the pixel points of the trimmed hedge area, and the change in depth values of the pixel points between the reference line and the center line of the tool area; obtain the trimming attitude deviation degree at the current moment based on the tool vibration coefficient and the tool centering coefficient; Perform edge detection on the untrimmed hedge area to obtain multiple stem edge lines, and obtain the hedge offset degree at the current moment according to the length of the stem edge lines and the hue value and saturation value of each pixel point; Perform real-time centering control on the hedge trimmer based on the trimming attitude deviation degree and the hedge offset degree.
[0005] Further, the determining the trimming path based on the point cloud data includes: Use the ICP algorithm, and based on the initial trimming model constructed from the point cloud data of the hedge to be trimmed, segment the hedge part in the initial trimming model through the PointNet++ algorithm, and use the statistical filtering algorithm to remove outliers to obtain the initial hedge point cloud model; Use the RANSAC algorithm to fit the initial hedge point cloud model to obtain an optimized hedge point cloud model, and in the initial hedge point cloud model, delete the point cloud data belonging to the optimal hedge point cloud model to obtain the hedge surface point cloud model; Use the ant colony algorithm to process the hedge surface point cloud model to obtain the trimming path.
[0006] Further, the obtaining the tool vibration coefficient at the current moment includes: Average the tilt angle and the operating power at each moment within the preset time period to obtain the tool vibration intensity at the current moment; Take the absolute value of the difference in the tilt angle between each moment and the adjacent next moment within the preset time period as the tilt angle change amount at each moment within the preset time period; average the tilt angle change amount and the acceleration data at each moment within the preset time period to obtain the first path deflection degree at the current moment; Perform curve fitting on the point cloud positions on the trimming path passed by the tool within a preset time period to obtain a fitted path curve. Take the absolute value of the difference in slope between each point cloud position on the fitted path curve and the next adjacent point cloud position as the position change amount of each point cloud position on the fitted path curve. Take the average value of the position change amounts of all point cloud positions on the fitted path curve as the second path deflection degree at the current moment. Synthesize the first path deflection degree and the second path deflection degree to obtain the path deflection complexity at the current moment. Synthesize the tool vibration intensity and the path deflection complexity to obtain the tool vibration coefficient at the current moment.
[0007] Further, identifying the tool area, the trimmed hedge area, and the untrimmed hedge area in the RGB-depth image at the current moment includes: Using the YOLO algorithm, identify the tool area and the hedge area in the RGB-depth image at the current moment. Taking the tool area as the boundary, along the moving direction of the trimming machine tool, take the hedge area before the tool area as the untrimmed hedge area, and take the hedge area after the tool area as the trimmed hedge area.
[0008] Further, obtaining the tool centering coefficient at the current moment includes: Take the edge line of the tool area on one side of the trimmed hedge area as the trimming edge line of the tool area. Take the pixel point in the trimmed hedge area that is closest to each pixel point of the trimming edge line as the comparison pixel point of each pixel point of the trimming edge line. After averaging the differences in depth values between each pixel point of the trimming edge line and the comparison pixel point and performing a negative correlation mapping, obtain the surface proximity degree between the tool and the trimmed hedge at the current moment. Take any reference line as the target reference line. Synthesize the brightness value and the saturation value of each pixel point of the target reference line to obtain the trimming evaluation value of each pixel point. Sort the trimming evaluation values of all pixel points of the target reference line to obtain the evaluation value sequence of the target reference line. In the evaluation value sequence, based on the two trimming evaluation values with the largest difference between the selected adjacent two trimming evaluation values, determine the first selection boundary value of the target reference line. Take the pixel points on the target reference line whose trimming evaluation values are greater than the first selection boundary value as the trimming pixel points of the target reference line. Select a reference pixel point of the center line of the tool area with respect to the target reference line on the center line of the tool area, where the position serial number of the reference pixel point on the center line of the tool area is the same as the position serial number of the trimming pixel point on the target reference line. Sort the depth values of the trimmed pixels of the target reference line and the depth values of the reference pixels of the center line of the tool area in sequence according to the positions of the pixels, to obtain a first depth value sequence of the center line of the tool area and a second depth value sequence of the target reference line; Analyze the correlation between the first-order difference sequence of the first depth value sequence and the first-order difference sequence of the second depth value sequence, to obtain the height change correlation degree of the target reference line, and take the average value of the height change correlation degrees of all reference lines as the height similarity of the trimmed hedge at the current moment; Integrate the surface proximity degree and the height similarity to obtain the tool centering coefficient at the current moment.
[0009] Further, the obtaining of the trimming posture deviation degree at the current moment includes: Perform a negative correlation mapping on the tool centering coefficient at the current moment to obtain the tool offset coefficient at the current moment; Integrate the tool offset coefficient and the tool vibration coefficient at the current moment to obtain the trimming posture deviation degree at the current moment.
[0010] Further, the edge detection of the untrimmed hedge area to obtain multiple stem edge lines includes: Perform edge detection on the untrimmed hedge area to obtain multiple edge lines of the untrimmed hedge area, and perform linear fitting on the pixels on each stem edge line of the untrimmed hedge area to obtain the fitting straight line of each stem edge line; Select the stem edge lines from all the edge lines of the untrimmed hedge area, where the extension line of the fitting straight line of the stem edge line passes through the tool area.
[0011] Further, the obtaining of the hedge offset degree at the current moment includes: Perform a negative correlation mapping on the fitting error between each stem edge line and the corresponding fitting straight line and then perform normalization processing to obtain the weight parameter of each stem edge line, and use the weight parameters of each stem edge line to perform weighted summation on the lengths of each stem edge line to obtain the first hedge offset coefficient at the current moment; Sort the depth values of all pixel points in the untrimmed hedge area to obtain the third depth value sequence of the untrimmed hedge area. In the third depth value sequence, select two depth values with the largest absolute value of the difference between two adjacent depth values, and use the maximum value of the two selected depth values as the second selection boundary value of the untrimmed hedge area. Pixel points in the untrimmed hedge area with depth values greater than the second selection boundary value are used as leaf pixel points of the untrimmed hedge area. Perform a negative correlation mapping on the average value obtained by synthesizing the hue value and the saturation value of each leaf pixel point in the untrimmed hedge area to obtain the second hedge offset coefficient at the current moment; Synthesize the first hedge offset coefficient and the second hedge offset coefficient to obtain the hedge offset degree at the current moment.
[0012] Further, the real-time centering control of the hedge trimmer includes: Synthesize the trimming attitude deviation degree and the hedge offset degree to obtain the tool centering adjustment intensity at the current moment; Use the included angle between the cutting plane and the horizontal plane at the position of the tool of the optimal hedge point cloud model at the current moment as the expected inclination angle at the current moment, and use the absolute value of the difference between the inclination angle and the expected inclination angle at the current moment as the inclination angle error value at the current moment; Based on the calculation formula of the tool centering adjustment parameter, obtain the tool centering adjustment parameter at the current moment. The calculation formula of the tool centering adjustment parameter is:
[0013] Among them, represents the tool centering adjustment parameter at the current moment; represents the tool centering adjustment intensity at the current moment; represents the inclination angle error value at the current moment; represents the normalization function; Use the tool centering adjustment parameter at the current moment as the proportional gain coefficient of the PID controller, and use the PID controller to perform real-time centering control on the trimmer tool.
[0014] The present invention also proposes an intelligent centering system for a hedge trimmer. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of any one of the intelligent centering methods for a hedge trimmer.
[0015] The present invention has the following beneficial effects: In view of the fact that the existing methods cannot achieve real-time centering and flexible adjustment based on the natural growth form of the hedge and the actual operating state of the trimmer cutter, which reduces the centering effect of the hedge trimmer. Therefore, the trimming path is first determined, and during the process of the trimmer advancing along the trimming path, the tilt angle of the cutter, acceleration data, operating power, and RGB depth image in the cutter direction are collected in real time. Considering that the operating posture of the trimmer cutter is affected by the vibration generated during the actual operation of the cutter, the real-time vibration degree of the cutter during the advancing process of the trimmer is first reflected by the obtained cutter vibration coefficient. At the same time, considering that when the centering effect of the trimmer cutter is better, the trimming effect on the hedge is also better. At this time, the distance between the trimmed hedge and the cutter surface is relatively close, and the heights of each position of the trimmed hedge are relatively close and similar to the height distribution of each position of the cutter. Therefore, the centering state of the trimmer cutter at the current moment can be reflected by the obtained cutter centering coefficient, and then the deviation degree of the trimming posture of the trimmer at the current moment can be reflected by the trimming posture deviation degree. Considering that during the hedge trimming process, when the centering state of the trimmer cutter is unstable, the blade fails to directly contact the hedge stem, resulting in the hedge stem being pushed and shifted. Therefore, the degree of hedge offset caused by unstable cutter centering at the current moment can be reflected by the obtained hedge offset degree. Then, by combining the trimming posture deviation degree and the hedge offset degree, real-time centering control of the hedge trimmer is performed, so that more flexible centering adjustment can be carried out based on the trimming effect and the actual operating state of the trimmer cutter, and the centering effect of the hedge trimmer is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the accompanying drawings required for the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is a flowchart of an intelligent centering method for a hedge trimmer provided by an embodiment of the present invention; Figure 2 It is a side view schematic diagram of the trimmer provided by an embodiment of the present invention; Figure 3 It is a schematic diagram of the initial trimming model provided by an embodiment of the present invention; Figure 4 It is a schematic diagram of the optimal hedge point cloud model and the hedge surface point cloud model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following specifically describes, in conjunction with the accompanying drawings and preferred embodiments, a smart centering method and system for a hedge trimmer according to the present invention, including its specific implementation manner, structure, features and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0020] The following specifically describes the specific solution of a smart centering method and system for a hedge trimmer provided by the present invention in conjunction with the accompanying drawings.
[0021] Please refer to Figure 1 , which shows a flowchart of a smart centering method for a hedge trimmer provided by an embodiment of the present invention. The method includes: Step S1: Determine the trimming path using the point cloud data of the hedge to be trimmed. During the trimming process, the tilt angle, acceleration data, operating power of the tool, RGB depth image of the tool direction, and hue value, brightness value, and saturation value of the pixel points are obtained in real time.
[0022] The common shapes of hedges are generally rotating bodies, such as cylinders, cones, spheres, etc. Currently, the mechanized equipment for hedge trimming is equipped with a tool that can rotate 360° at the position of the robotic arm. The working mode of the hedge trimming equipment is generally to drive a vehicle manually to the vicinity of the hedge to be trimmed, and then manually operate the robotic arm above the center position of the hedge, and then use the installed tool to rotate and trim with the central axis of the hedge as the rotation center. This operation mode has a very low degree of automation, and the centering process between the tool position and the hedge completely depends on manual labor, mainly using the human eye to perform manual centering through video. As a result, this method is not only time-consuming and laborious, but also requires a high level of proficiency of the operator. Therefore, it is difficult to improve the hedge trimming efficiency and ensure the trimming quality.
[0023] In the embodiment of the present invention, a structured light camera and an IMU inertial motion unit are first installed on the trimmer. Please refer to Figure 2, which shows a side view schematic diagram of the trimmer provided by an embodiment of the present invention. When trimming a hedge is required, first operate the robotic arm, and use the structured light camera installed on the robotic arm to surround and photograph the hedge to be trimmed, obtaining multiple RGB-depth images of the hedge to be trimmed. In an embodiment of the present invention, a spherical hedge is taken as an example. Among them, the pixel points of the RGB-depth image have four channels, namely the R value, the G value, the B value, and the depth value. The depth value represents the distance from the pixel point to the camera. Then, combining the camera internal parameters and the imaging principle of the camera and combining multiple RGB-depth images of the hedge to be trimmed, the corresponding point cloud data is obtained. Among them, converting multiple RGB-depth images into point cloud data is a well-known technical means for those skilled in the art and will not be elaborated here.
[0024] Then, based on the point cloud data, determine the trimming path, and subsequently the trimmer can trim the hedge along this trimming path.
[0025] Preferably, in an embodiment of the present invention, the method for obtaining the trimming path specifically includes: Use the ICP algorithm and, based on the initial trimming model constructed from the point cloud data of the hedge to be trimmed, please refer to Figure 3 , which shows a schematic diagram of the initial trimming model provided by an embodiment of the present invention. Since the initial trimming model not only contains the point cloud data belonging to the hedge part, but also contains the point cloud data belonging to the background part and the outlier point cloud data, the hedge part in the initial trimming model can be segmented by the PointNet++ algorithm, and the outlier points can be removed by using the statistical filtering algorithm, so as to obtain the initial hedge point cloud model.
[0026] Use the RANSAC algorithm to fit the initial hedge point cloud model to obtain an optimized hedge point cloud model. The RANSAC algorithm can optimize the point cloud model and optimize the point cloud model into a regular shape. Since the hedge to be trimmed in an embodiment of the present invention is spherical, the optimized hedge point cloud model after being optimized by the RANSAC algorithm is close to spherical. Then, in the initial hedge point cloud model, delete the point cloud data belonging to the optimal hedge point cloud model, so as to obtain the hedge surface point cloud model. Please refer to Figure 4 , which shows a schematic diagram of the optimal hedge point cloud model and the hedge surface point cloud model provided by an embodiment of the present invention. Then, the ant colony algorithm can be used to process the hedge surface point cloud model to obtain the trimming path. Among them, determining the path by the ant colony algorithm is a well-known technical means for those skilled in the art and will not be elaborated here.
[0027] After determining the pruning path of the hedge, the pruning machine can perform pruning operations along the pruning path. During the process of the pruning machine pruning along the pruning path, the inclination angle and acceleration data of the tool are collected in real time through the IMU inertial motion unit. Among them, the inclination angle represents the angle between the tool and the horizontal direction, and the value range is 0 to 90 degrees. The operating power of the tool is collected in real time through the power monitoring system of the pruning machine. At the same time, the RGB depth image in the tool direction is collected in real time through the structured light camera. Among them, the RGB depth image contains tool image features and hedge image features.
[0028] At the same time, the embodiment of the present invention also needs to perform color space conversion on the RGB depth image based on the R, G, and B channel values of the pixel points in the RGB depth image, convert it to the HSV color space, and obtain the hue value, brightness value, and saturation value of the pixel points in the RGB depth image, which is convenient for subsequent analysis of the color features of the pixel points in the RGB depth image.
[0029] It should be noted that the acquisition frequencies of various types of data may be different. Therefore, during the data acquisition process, sampling or interpolation methods need to be used to synchronize various types of data for subsequent data analysis.
[0030] Step S2: Obtain the tool vibration coefficient at the current moment according to the inclination angle, operating power, acceleration data at each moment within a preset time period before the current moment, and the point cloud position change of the pruning path; identify the tool area, the pruned hedge area, and the unpruned hedge area in the RGB depth image; set multiple reference lines parallel to the center line of the tool area in the pruned hedge area, and obtain the tool centering coefficient at the current moment according to the depth value difference between the edge line pixel points of the tool area and the pixel points of the pruned hedge area, and the depth value change of the pixel points between the reference line and the center line of the tool area; obtain the pruning attitude deviation degree at the current moment based on the tool vibration coefficient and the tool centering coefficient.
[0031] The trimming attitude of the trimming machine tool is affected during the actual operation of the tool. The hedge trimmer completes the trimming operation through a cutting blade that reciprocates at high speed. The inertial force of the blade movement will directly cause mechanical vibration, which may result in the tool not trimming at the expected angle. In addition, under different tilting angles of the tool, the influence of the inertial force generated by the tool movement on the vibration of the trimmer is different. For example, when the tool face of the trimmer tool is more perpendicular to the ground, the direction of the inertial force generated by the tool movement is closer to the direction of the gravity of the trimmer, and the degree of vibration generated is stronger. Then, the centering stability of the trimmer tool attitude is worse. At the same time, when the trimming path is more complex, the robotic arm needs to rotate and change directions more frequently. At this time, it will also cause vibration of the tool, thereby reducing the centering stability of the tool. And the tool is often affected by the above-mentioned unstable factors for a period of time. Therefore, the tilting angle, operating power, acceleration data at each moment within a preset period before the current moment of the tool, and the change of the point cloud position at each point on the trimming path can be analyzed. The real-time vibration degree of the tool during the operation and propulsion of the trimmer is reflected by the obtained tool vibration coefficient. Among them, the length range of the preset period is usually 10 to 30. In an embodiment of the present invention, the length of the preset period is set to 15, that is, the preset period includes 15 moments before the current moment. The specific length of the preset period can also be set by the implementer according to the specific implementation scenario, which is not limited herein.
[0032] Preferably, in an embodiment of the present invention, the method for obtaining the tool vibration coefficient at the current moment specifically includes: First, when the tilting angle of the tool is larger and closer to 90 degrees, it indicates that the tool is more perpendicular to the ground. At this time, the operating power of the trimmer is larger, and the generated vibration is stronger. Therefore, the tilting angles and operating powers at each moment within the preset period can be combined and averaged to obtain the tool vibration intensity at the current moment. The greater the tool vibration intensity, the more obvious the vibration of the tool in the short term.
[0033] In the embodiment of the present invention, the combination of the tilting angle and the operating power can be realized by calculating the sum value or product value of the tilting angle and the operating power at a certain moment, which is not limited herein. And the subsequent steps of comprehensively processing two or more data can also be realized by using the same method.
[0034] Then, the absolute value of the difference in the tilting angle between each moment and the next adjacent moment within the preset period is used as the tilting angle change amount at each moment within the preset period. The tilting angle change amounts and acceleration data at each moment within the preset period are combined and averaged to obtain the first path deflection degree at the current moment. The greater the first path deflection degree, the more obvious the change in the tilting angle and speed of the tool during the short-term propulsion of the trimmer, and thus the more obvious the vibration of the tool in the short term.
[0035] It should be noted that there is no adjacent next moment for the last moment of the preset time period. At this time, the average value of the inclination angle change amounts of all the moments before the last moment of the preset time period can be used as the inclination angle change amount of the last moment, which is convenient for subsequent calculations.
[0036] Perform curve fitting on the point cloud positions on the trimming path passed by the tool within the preset time period to obtain a fitted path curve. Among them, the least squares method or other methods can be selected to implement curve fitting, which is not limited herein. Then, the absolute value of the difference in slope between each point cloud position on the fitted path curve and the adjacent next point cloud position is used as the position change amount of each point cloud position on the fitted path curve. The average value of the position change amounts of all the point cloud positions on the fitted path curve is used as the second path deflection degree at the current moment. The larger the second path deflection degree, the more frequent the change in the advancing direction of the trimmer in the short term, and the more obvious the vibration of the tool caused in the short term. Furthermore, the first path deflection degree and the second path deflection degree are integrated to obtain the path deflection complexity at the current moment.
[0037] It should be noted that there is no adjacent next point cloud position for the last point cloud position on the fitted path curve. At this time, the average value of the position change amounts of all the point cloud positions before the last point cloud position on the fitted path curve can be used as the position change amount of the last point cloud position, which is convenient for subsequent calculations.
[0038] Finally, the tool vibration intensity and the path deflection complexity are integrated to obtain the tool vibration coefficient at the current moment.
[0039] As an example, in an embodiment of the present invention, the expression of the tool vibration coefficient at the current moment can be specifically, for example:
[0040] Among them, represents the tool vibration coefficient at the current moment; represents the tool vibration intensity at the current moment; represents the path deflection complexity at the current moment; represents the inclination angle at the th moment within the preset time period; represents the operating power at the th moment within the preset time period; represents the number of moments within the preset time period before the current moment of the tool; represents the inclination angle at the th moment within the preset time period; represent the acceleration data at the th moment within a preset time period; represent the change in position of the th point cloud position on the fitted path curve; represent the first path deflection at the current moment; represent the second path deflection at the current moment; represent the number of point cloud positions on the fitted path curve.
[0041] Considering that when the centering effect of the trimming machine tool is better, its trimming effect on the hedge is also better. At this time, the distance between the trimmed hedge and the tool surface is relatively close, and the heights of different positions of the trimmed hedge are relatively close and similar to the height distribution of different positions of the tool. Therefore, in the embodiments of the present invention, the tool area, the trimmed hedge area, and the untrimmed hedge area are first identified in the RGB-depth image at the current moment.
[0042] Preferably, in an embodiment of the present invention, the method for obtaining the tool area, the trimmed hedge area, and the untrimmed hedge area in the RGB-depth image specifically includes: Using the existing YOLO algorithm, the tool area and the hedge area are identified in the RGB-depth image at the current moment. Then, with the tool area as the boundary and along the moving direction of the trimming machine tool, the hedge area before the tool area is used as the untrimmed hedge area, and the hedge area after the tool area is used as the trimmed hedge area.
[0043] Then, a preset number of reference lines parallel to the center line of the tool area are evenly set in the trimmed hedge area. Among them, the preset number is set to 20 - 40. In an embodiment of the present invention, the preset number is set to 30. The specific length of the preset number can also be set by the implementer according to the specific implementation scenario and is not limited herein. It should be noted that the trimming machine tool is generally strip-shaped, and the center line of the tool area refers to the central axis of the tool.
[0044] As can be seen from the above analysis, when the centering effect of the trimmer tool is good, the distance between the surface of the trimmed hedge and the surface of the tool is relatively close. At this time, the difference in depth values between the pixel points on the edge line of the tool area on one side of the trimmed hedge area and the pixel points of the trimmed hedge area is small. At the same time, when the centering effect of the trimmer tool is good, the heights of each position of the trimmed hedge are relatively close and the height distribution is similar to that of each position of the tool. At this time, the change in the depth value of the pixel points on the reference line is relatively consistent with the change in the depth value of the pixel points on the center line of the tool area. Therefore, the difference in depth values between the pixel points on the edge line of the tool area on one side of the trimmed hedge area and the pixel points of the trimmed hedge area, and the correlation between the change in the depth value of the pixel points between each reference line and the center line of the tool area can be analyzed. The centering state of the trimmer tool at the current moment is reflected by the obtained tool centering coefficient. The larger the tool centering coefficient, the better the centering effect of the trimmer tool at the current moment.
[0045] Preferably, in an embodiment of the present invention, the method for obtaining the tool centering coefficient at the current moment specifically includes: First, the edge line of the tool area on one side of the trimmed hedge area is used as the trimming edge line of the tool area, and the pixel point in the trimmed hedge area that is closest to each pixel point of the trimming edge line is used as the comparison pixel point of each pixel point of the trimming edge line. After averaging the absolute value of the difference in depth values between each pixel point of the trimming edge line and the corresponding comparison pixel point and performing a negative correlation mapping, the surface proximity degree between the tool and the trimmed hedge at the current moment is obtained. The greater the surface proximity degree, the closer the distance between the surface of the trimmed hedge and the surface of the tool at this time, and the better the centering effect of the trimmer tool.
[0046] Then, considering that there are not only pixel points representing the cut of the trimmed hedge in the trimmed hedge area, but also pixel points representing the internal branches and leaves that have not been trimmed, in the subsequent process of analyzing the correlation, pixel points representing the cut of the trimmed hedge should be selected as much as possible for analysis to improve the evaluation accuracy. Compared with the long-term occlusion and insufficient light of the internal branches and leaves that have not been trimmed, the cut or leaf section of the hedge trimming surface is exposed to stronger light, and the brightness and saturation of its pixel points are higher.
[0047] Therefore, first, take any one of the reference lines as the target reference line, synthesize the brightness value and saturation value of each pixel point on the target reference line to obtain the trimming evaluation value of each pixel point on the target reference line. The larger the trimming evaluation value of a certain pixel point on the target reference line, the more likely it is that the pixel point represents the hedge incision. Sort the trimming evaluation values of all pixel points on the target reference line to obtain the evaluation value sequence of the target reference line. Among them, the sorting method can be either in ascending or descending order of the trimming evaluation value. In the evaluation value sequence, select two trimming evaluation values with the largest absolute value of the difference between adjacent two trimming evaluation values, and take the maximum value of the two selected trimming evaluation values as the first selection boundary value of the target reference line, and take the pixel points on the target reference line with trimming evaluation values greater than the first selection boundary value as the trimming pixel points of the target reference line. The trimming pixel points are the pixel points of the trimmed hedge incision. Then, select the reference pixel points of the tool area center line with respect to the target reference line on the tool area center line. Among them, the position serial number of the reference pixel point on the tool area center line is the same as the position serial number of the trimming pixel point on the target reference line. That is to say, a certain reference pixel point on the target reference line and a corresponding trimming pixel point on the target reference line are in the same row.
[0048] According to the position order of the pixel points, for example, in the order from top to bottom or from bottom to top of the RGB depth image, sort the depth values of the trimming pixel points of the target reference line and the depth values of the reference pixel points of the tool area center line respectively to obtain the first depth value sequence of the tool area center line and the second depth value sequence of the target reference line. Then, take the absolute value of the Pearson correlation coefficient between the first-order difference sequence of the first depth value sequence and the first-order difference sequence of the second depth value sequence as the height change correlation degree between the target reference line and the tool area center line. By the same method as above, the height change correlation degree between each reference line and the tool area center line can be obtained. The larger the height change correlation degree, the closer the heights of the positions of the trimmed hedge along the tool direction are and the more similar the height distribution of the positions along the tool direction is. Furthermore, the average value of the height change correlation degrees between all reference lines and the tool area center line can be taken as the height similarity of the trimmed hedge at the current moment.
[0049] Finally, synthesize the surface proximity degree and the height similarity to obtain the tool centering coefficient at the current moment.
[0050] As an example, in an embodiment of the present invention, the expression of the tool centering coefficient at the current moment can be specifically, for example:
[0051] Among them, represents the tool centering coefficient at the current moment; represents the surface proximity between the tool and the pruned hedge at the current moment; represents the height similarity of the pruned hedge at the current moment; represents the depth value of the th pixel point of the pruning edge line; depth value of the comparison pixel point of the th pixel point of the pruning edge line; represents the number of pixel points on the pruning edge line; represents the height change correlation between the th reference line and the center line of the tool area; represents a preset first adjustment parameter for preventing the denominator from being zero, whose value range is , in an embodiment of the present invention, is set to 0.01, The specific value of
[0052] can also be set by the implementer according to the specific implementation scenario, and is not limited herein.
[0053] It should be noted that in other embodiments of the present invention, negative correlation mapping can also be achieved through other basic mathematical operations, which are not limited herein.
[0054] Preferably, in an embodiment of the present invention, the method for obtaining the pruning posture deviation degree at the current moment specifically includes: Performing negative correlation mapping on the tool centering coefficient at the current moment to obtain the tool offset coefficient at the current moment, and synthesizing the tool offset coefficient and the tool vibration coefficient at the current moment to obtain the pruning posture deviation degree at the current moment.
[0055] As an example, in an embodiment of the present invention, the expression of the pruning posture deviation degree at the current moment can be specifically, for example:
[0056] Among them, represents the pruning posture deviation degree at the current moment; Represents the tool centering coefficient at the current moment; Represents the tool offset coefficient at the current moment; Represents the tool vibration coefficient at the current moment; Represents a preset second adjustment parameter for preventing the denominator from being zero, The value range of , in an embodiment of the present invention, is set to 0.01, The specific value of
[0057] So far, the analysis of the real-time deviation of the centering trimming posture of the trimmer has been completed.
[0058] Step S3: Perform edge detection on the untrimmed hedge area to obtain multiple stem edge lines, and obtain the hedge offset at the current moment according to the lengths of the stem edge lines and the hue values and saturation values of each pixel point.
[0059] During the hedge trimming process, when the centering state of the trimming tool is unstable, the blade fails to directly contact the hedge stem, resulting in the hedge stem being pushed and offset. The offset hedge stem is mainly reflected by the state of the hedge plants in the untrimmed area. After the offset hedge branch is pushed away by the hedge trimmer, it shows a trend of spreading outward from the center of the trimmer. In the RGB depth image, part of the hedge stem is exposed to the camera's field of view. Compared with the edges of the surface leaves, these stems have longer and approximately straight edge features. Therefore, edge detection can be first performed on the untrimmed hedge area to obtain multiple stem edge lines.
[0060] Preferably, in an embodiment of the present invention, the method for obtaining multiple stem edge lines in the untrimmed hedge area specifically includes: Perform edge detection on the untrimmed hedge area to obtain multiple edge lines of the untrimmed hedge area, perform linear fitting on the pixel points on each stem edge line of the untrimmed hedge area to obtain the fitted line of each stem edge line. Among them, existing least squares method or other methods can be used to achieve linear fitting, which is not limited here. Then select the stem edge lines from all the edge lines of the untrimmed hedge area, where the extension line of the fitted line of the stem edge line passes through the tool area.
[0061] From the above analysis, it can be seen that the hedge stems have long edge features. When the hedge stems are pushed and displaced, in addition to the exposure of the stems, the back sides of the leaves of the pushed - aside hedges are also exposed in the camera's field of view. Compared with the front sides of the leaves, the back sides of the leaves have a relatively rough surface, strong diffuse reflection, and lower saturation in the image. In addition, compared with the back sides of the leaves, the front sides of the leaves are closer to pure green, so the hue value of the back sides of the leaves is lower. Therefore, the lengths of the edge lines of each stem in the untrimmed hedge area, as well as the hue value and saturation value of each pixel point, can be analyzed. The degree of hedge displacement caused by unstable tool centering at the current moment can be reflected by the obtained hedge displacement degree. Subsequently, in combination with the trimming attitude deviation degree at the current moment, real - time centering control of the hedge trimmer can be carried out.
[0062] Preferably, in an embodiment of the present invention, the method for obtaining the hedge displacement degree at the current moment specifically includes: First, after performing a negative - correlation mapping on the fitting error between each stem edge line and the corresponding fitting straight line and then normalizing it, the weight parameter of each stem edge line is obtained. Among them, the fitting error can be expressed by the root - mean - square error, which is not limited herein. Since the hedge stems have longer edge features that are approximately straight in shape, the larger the weight parameter, the more likely the stem edge line represents the real hedge stem. Therefore, the weighted sum of the lengths of each stem edge line can be calculated using the weight parameters of each stem edge line to obtain the first hedge displacement coefficient at the current moment.
[0063] As an example, in an embodiment of the present invention, the expression of the first hedge displacement coefficient at the current moment can be specifically, for example:
[0064] Among them, represents the first hedge displacement coefficient at the current moment; represents the weight parameter of the th stem edge line in the untrimmed hedge area; represents the th stem edge line in the untrimmed hedge area. The length can be represented by the number of pixel points on the stem edge line; represents the th fitting error between the stem edge line and the corresponding fitting straight line; represents the th fitting error between the stem edge line and the corresponding fitting straight line; represents the number of stem edge lines in the untrimmed hedge area; represents a preset third adjustment parameter used to prevent the denominator from being 0, The value range of , in an embodiment of the present invention, is set to 0.01, The specific value of can also be set by the implementer according to the specific implementation scenario and is not limited herein.
[0065] Among them, is used to perform normalization processing, so that the sum value of the weight parameters of all stem edge lines is equal to the numerical value 1.
[0066] Then, sort the depth values of all pixel points in the untrimmed hedge area to obtain the third depth value sequence of the untrimmed hedge area. Among them, the sorting method can be in the ascending or descending order of the depth value and is not limited herein. In the third depth value sequence, select the two depth values with the largest absolute value of the difference between two adjacent depth values, and use the maximum value of the two selected depth values as the second selected boundary value of the untrimmed hedge area. Pixel points in the untrimmed hedge area with depth values greater than the second selected boundary value are used as the leaf pixel points of the untrimmed hedge area. Perform negative correlation mapping on the average value obtained by synthesizing the hue value and saturation value of each leaf pixel point in the untrimmed hedge area to obtain the second hedge offset coefficient at the current moment.
[0067] As an example, in an embodiment of the present invention, the expression of the second hedge offset coefficient at the current moment can be specifically, for example:
[0068] Among them, represents the second hedge offset coefficient at the current moment; represents the th leaf pixel point in the untrimmed hedge area; represents the th leaf pixel point in the untrimmed hedge area; represents the number of leaf pixel points in the untrimmed hedge area; represents a preset fourth adjustment parameter for preventing the denominator from being 0, The value range of is , in an embodiment of the present invention, is set to 0.01, The specific value of can also be set by the implementer according to the specific implementation scenario and is not limited herein.
[0069] The larger the first hedge offset coefficient and the second hedge offset coefficient, the greater the degree of offset of the untrimmed hedge at the current moment due to being pushed. Furthermore, the first hedge offset coefficient and the second hedge offset coefficient can be synthesized to obtain the hedge offset degree at the current moment.
[0070] As an example, in an embodiment of the present invention, the expression of the hedge offset at the current moment can be specifically, for example:
[0071] Wherein, represents the hedge offset at the current moment; represents the first hedge offset coefficient at the current moment; represents the second hedge offset coefficient at the current moment.
[0072] Thus, the analysis of the situation where the hedge stems are pushed and offset due to the unstable centering state of the pruning tool is completed.
[0073] Step S4: Based on the pruning attitude deviation and the hedge offset, perform real-time centering control on the hedge trimmer.
[0074] The greater the pruning attitude deviation and the hedge offset at the current moment, the worse the centering state of the trimmer at the current moment. Therefore, real-time centering control can be performed on the hedge trimmer based on the pruning attitude deviation and the hedge offset, so as to improve the centering effect of the hedge trimmer.
[0075] Preferably, in an embodiment of the present invention, the method for performing real-time centering control on the hedge trimmer specifically includes: Integrate the pruning attitude deviation and the hedge offset to obtain the tool centering adjustment intensity at the current moment. The greater the tool centering adjustment intensity, the greater the degree of adjustment required for the trimmer tool to ensure the centering state.
[0076] Take the included angle between the tangent plane and the horizontal plane of the position of the tool in the optimal hedge point cloud model at the current moment as the expected tilt angle at the current moment, and take the absolute value of the difference between the tilt angle at the current moment and the expected tilt angle as the tilt angle error value at the current moment. The greater the tilt angle error value, the more the tilt angle at the current moment deviates from the ideal angle.
[0077] Based on the calculation formula of the tool centering adjustment parameter, obtain the tool centering adjustment parameter at the current moment. The calculation formula of the tool centering adjustment parameter is:
[0078] Wherein, represents the tool centering adjustment parameter at the current moment; represents the tool centering adjustment intensity at the current moment; represents the tilt angle error value at the current moment; represents the normalization function, which is used to limit the normalized value within so that The value range of , in an embodiment of the present invention, the normalization process can be, for example, the maximum-minimum normalization process. In other embodiments of the present invention, other normalization methods can be selected according to the specific value range, which will not be elaborated herein.
[0079] Furthermore, the tool centering adjustment parameter at the current moment is used as the proportional gain coefficient of the PID controller, and the PID controller is used to perform real-time centering control on the hedge trimmer tool. Specifically, the PID controller realizes the centering adjustment of the hedge trimmer tool by adjusting the relative position and tilt angle of the tool, etc.
[0080] An embodiment of the present invention provides an intelligent centering system for a hedge trimmer. The system includes a memory, a processor, and a computer program. The memory is used to store the corresponding computer program, and the processor is used to run the corresponding computer program. When the computer program runs in the processor, it can implement the methods described in steps S1 to S4.
[0081] It should be noted that: the above sequence of embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0082] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments.
Claims
1. An intelligent centering method for a hedge trimmer, characterized in that, The method includes: Determining a trimming path using the point cloud data of the hedge to be trimmed. During the trimming process, the tilt angle, acceleration data, operating power of the tool, RGB depth image of the tool direction, and hue value, brightness value, and saturation value of the pixel points are obtained in real time. Based on the tilt angle, operating power, and acceleration data at each moment within a preset period before the current moment, as well as the change in the point cloud position of the trimming path, the tool vibration coefficient at the current moment is obtained. The tool area, trimmed hedge area, and untrimmed hedge area are identified in the RGB depth image. Multiple reference lines parallel to the center line of the tool area are set in the trimmed hedge area. Based on the difference in depth values between the edge line pixel points of the tool area and the pixel points of the trimmed hedge area, and the change in depth values of the pixel points between the reference line and the center line of the tool area, the tool centering coefficient at the current moment is obtained. Based on the tool vibration coefficient and the tool centering coefficient, the trimming attitude deviation degree at the current moment is obtained. Edge detection is performed on the untrimmed hedge area to obtain multiple stem edge lines. Based on the length of the stem edge lines and the hue value and saturation value of each pixel point, the hedge offset degree at the current moment is obtained. Based on the trimming attitude deviation degree and the hedge offset degree, real-time centering control of the hedge trimmer is performed.
2. The intelligent centering method for a hedge trimmer according to claim 1, characterized in that, The determination of the trimming path includes: Using the ICP algorithm and based on the initial trimming model constructed from the point cloud data of the hedge to be trimmed, the hedge part in the initial trimming model is segmented by the PointNet++ algorithm, and the outlier points are removed using the statistical filtering algorithm to obtain the initial hedge point cloud model. Using the RANSAC algorithm to fit the initial hedge point cloud model to obtain an optimized hedge point cloud model, and in the initial hedge point cloud model, the point cloud data belonging to the optimal hedge point cloud model is deleted to obtain the hedge surface point cloud model. Using the ant colony algorithm to process the hedge surface point cloud model to obtain the trimming path.
3. The intelligent centering method for a hedge trimmer according to claim 1, characterized in that The obtaining of the tool vibration coefficient at the current moment includes: The tilt angle and the operating power at each moment within the preset period are combined and averaged to obtain the tool vibration intensity at the current moment. The absolute value of the difference in the tilt angle between each moment and the adjacent next moment within the preset period is used as the tilt angle change amount at each moment within the preset period. The tilt angle change amount and the acceleration data at each moment within the preset period are combined and averaged to obtain the first path deflection degree at the current moment. The point cloud positions on the trimming path passed by the tool within the preset period are curve-fitted to obtain a fitted path curve. The absolute value of the difference in the slope between each point cloud position on the fitted path curve and the adjacent next point cloud position is used as the position change amount of each point cloud position on the fitted path curve. The average value of the position change amounts of all point cloud positions on the fitted path curve is used as the second path deflection degree at the current moment. The first path deflection degree and the second path deflection degree are combined to obtain the path deflection complexity at the current moment. Integrate the tool vibration intensity and the path deflection complexity to obtain the tool vibration coefficient at the current moment.
4. The intelligent centering method for a hedge trimmer according to claim 1, characterized in that Identifying the tool area, the trimmed hedge area, and the untrimmed hedge area in the RGB-depth image at the current moment includes: Using the YOLO algorithm to identify the tool area and the hedge area in the RGB-depth image at the current moment; Taking the tool area as the boundary and along the moving direction of the trimming machine tool, taking the hedge area before the tool area as the untrimmed hedge area and the hedge area after the tool area as the trimmed hedge area.
5. The intelligent centering method for a hedge trimmer according to claim 1, characterized in that, Obtaining the tool centering coefficient at the current moment includes: Taking the edge line of the tool area on one side of the trimmed hedge area as the trimming edge line of the tool area, taking the pixel point closest to each pixel point of the trimming edge line and in the trimmed hedge area as the comparison pixel point of each pixel point of the trimming edge line, averaging the difference in depth values between each pixel point of the trimming edge line and the comparison pixel point and performing a negative correlation mapping to obtain the surface proximity between the tool and the trimmed hedge at the current moment; Taking any reference line as the target reference line, integrating the brightness value and saturation value of each pixel point of the target reference line to obtain the trimming evaluation value of each pixel point; sorting the trimming evaluation values of all pixel points of the target reference line to obtain the evaluation value sequence of the target reference line, and in the evaluation value sequence, based on the two trimming evaluation values with the largest difference between two adjacent selected trimming evaluation values, determining the first selection boundary value of the target reference line, and taking the pixel points on the target reference line with the trimming evaluation value greater than the first selection boundary value as the trimming pixel points of the target reference line; Selecting the reference pixel points of the center line of the tool area with respect to the target reference line on the center line of the tool area, where the position serial number of the reference pixel point on the center line of the tool area is the same as the position serial number of the trimming pixel point on the target reference line; Sorting the depth values of the trimming pixel points of the target reference line and the depth values of the reference pixel points of the center line of the tool area in the order of the pixel point positions to obtain the first depth value sequence of the center line of the tool area and the second depth value sequence of the target reference line; Analyzing the correlation between the first-order difference sequence of the first depth value sequence and the first-order difference sequence of the second depth value sequence to obtain the height change correlation degree of the target reference line, and taking the average value of the height change correlation degrees of all reference lines as the height similarity of the trimmed hedge at the current moment; Integrating the surface proximity and the height similarity to obtain the tool centering coefficient at the current moment.
6. The intelligent centering method for a hedge trimmer according to claim 1, characterized in that, Obtaining the trimming attitude deviation degree at the current moment includes: Performing a negative correlation mapping on the tool centering coefficient at the current moment to obtain the tool offset coefficient at the current moment; Integrating the tool offset coefficient and the tool vibration coefficient at the current moment to obtain the trimming attitude deviation degree at the current moment.
7. The intelligent centering method for a hedge trimmer according to claim 1, characterized in that Performing edge detection on the untrimmed hedge area to obtain multiple stem edge lines includes: Edge detection is performed on the untrimmed hedge area to obtain multiple edge lines of the untrimmed hedge area. Straight-line fitting is performed on the pixel points on each stem edge line of the untrimmed hedge area to obtain the fitted straight line of each stem edge line; The stem edge lines are selected from all the edge lines of the untrimmed hedge area, wherein the extension line of the fitted straight line of the stem edge line passes through the tool area.
8. The intelligent centering method for a hedge trimmer according to claim 7, characterized in that, The obtaining of the hedge offset degree at the current moment includes: After performing negative correlation mapping on the fitting error between each stem edge line and the corresponding fitted straight line and performing normalization processing, the weight parameter of each stem edge line is obtained. Using the weight parameters of each stem edge line, the lengths of each stem edge line are weighted and summed to obtain the first hedge offset coefficient at the current moment; The depth values of all pixel points in the untrimmed hedge area are sorted to obtain the third depth value sequence of the untrimmed hedge area. In the third depth value sequence, two depth values with the largest absolute value of the difference between adjacent two depth values are selected, and the maximum value of the two selected depth values is used as the second selected boundary value of the untrimmed hedge area. The pixel points in the untrimmed hedge area with depth values greater than the second selected boundary value are used as the leaf pixel points of the untrimmed hedge area. The average value after synthesizing the hue value and the saturation value of each leaf pixel point in the untrimmed hedge area is subjected to negative correlation mapping to obtain the second hedge offset coefficient at the current moment; The first hedge offset coefficient and the second hedge offset coefficient are synthesized to obtain the hedge offset degree at the current moment.
9. The intelligent centering method for a hedge trimmer according to claim 2, characterized in that The real-time centering control of the hedge trimmer includes: The trim attitude deviation degree and the hedge offset degree are synthesized to obtain the tool centering adjustment intensity at the current moment; The included angle between the section plane of the tool position at the current moment of the optimal hedge point cloud model and the horizontal plane is used as the expected tilt angle at the current moment, and the absolute value of the difference between the tilt angle at the current moment and the expected tilt angle is used as the tilt angle error value at the current moment; Based on the calculation formula of the tool centering adjustment parameter, the tool centering adjustment parameter at the current moment is obtained. The calculation formula of the tool centering adjustment parameter is: Among them, represents the tool center adjustment parameter at the current moment; represents the tool center adjustment intensity at the current moment; represents the tilt angle error value at the current moment; represents the normalization function; The tool centering adjustment parameter at the current moment is used as the proportional gain coefficient of the PID controller, and the PID controller is used to perform real-time centering control on the trimmer tool.
10. An intelligent centering system for a hedge trimmer, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Automatic trimming machine for tree shapes
CN103518552A
Centering method of cylindrical hedge trimmer based on multi-line laser radar
CN111025323A
Hedge nursery stock pruning and centering method based on binocular vision
CN112561985A
Adaptive centering method of hedge pruning robot
CN113902816A
Automatic pruning device for highway green belt
CN119605505A
Cited By
Hedge trimmer trimming operation centering method for landscaping
CN121639642A
Method for trimming hedge for landscaping
CN121639642B