CN114303680B - Topping control method and device, topping device, electronic device and medium - Google Patents

Topping control method and device, topping device, electronic device and medium Download PDF

Info

Publication number
CN114303680B
CN114303680B CN202111658986.8A CN202111658986A CN114303680B CN 114303680 B CN114303680 B CN 114303680B CN 202111658986 A CN202111658986 A CN 202111658986A CN 114303680 B CN114303680 B CN 114303680B
Authority
CN
China
Prior art keywords
topping
topped
horizontal direction
determining
top end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111658986.8A
Other languages
Chinese (zh)
Other versions
CN114303680A (en
Inventor
刘庆飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xaircraft Technology Co Ltd
Original Assignee
Guangzhou Xaircraft Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xaircraft Technology Co Ltd filed Critical Guangzhou Xaircraft Technology Co Ltd
Priority to CN202111658986.8A priority Critical patent/CN114303680B/en
Publication of CN114303680A publication Critical patent/CN114303680A/en
Application granted granted Critical
Publication of CN114303680B publication Critical patent/CN114303680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The application provides a topping control method, a topping control device, topping equipment, electronic equipment and a medium, and relates to the technical field of agricultural production. The method is applied to topping equipment, and can comprise the following steps: acquiring at least one frame of area image in the moving process of the topping device, and determining whether topping is executed or not according to information of an object to be topped included in the at least one frame of area image, wherein the information of the object to be topped includes: the number of the objects to be topped and the top positions of the objects to be topped; if so, controlling the topping device to stop moving, and determining a target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism, wherein the topping mechanism is fixedly arranged on the topping device; and controlling the topping mechanism to carry out topping on the object to be topped according to the target motion track. By applying the method and the device, the topping operation can be performed on the objects to be topped more conveniently, rapidly and accurately.

Description

Topping control method and device, topping device, electronic device and medium
Technical Field
The application relates to the technical field of agricultural production, in particular to a topping control method and device, topping equipment, electronic equipment and a medium.
Background
In the agricultural field, the yield of some crops (such as cotton) is highly related to the growth of the crops, a means for limiting the height of the crops is generally called topping, and the topping can adjust the transportation direction of substances such as water, nutrients and the like in the crops and has obvious effects of increasing the yield and increasing the income.
Particularly, in cotton production areas such as Xinjiang in China, large areas of cotton need to be topped every year, and a large amount of manpower and material resources need to be consumed in the whole topping process. Therefore, how to more conveniently and quickly topping crops is a problem to be solved urgently at present.
Disclosure of Invention
An object of the application is to provide a topping control method, device, topping device, electronic device and medium, aiming at the defects in the prior art, so that the topping can be performed on crops more conveniently and rapidly.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a topping control method, where the method is applied to a topping device, and the method includes: acquiring at least one frame of area image in the moving process of a topping device, and determining whether topping is executed or not according to information of an object to be topped included in the at least one frame of area image, wherein the information of the object to be topped includes: the number of the objects to be topped and the top positions of the objects to be topped;
if so, controlling the topping device to stop moving, and determining a target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism, wherein the topping mechanism is fixedly arranged on the topping device;
and controlling the topping mechanism to carry out topping on the object to be topped according to the target motion track.
Optionally, the determining whether to perform topping according to the information of the object to be topped included in the at least one frame of region image includes:
carrying out image identification and duplicate removal processing on each frame region image to obtain the total number of objects to be topped in each frame region image;
and if the total number of the objects to be topped included in each frame region image is greater than or equal to a first preset threshold value, determining to execute topping.
Optionally, the determining whether to perform topping according to the information of the object to be topped included in the at least one frame of region image includes:
carrying out image recognition on each frame of area image to obtain the top end position of each object to be topped included in each area image;
and determining whether topping is executed or not according to the top end position of each object to be topped and the working area of the topping mechanism.
Optionally, the determining whether to perform topping according to the top end position of each object to be topped and the working area of the topping mechanism includes:
and if the distance between the top end position of the object to be topped and the edge of the working area in the working area of the topping mechanism is smaller than a second preset threshold value, determining to execute topping.
Optionally, the determining a target motion trajectory of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism includes:
determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction;
and determining the target motion track of the topping mechanism according to the parameter information corresponding to the track type.
Optionally, the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction includes:
and if the distance between the top position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, the track type is a track type comprising a curve segment.
Optionally, the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction includes:
and if the distance between the top position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, the track type is a straight line segment.
Optionally, the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction includes:
and determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction.
Optionally, the determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction includes:
and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold value, the track type is an inverted U type.
Optionally, if a distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, and a distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a fourth preset threshold, the trajectory type is an inverted L-shape.
Optionally, the determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction includes:
and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is larger than or equal to a fourth preset threshold value, the track type is linear.
Optionally, the determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction includes:
and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold, determining that the track type is a distorted inverted L type.
In a second aspect, an embodiment of the present application further provides a topping control device, where the device is applied to a topping device, and the device includes:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for acquiring at least one frame of area image in the moving process of the topping device, and determining whether topping is executed or not according to information of objects to be topped included in the at least one frame of area image, the number of the objects to be topped and the top end position of each object to be topped;
the second determining module is used for controlling the topping device to stop moving if the topping device is in the state of the moving state, and determining a target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism, wherein the topping mechanism is fixedly arranged on the topping device;
and the control module is used for controlling the topping mechanism to carry out topping on the object to be topped according to the target motion track.
Optionally, the first determining module is specifically configured to perform image identification and deduplication processing on each frame region image to obtain a total number of objects to be topped included in each frame region image; and if the total number of the objects to be topped included in each frame region image is greater than or equal to a first preset threshold value, determining to execute topping.
Optionally, the first determining module is further specifically configured to perform image recognition on each frame region image to obtain a top position of each object to be topped included in each region image; and determining whether topping is executed or not according to the top end position of each object to be topped and the working area of the topping mechanism.
Optionally, the first determining module is further specifically configured to determine to perform topping if a distance between a top end position of the object to be topped and an edge of the working area in the working area of the topping mechanism is smaller than a second preset threshold.
Optionally, the second determining module is specifically configured to determine the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction; and determining the target motion track of the topping mechanism according to the parameter information corresponding to the track type.
Optionally, the second determining module is further specifically configured to determine that the trajectory type is a trajectory type including a curve segment if a distance between a top end position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold.
Optionally, the second determining module is further specifically configured to determine that the trajectory type is a straight line segment if a distance between a top position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is smaller than a third preset threshold.
Optionally, the second determining module is further specifically configured to determine the track type according to the top end position of each object to be topped in the horizontal direction and the vertical direction and the position of the topping mechanism in the horizontal direction and the vertical direction.
Optionally, the second determining module is further specifically configured to determine that the trajectory type is an inverted U shape if a distance between a top end position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, and a distance between a top end position of the object to be topped in the vertical direction and a position of the topping mechanism in the horizontal direction is less than a fourth preset threshold.
Optionally, the second determining module is further specifically configured to determine that the trajectory type is an inverted L shape if a distance between a top end position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, and a distance between a top end position of the object to be topped in the vertical direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a fourth preset threshold.
Optionally, the second determining module is further specifically configured to determine that the trajectory type is a linear type if a distance between a top end position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, and a distance between a top end position of the object to be topped in the vertical direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a fourth preset threshold.
Optionally, the second determining module is further specifically configured to determine the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction, and includes: and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold value, the track type is a distorted inverted-L shape.
In a third aspect, an embodiment of the present application provides a topping device, including: the control method comprises a controller, a storage medium, a bus and a topping mechanism, wherein the topping mechanism is in communication connection with the controller, the storage medium stores machine readable instructions executable by the controller, when the topping device runs, the controller and the storage medium are in communication through the bus, and the controller executes the machine readable instructions to execute the steps of the topping control method in the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: the electronic device comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the vertex-cutting control method of the first aspect.
In a fifth aspect, the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the vertex pruning control method of the first aspect are executed.
The beneficial effect of this application is:
the embodiment of the application provides a topping control method, a topping control device, a topping device and a medium, wherein the method is applied to the topping device and can comprise the following steps: acquiring at least one frame of area image in the moving process of the topping device, and determining whether topping is executed or not according to information of an object to be topped included in the at least one frame of area image, wherein the information of the object to be topped includes: the number of the objects to be topped and the top positions of the objects to be topped; if so, controlling the topping device to stop moving, and determining a target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism, wherein the topping mechanism is fixedly arranged on the topping device; and controlling the topping mechanism to carry out topping on the object to be topped according to the target motion track.
By adopting the topping control method provided by the embodiment of the application, the controller on the topping device can determine whether to control the topping device to stop moving or not according to the information of the object to be topped included in the acquired at least one frame of region image in the moving process of the topping device, namely, the controller can control the moving distance of the topping device every time according to the quantity distribution of the objects to be processed. Meanwhile, when the topping device stops moving, the topping mechanism can stably execute topping operation, the controller can generate target motion tracks matched with the objects to be topped according to the top positions of the objects to be topped and the position of the topping mechanism, and therefore the accuracy of topping of the objects to be topped according to the target motion tracks can be improved. That is to say, this application can be convenient and fast more and the high accuracy treat the object of pinching carry out the pinching.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of a topping device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a topping control method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another topping control method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another topping control method provided in the embodiment of the present application;
fig. 5 is a schematic flowchart of another topping control method according to an embodiment of the present application;
fig. 6 is a schematic diagram of a target motion trajectory provided in an embodiment of the present application;
fig. 7 is a schematic view of an inverted U-shaped target motion trajectory according to an embodiment of the present disclosure;
fig. 8 is a schematic view of an inverted L-shaped target motion trajectory provided in an embodiment of the present application;
FIG. 9 is a schematic diagram of a linear target motion trajectory according to an embodiment of the present disclosure;
fig. 10 is a schematic diagram of a distorted inverted L-shaped target motion trajectory according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a topping control device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of another topping device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
Before explaining the embodiments of the present application in detail, an application scenario of the present application is introduced, and the application scenario may specifically be topping crop plants, that is, cutting the top ends of the crop plants, where the crop plants may be cotton, tobacco, and other objects that need topping, and the present application does not limit the application.
It should be noted that the topping device mentioned in the present application may be understood as a working device having a function of performing topping operation, that is, a mechanism for performing topping operation is installed on the topping device, and the present application is described with the topping device as a dimension, where a specific form of the topping device may be a value-assurance unmanned aerial vehicle, an unmanned vehicle, or other device, and the present application does not limit the same.
Fig. 1 is a schematic structural diagram of a topping device according to an embodiment of the present application, and as shown in fig. 1, the topping device may include a controller 100, an image capturing device 101, a topping mechanism 102, and a mobile device 103, where the controller 100 may be in communication connection with the image capturing device 101, the topping mechanism 102, and the mobile device 103, respectively. Specifically, the topping mechanism 102 may include a robot arm driver 102A and a robot arm 102B, the controller 100, the robot arm driver 102A, and the robot arm 102B are sequentially connected, and the controller 100 may send a topping instruction to the robot arm driver 102A, so that the robot arm driver 102A drives the robot arm 102B to perform a topping operation based on the topping instruction; the moving device 103 may include a moving driver 103A and a rotating wheel 103B, the controller 100, the moving driver 103A and the rotating wheel 103B are sequentially connected, and the controller 100 may send a moving instruction to the moving driver 103A, so that the moving driver 103A drives the rotating wheel 103B to perform a moving operation based on the moving instruction. It should be noted that the present application does not limit the specific structure of the topping device, for example, the topping device may further include a positioning device, and the controller 100 is connected to the positioning device.
For example, the cotton to be topped is taken as an example of a crop, the operator may first set parameters such as a moving path of the topping device during self-pilot navigation and a distance between the mechanical arms 102B according to land information of a cotton land to be topped, such as land information such as a row spacing in the cotton land, and the controller 100 in the topping device may control the moving device 103 to move in the cotton land at a preset speed according to the preset moving path, and on the basis, the top ends of cotton plants in the cotton land may be cut in a manner provided in the following embodiments.
It should be noted that, the number of the mechanical arms 102B and the image capturing devices 101 disposed on the topping device is not limited in the present application, each mechanical arm 102B may correspond to a respective working area, generally, the working areas corresponding to the mechanical arms 102B on the same topping device are the same, an area formed by a first preset distance along the moving direction of the topping device and a second preset distance perpendicular to the moving direction may be used as the working area, and the first preset distance may be assumed to be 0.3m, that is, each mechanical arm 102B may perform the cutting operation on the top end of the cotton plant in the working area with its own as the center and a diameter of 0.3 m.
When there are multiple mechanical arms 102B, the spacing between adjacent mechanical arms 102B can be adjusted according to the row spacing in the cotton field, and then each mechanical arm 102B can perform cutting operations on the top ends of the cotton plants in the respective corresponding row. In an implementation example, each mechanical arm 102B may correspond to one image capturing device 101, that is, the controller 100 may control each mechanical arm 102B to perform a topping operation according to information of an object to be topped (a cotton plant) in an image captured by the image capturing device 101 corresponding to each mechanical arm 102B; in another practical embodiment, the plurality of mechanical arms 102B correspond to one image capturing device 101, the controller 100 may determine information of an object to be topped corresponding to each mechanical arm 102B according to the image captured by the image capturing device 101 and the working area corresponding to each mechanical arm 102B, and the controller 100 further controls each mechanical arm 102B to execute a topping job according to the information of the object to be topped corresponding to each mechanical arm 102B.
The following describes an exemplary topping control method according to the present application with reference to the drawings. Fig. 2 is a schematic flow chart of a topping control method according to an embodiment of the present application. The method is applicable to the above-mentioned topping device, and in particular, to the controller 100 in the topping device. As shown in fig. 2, the method may include:
s201, at least one frame of area image is collected in the moving process of the topping device, and whether topping is executed or not is determined according to information of an object to be topped included in the at least one frame of area image.
Wherein, the information of the object to be topped comprises: the number of the objects to be topped and the top end position of each object to be topped.
As described with reference to fig. 1, after receiving the start instruction, the controller 100 in the topping device may generate a movement instruction according to the start instruction, the preset speed and the preset movement path, and the movement driver 103A drives the rotating wheel 103B to perform autonomous navigation movement at the preset speed based on the movement instruction. Taking the topping device provided with one mechanical arm 102B and one image acquisition device 101 as an example for explanation, during the movement of the topping device, the image acquisition device 101 thereon may acquire an area image according to a preset acquisition frequency, the area image includes at least one object (such as a cotton plant), and the controller 100 performs image recognition on the received area image, so as to obtain the number and/or the top end position of the object to be topped included in the area image. For example, whether to perform topping may be determined according to the number of objects to be topped included in the area image.
It should be noted that the number of frames of the region images involved in determining whether to perform topping is not limited in the present application, and the number of frames of the region images may be one or more than one in comparison with the condition for determining whether to perform topping.
And S202, if so, controlling the topping device to stop moving, and determining the target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism.
The topping mechanism is fixedly arranged on the topping device and can be used for executing topping operation. Alternatively, as can be seen from the above description, the topping device may include one set of topping mechanism, and may also include multiple sets of topping mechanism, that is, the topping device may include one mechanical arm, and may also include multiple mechanical arms, which are not limited in this application.
When the controller 100 determines that topping needs to be performed, the controller 100 may generate a stop movement instruction and send the stop movement instruction to the aforementioned movement driver 103A, and the movement driver 103A may stop driving the rotation of the rotation wheel 103B based on the stop movement instruction, that is, control the topping device to stop moving.
In an implementable embodiment, the same topping device can comprise two topping modes, one is a walking-stopping topping mode, and the other is a continuous topping mode, and a worker can firstly set the topping device into one of the topping modes, such as the walking-stopping topping mode, according to actual requirements; in another practical embodiment, the same topping device is provided with a topping mode, and a worker can select the topping device in the corresponding topping mode according to the topping requirement, such as the topping device in the stop-and-go mode.
No matter which way is adopted to enable the topping device to be in the walking and stopping topping mode, the controller in the topping device controls the mechanical arm to execute the topping operation when the topping setting stops moving, and the controller can refer to the mentioned way for determining whether the topping setting stops moving or not.
It can be seen that the present application can control the topping device to stop moving according to the information (such as the number) of the objects to be topped included in each frame region image, that is, the present application can control the distance of each movement of the topping device according to the number distribution of crop plants in the target plot, for example, and can improve the topping efficiency as a whole.
After the topping device stops moving, the topping device is described here as including a set of topping mechanisms. For example, if the position of the mechanical arm in the topping mechanism is a preset position (e.g., the highest point of the working area), the controller may determine, according to the top position of each object to be topped in each frame of area image and the preset position, a target movement track along which the mechanical arm moves from the preset position to each object to be topped respectively.
Continuing with the description of fig. 1, for another example, if the position of the mechanical arm 102B in the topping mechanism is related to the top position of the previous object to be topped and the top position of the next object to be topped, that is, the position of the mechanical arm 102B dynamically changes, the controller 100 may first sort the objects to be topped according to the position relationship between the top position of each object to be topped and the working area corresponding to the mechanical arm 102B, and use the object to be topped which is the first object to be topped to leave the working area corresponding to the mechanical arm 102B as the first object to be topped, and so on. The method comprises the steps of firstly determining a target motion track corresponding to a first object to be topped according to an initial position of a mechanical arm 102B and a top end position of the first object to be topped, determining a target motion track corresponding to a second object to be topped according to a position of the mechanical arm 102B after a topping operation is performed on the first object to be topped and the top end position of the second object to be topped, and repeating the steps to obtain the target motion tracks corresponding to the objects to be topped in each frame of area image.
The method and the device have the advantages that the growth heights of the objects to be topped are different, the target motion trail corresponding to each object to be topped is obtained according to the top end position corresponding to each object to be topped and the position of the mechanical arm, and therefore the accuracy of topping of the objects to be topped according to the target motion trail in the later stage can be improved.
And S203, controlling a topping mechanism to carry out topping on the object to be topped according to the target motion track.
Here, an object to be topped is taken as an example, the object to be topped is stored in association with a target motion track corresponding to the object to be topped, when the mechanical arm 201B in the topping mechanism 201 needs to perform a cutting operation on the top end of the object to be topped currently, the controller 100 may generate a motion instruction based on the target motion track corresponding to the object to be topped, and control the mechanical arm 201B to perform the cutting operation on the top end of the object to be topped according to a track shape included in the target motion track and speed information corresponding to a preset point in the track based on the motion instruction.
In summary, in the topping control method provided in the embodiment of the present application, during the movement of the topping device, the controller on the topping device may determine whether to control the topping device to stop moving according to the information of the to-be-topped object included in the acquired at least one frame of region image, that is, the controller may control the distance of the topping device moving each time according to the number distribution of the to-be-processed objects. Meanwhile, when the topping device stops moving, the topping mechanism can stably execute topping operation, the controller can generate target motion tracks matched with the objects to be topped according to the top positions of the objects to be topped and the position of the topping mechanism, and therefore the accuracy of topping of the objects to be topped according to the target motion tracks can be improved. That is to say, the application can carry out the topping operation on the object to be topped more conveniently, rapidly and with high precision.
Fig. 3 is a schematic flow chart of another topping control method according to an embodiment of the present application. Optionally, as shown in fig. 3, the determining whether to perform topping according to information of an object to be topped included in at least one frame of region image includes:
s301, carrying out image identification and deduplication processing on each frame region image to obtain the total number of the objects to be topped in each frame region image.
S302, if the total number of the objects to be topped included in each frame region image is greater than or equal to a first preset threshold, determining to execute topping.
In an implementation example, the controller performs image recognition on each frame of area image received, and performs deduplication processing when the received subsequent frame of area image overlaps with the previous frame of image in an area, where the image recognition may be, for example, edge detection, model recognition, and the like, and this application does not limit this.
After the controller performs image recognition and deduplication processing on each pair of frame region images, the total number of objects to be topped after the topping device starts moving to the currently acquired frame region images for deduplication at this time is compared with a first preset threshold, and whether topping is executed or not is determined according to a comparison result. The first preset threshold may be set according to actual requirements, and if the first preset threshold is set to 6, the first preset threshold is not limited in the present application.
For example, in the process that the topping device moves this time in the cotton field, the controller may first identify the received first area image, identify and obtain a first number of cotton plants included in the first area image, compare the first number with a first preset threshold, if the first number is smaller than the first preset threshold, the controller continues to control the topping device to move along the preset path, that is, not to perform topping, identify and perform deduplication processing on the received second area image in the moving process, obtain a second number of deduplicated cotton plants included in the second area image, compare the addition result of the first number and the second number with the first preset threshold, and if the addition result is greater than or equal to the first preset threshold, the controller controls the topping device to stop moving, that is, perform topping.
It can be understood that the cotton plants in the cotton plots are different in sparsity, the topping operation is performed after the topping device can move for a long distance in the cotton plant sparsity area, and the topping operation is performed after the topping device can move for a short distance in the cotton plant thickening area. That is to say, the moving distance of the topping device can be dynamically controlled according to the sparseness of crops, and the topping operation efficiency can be integrally improved on the premise of ensuring high-precision topping operation.
Fig. 4 is a schematic flowchart of another topping control method according to an embodiment of the present application. Optionally, as shown in fig. 4, the determining whether to perform topping according to information of an object to be topped included in at least one frame of region image includes:
s401, carrying out image recognition on each frame region image to obtain the top end position of each object to be topped in each region image.
In the process of the movement of the topping device, the controller can perform edge detection on the received area image every time the controller receives one frame of area image to obtain the image coordinates of each object to be topped included in the area image, and then can convert the image coordinates of each object to be topped included in the area image into space coordinates according to the corresponding relation between the left side of the image and the space coordinates, wherein the space coordinates are the top end positions of the objects to be topped.
S402, determining whether topping is executed or not according to the top end position of each object to be topped and the working area of the topping mechanism.
The working area of the topping mechanism can comprise two parts, wherein one part is a horizontal area along the moving direction of the topping device, and the other part is a vertical area vertical to the moving direction of the topping device. The horizontal area and the vertical area correspond to length information, for example, the horizontal area may be 0.3m, and it should be noted that the present application does not limit the horizontal area and the vertical area.
It is understood that the top position of each object to be topped, the working area of the topping mechanism and the position of the topping mechanism are all described in the same spatial coordinate system.
Optionally, if the distance between the top position of the object to be topped and the edge of the working area is smaller than a second preset threshold value, it is determined that topping is performed.
In an implementation embodiment, after the controller performs the image device on each pair of frame area images, the topping device then starts to move to the top end position of each object to be topped obtained by performing the image recognition on each frame area image collected currently, and the top end position is compared with the position where the working area edge of the topping mechanism is located, so as to determine whether topping is performed or not. Specifically, whether topping is executed or not can be determined according to the top position of each object to be topped in the horizontal direction and the edge position of the working area of the topping mechanism in the horizontal direction, if the situation that the distance between the top position of the object to be topped in the horizontal direction and the edge position of the working area of the topping mechanism in the horizontal direction is smaller than a second threshold does not exist, the topping device can be controlled to continue to move, and if not, topping is determined to be executed, namely the topping device is controlled to stop moving.
In another implementation, after the topping device starts moving this time, the controller may perform image recognition on the area image received for the first time, sort the objects to be topped included in the area image according to the positions of the objects to be topped included in the area image in the horizontal direction and the moving direction of the topping device, use the object to be topped farthest from the moving direction of the topping device as the target object to be topped, then, while obtaining the area image acquired by the topping device in the moving process, the controller also determines whether the distance between the top position of the target object to be topped in the horizontal direction and the edge position of the working area of the topping mechanism in the horizontal direction is smaller than a second preset threshold, and if the distance is smaller than the second threshold, determines to perform topping, that is, control the topping device to stop moving. The second preset threshold value can be set according to actual requirements, and is not limited in the application.
Optionally, the controller may first determine whether a distance between a top position of the target object to be topped in the horizontal direction and an edge position of the working area of the topping mechanism in the horizontal direction is smaller than a second preset threshold, if not, continue to determine that the total number of the objects to be topped included in each frame of area image is greater than or equal to the first preset threshold, and if so, determine to perform topping.
According to the method and the device, whether topping is executed or not is determined according to the top end position of the object to be topped and the working area relation of the topping mechanism, so that the phenomenon that the topping mechanism cannot execute topping operation on the object to be topped beyond the working area can be avoided, and topping operation can be comprehensively executed on each object to be topped on the target land parcel.
Fig. 5 is a schematic flowchart of another topping control method according to an embodiment of the present application. Optionally, as shown in fig. 5, the determining a target motion trajectory of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism includes:
s501, determining the track type according to the top end position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction.
It should be noted that the track type is a shape of the target motion track mentioned in the present application, the shape of the target motion track may include multiple types, and the shape of the target motion track, that is, the track type, may be determined according to a relation between a topping position of the object to be topped and a position of the topping mechanism in the same dimension direction (e.g., horizontal direction).
It is understood that the xy direction in the spatial coordinate system is the horizontal direction, and the z direction is the vertical direction. The vertex position of an object to be topped in a space coordinate system is assumed to be (x) n ,y n ,z n ) The position of the topping mechanism in the space coordinate system is (x) t ,y t ,z t ) That is, the position of the mechanical arm end (such as a cutting head) in the topping mechanism under a space coordinate system is (x) t ,y t ,z t ) Then the top position of the object to be topped in the horizontal direction is available (x) n ,y n ) Indicating that the position of the end of the arm in the horizontal direction is available (x) t ,y t ) And (4) showing. Further according to the top position (x) of the object to be topped in the horizontal direction n ,y n ) And the position (x) of the end of the arm in the horizontal direction t ,y t ) The distance between determines the type of trajectory.
And S502, determining the target motion track of the topping mechanism according to the parameter information corresponding to the track type.
After the movement track type of the topping mechanism is determined when the topping operation is executed, the target movement track of the topping mechanism can be further determined according to a speed planning algorithm (Double S). Specifically, here, an object to be topped is described, and a worker may set parameter information corresponding to a determined trajectory type according to an actual requirement, where the parameter information may include a current position (x) of the end of the mechanical arm t ,y t ,z t ) Top position (x) of object to be topped n ,y n ,z n ) The controller can plan a target motion track according to the parameters, and the specific planning content can refer to the related description of a speed planning algorithm and is not described herein.
After the target motion track is determined, the topping mechanism can move from the current position to the top end position of the object to be topped according to the speed controller topping mechanisms corresponding to the plurality of sampling points on the target motion track, so that the top end of the object to be topped is cut.
Optionally, the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction includes: and if the distance between the top position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, the track type is a track type comprising a curve segment.
In an implementable embodiment, the object to be topped may be in waterTop position in the horizontal direction (x) n ,y n ) And the position (x) of the end of the arm in the horizontal direction t ,y t ) Solving two points (x) in the space coordinate system n ,y n )、(x t ,y t ) If the distance is greater than or equal to the third preset distance and represents that the tail end of the mechanical arm is far away from the object to be topped in the horizontal direction, the track type of the mechanical arm moving from the current position to the top end position of the object to be topped can be set as the track type containing the curve segment. The curve segments may be fifth-order bezier curves, and certainly, other types of curves may also be used, and in general, the number of the curve segments may be 1 or 2. The curved section may make the robotic arm smoother during the turn.
Further, if the position of the tail end of the mechanical arm is not the highest point of the working area of the mechanical arm in the vertical direction, that is, the mechanical arm has a liftable space, when the distance is greater than or equal to the third preset distance, the track type is a track type including at least one section of fifth-order bezier curve; if the position of the tail end of the mechanical arm is the highest point of the working area of the mechanical arm in the vertical direction, that is, the mechanical arm has no lifting space, when the distance is greater than or equal to the third preset distance, it is further required to determine whether the distance between the top end position of the object to be topped in the vertical direction and the position of the tail end of the mechanical arm in the vertical direction is smaller than a fourth preset threshold, if not, the trajectory type is a trajectory type including at least one section of five-step bezier curve, such as a trajectory shape between the topping mechanism and the target point a (the top end position of the object a to be topped) in fig. 6, and if the distance is smaller than (greater than or equal to) the fourth preset threshold, the trajectory type is a straight line, such as a trajectory shape between the topping mechanism and the target point B (the top end position of the object B to be topped) in fig. 6. The third preset threshold and the fourth preset threshold can be set according to actual requirements, and are not limited in the application.
Optionally, the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction includes: and if the distance between the top position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, the track type is a straight line segment.
In an implementable embodiment, the top position (x) of the object to be topped in the horizontal direction can be determined n ,y n ) And the position of the end of the arm in the horizontal direction in the topping mechanism (x) t ,y t ) Solving two points (x) in the space coordinate system n ,y n )、(x t ,y t ) The distance between the target point C and the mechanical arm (e.g., the end of the mechanical arm) in fig. 6 represents that the distance between the target point C and the mechanical arm (e.g., the top position of the object C to be topped) is smaller than a third preset distance.
It can be seen that the controller generates the motion trajectories corresponding to the trajectory types according to the relationship between the distance between the top position of the object to be topped in the horizontal direction and the position of the tail end of the mechanical arm in the horizontal direction and the third preset threshold, that is, each object to be topped corresponds to a trajectory type. Therefore, the mechanical arm can carry out topping operation on each object to be topped according to the motion track of the track type matched with each object to be topped, and topping accuracy can be improved.
Optionally, the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction includes: and determining the track type according to the top end positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction.
Wherein, firstly, the top position (x) of the object to be topped in the horizontal direction can be determined n ,y n ) And the position of the end of the arm in the horizontal direction in the topping mechanism (x) t ,y t ) Obtaining a first result, and then according to the top position (z) of the object to be topped in the vertical direction n ) And the position of the end of the arm in the vertical direction in the topping mechanism (z) t ) Obtaining a second result, combining the first junctionAnd determining the track type in the target motion track according to the result and the second result.
It can be seen that the method and the device can determine the track type according to the position relation of the top position of the object to be topped and the position of the tail end of the mechanical arm in the horizontal direction, and also determine the track type according to the position relation of the top position of the object to be topped and the position of the tail end of the mechanical arm in the vertical direction. That is to say, the method and the device can obtain the track type of the target motion track according to the position relation in each direction between the position of the topping mechanism and the position of the object to be topped and the corresponding relation between the preset position relation and the track type. Therefore, the top position of the object to be topped and the position of the tail end of the mechanical arm can be analyzed more comprehensively, and the phenomenon that the mechanical arm collides with other objects to be topped in the process of carrying out topping operation on the object to be topped by the target is avoided as much as possible.
The following examples sequentially describe 4 trajectory types (e.g., inverted U, inverted L, straight, distorted inverted L).
Optionally, the determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction includes: and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold value, the track type is an inverted U type.
As can be seen from the above description, the current position of the tail end of the mechanical arm in the topping mechanism may include two situations, one situation is that the mechanical arm moves to the highest point preset in the vertical direction of the working area of the mechanical arm after the topping operation is completed each time, and the other situation is that the topping operation is completed each time, the mechanical arm moves to the corresponding position, where the vertical direction of the position may be the highest point preset in the vertical direction of the working area of the mechanical arm, and may not be the highest point preset in the vertical direction of the working area of the mechanical arm.
The second case is taken as an example to explain here, when the top position (x) of the object to be topped in the horizontal direction n ,y n ) And the position (x) of the end of the arm in the horizontal direction t ,y t ) The distance between the two is greater than or equal to a third preset threshold value, and the top end position (z) of the object to be topped in the vertical direction n ) And the position of the end of the arm in the vertical direction (z) t ) The distance therebetween is less than a fourth preset threshold. That is to say, the tail end of the mechanical arm in this case is far away from the object to be topped in the horizontal direction, and meanwhile, the tail end of the mechanical arm is close to the object to be topped in the vertical direction, and the tail end of the mechanical arm is close to the object to be topped in the vertical direction, so that the tail end of the mechanical arm does not have a highest point preset in position, and based on the highest point, the track type can be set to be an inverted U shape. As shown in fig. 7, it can be seen that the inverted U-shaped trajectory is composed of three straight line segments and two curved line segments, that is, the controller controls the topping mechanism (mechanical arm) to move along a straight line trajectory, then along a curved line trajectory, then along a straight line trajectory, then along a curved line trajectory, and finally along a straight line trajectory to the top end of the object a to be topped, so as to cut the top end of the object a to be topped, where the curved line segment may be a bezier curved line segment, such as a five-step bezier curve, which is not limited in the present application.
Optionally, the determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction includes: and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a fourth preset threshold value, the track type is an inverted L type.
Continuing with the second case as an example, when the top position (x) of the object to be topped in the horizontal direction n ,y n ) And the position (x) of the end of the arm in the horizontal direction t ,y t ) When the distance between the two is greater than or equal to a third preset threshold value, waiting to be beatenTop position of top object in vertical direction (z) n ) And the position of the end of the arm in the vertical direction (z) t ) The distance between is greater than or equal to a fourth preset threshold. That is to say, the tail end of the mechanical arm in this case is far from the object to be topped in the horizontal direction, while the tail end of the mechanical arm is far from the object to be topped in the vertical direction, and the tail end of the mechanical arm is far from the object to be topped in the vertical direction, which can be understood as the highest point preset at the tail end of the mechanical arm, based on which, the track type can be set to be an inverted L type. As shown in fig. 8, it can be seen that the inverted L-shaped trajectory is composed of two straight line segments and a curved line segment, that is, the controller controls the mechanical arm to move along a straight line trajectory, then move along a curved line trajectory, and finally move along a straight line trajectory to the top end of the object B to be topped, so as to cut the top end of the object B to be topped, where the curved line segment may be a bezier curved line segment, such as a five-step bezier curve, which is not limited in the present application.
Based on the relevant content of the inverted U-shaped and inverted L-shaped track types mentioned above, on one hand, when the tail end of the mechanical arm is not located at the preset highest point, the controller firstly moves the tail end of the mechanical arm to the preset highest point, then controls the tail end of the mechanical arm to move from the preset highest point to the top end of the object to be topped, and allows the tail end of the mechanical arm to move from right above the object to be topped to the top end of the object to be topped as far as possible, so that the mechanical arm does not collide with the object to be topped during the movement process to a greater extent, the interference on visual detection is reduced, and the topping success rate is improved. On the other hand, the area of the mechanical arm needing to turn is set to be a curve section, so that the mechanical arm can move more smoothly, the disturbance generated by the mechanical arm in the process of approaching the target object to be topped is minimized, and the topping accuracy and efficiency are improved integrally.
Optionally, the determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction includes: and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is larger than or equal to a fourth preset threshold value, the track type is linear.
Wherein, the second case mentioned above is also taken as an example for explanation, when the top end position (x) of the object to be topped in the horizontal direction n ,y n ) And the position (x) of the end of the arm in the horizontal direction t ,y t ) The distance between the top end and the base end is smaller than a third preset threshold value, and the top end position (z) of the object to be topped in the vertical direction n ) And the position of the end of the arm in the vertical direction (z) t ) The distance therebetween is greater than or equal to a fourth preset threshold. That is to say, the tail end of the mechanical arm in this case is closer to the object to be topped in the horizontal direction, while the tail end of the mechanical arm is farther from the object to be topped in the vertical direction, and the tail end of the mechanical arm is farther from the object to be topped in the vertical direction, which can be understood as the highest point preset at the tail end of the mechanical arm, based on which, the trajectory type can be set to be linear. As shown in fig. 9, it can be seen that the linear trajectory is formed by a straight line segment, that is, the controller controls the robot to move to the top end of the object C to be topped in the linear trajectory, so as to cut the top end of the object C to be topped.
Optionally, the determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction includes: and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold, the track type is a distorted inverted L type.
Wherein, when the top position (x) of the object to be topped in the horizontal direction n ,y n ) And the position (x) of the end of the arm in the horizontal direction t ,y t ) The distance between the top end and the base end is smaller than a third preset threshold value, and the top end position (z) of the object to be topped in the vertical direction n ) And end of armPosition in the vertical direction (z) t ) The distance therebetween is less than a fourth preset threshold. That is to say, the tail end of the mechanical arm in this case is closer to the object to be topped in the horizontal direction, and meanwhile, the tail end of the mechanical arm is closer to the object to be topped in the vertical direction, and the tail end of the mechanical arm is closer to the object to be topped in the vertical direction, so that the tail end of the mechanical arm does not have a highest point preset in position. As shown in fig. 10, it can be seen that the distorted inverted L-shaped trajectory is composed of two straight line segments, that is, the controller controls the mechanical arm to move along a straight line trajectory first, and then moves along another straight line trajectory to the top end of the object D to be topped, so as to cut the top end of the object D to be topped.
Based on the related content of the linear type and the distorted inverted-L type track types, when the tail end of the mechanical arm is close to the object to be topped in the horizontal direction, although a space excessively needed by a curve cannot be provided, the tail end of the mechanical arm can be controlled to move to the top end of the object to be topped from a preset highest point, so that the mechanical arm does not collide with the object to be topped during the movement process to a greater extent, the interference on visual detection is reduced, and the topping success rate is improved.
Fig. 11 is a schematic structural diagram of a topping control device according to an embodiment of the present application. The device can be applied to a topping device, such as a controller in a topping device, as shown in fig. 11, the device comprising:
the first determining module 1101 is configured to collect at least one frame of area image during the movement of the topping device, and determine whether to perform topping according to information of an object to be topped included in the at least one frame of area image;
a second determining module 1102, configured to control the topping device to stop moving if the target movement trajectory of the topping mechanism is determined, according to the top end position of each object to be topped and the position of the topping mechanism;
and the control module 1103 is used for controlling the topping mechanism to carry out topping on the object to be topped according to the target motion track.
Optionally, the first determining module 1101 is specifically configured to perform image identification and deduplication processing on each frame region image to obtain the total number of objects to be topped included in each frame region image; and if the total number of the objects to be topped in each frame region image is greater than or equal to a first preset threshold value, determining to execute topping.
Optionally, the first determining module 1101 is further specifically configured to perform image recognition on each frame region image to obtain a top position of each object to be topped included in each region image; and determining whether topping is executed or not according to the top end position of each object to be topped and the working area of the topping mechanism.
Optionally, the first determining module 1101 is further specifically configured to determine to execute topping if a distance between a top position of the object to be topped and an edge of the working area is smaller than a second preset threshold in the working area of the topping mechanism.
Optionally, the second determining module 1102 is specifically configured to determine the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction; and determining the target motion track of the topping mechanism according to the parameter information corresponding to the track type.
Optionally, the second determining module 1102 is further specifically configured to determine that the trajectory type is a trajectory type including a curved line segment if a distance between a top position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold.
Optionally, the second determining module 1102 is further specifically configured to determine that the trajectory type is a straight line segment if a distance between a top position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is smaller than a third preset threshold.
Optionally, the second determining module 1102 is further specifically configured to determine the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction.
Optionally, the second determining module 1102 is further specifically configured to determine that the trajectory type is an inverted U shape if a distance between a top end position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, and a distance between a top end position of the object to be topped in the vertical direction and a position of the topping mechanism in the horizontal direction is less than a fourth preset threshold.
Optionally, the second determining module 1102 is further specifically configured to determine that the trajectory type is an inverted L shape if a distance between a top end position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, and a distance between a top end position of the object to be topped in the vertical direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a fourth preset threshold.
Optionally, the second determining module 1102 is further specifically configured to determine that the trajectory type is a straight line type if a distance between a top end position of the object to be topped in the horizontal direction and a position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, and a distance between a top end position of the object to be topped in the vertical direction and a position of the topping mechanism in the horizontal direction is greater than or equal to a fourth preset threshold.
Optionally, the second determining module 1102 is further specifically configured to determine the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction, and includes: and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold value, the track type is a distorted inverted-L shape.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 12 is a schematic structural diagram of another topping device according to an embodiment of the present application, and as shown in fig. 12, the electronic device may include: the device comprises a controller 1201, a storage medium 1202, a bus 1203 and a topping mechanism 1204, wherein the topping mechanism 1204 is in communication connection with the controller 1201, the storage medium 1202 stores machine readable instructions executable by the controller 1201, when the topping device operates, the controller 1201 and the storage medium 1202 communicate through the bus 1203, and the controller 1201 executes the machine readable instructions to execute the steps of the method embodiment. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, an embodiment of the present application provides an electronic device, including: the electronic device comprises a controller, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the controller, when the electronic device runs, the controller is communicated with the storage medium through the bus, and the controller executes the machine-readable instructions to realize the steps of the method embodiment.
Optionally, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the above method embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer-readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures. The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A topping control method is characterized by being applied to topping equipment and comprising the following steps:
acquiring at least one frame of area image in the moving process of a topping device, and determining whether topping is executed or not according to information of an object to be topped included in the at least one frame of area image, wherein the information of the object to be topped includes: the number of the objects to be topped and the top positions of the objects to be topped;
if so, controlling the topping device to stop moving, and determining a target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism, wherein the topping mechanism is fixedly arranged on the topping device;
controlling the topping mechanism to carry out topping on the object to be topped according to the target motion track;
the step of determining the target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism comprises the following steps:
determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction;
determining a target motion track of the topping mechanism according to the parameter information corresponding to the track type;
the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction includes:
determining the track type according to the top positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction;
wherein the trajectory type comprises at least one of: inverted U-shape, inverted L-shape, linear type, distorted inverted L-shape.
2. The method according to claim 1, wherein the determining whether to perform topping according to the information of the object to be topped included in the at least one frame region image comprises:
carrying out image identification and duplicate removal processing on each frame region image to obtain the total number of objects to be topped in each frame region image;
and if the total number of the objects to be topped in each frame region image is greater than or equal to a first preset threshold, determining to perform topping.
3. The method according to claim 1, wherein the determining whether to perform topping according to the information of the object to be topped included in the at least one frame of region image comprises:
carrying out image recognition on each frame of area image to obtain the top end position of each object to be topped included in each area image;
and determining whether topping is executed or not according to the top end position of each object to be topped and the working area of the topping mechanism.
4. The method according to claim 3, wherein the determining whether to perform topping according to the top end position of each object to be topped and the working area of the topping mechanism comprises:
and if the distance between the top end position of the object to be topped and the edge of the working area in the working area of the topping mechanism is smaller than a second preset threshold value, determining to execute topping.
5. The method according to claim 1, wherein the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction further comprises:
and if the distance between the top position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold, the track type is a track type comprising a curve segment.
6. The method according to claim 1, wherein the determining the track type according to the top position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction further comprises:
and if the distance between the top position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, the track type is a straight line segment.
7. The method according to claim 1, wherein the determining the track type according to the top position of each object to be topped in the horizontal direction and the vertical direction and the position of the topping mechanism in the horizontal direction and the vertical direction comprises:
and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold value, determining that the track type is an inverted U type.
8. The method as claimed in claim 1, wherein the determining the trajectory type according to the top position of each object to be topped in the horizontal direction and the vertical direction and the position of the topping mechanism in the horizontal direction and the vertical direction comprises:
and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is greater than or equal to a fourth preset threshold value, the track type is an inverted L type.
9. The method according to claim 1, wherein the determining the track type according to the top position of each object to be topped in the horizontal direction and the vertical direction and the position of the topping mechanism in the horizontal direction and the vertical direction comprises:
and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold value, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is larger than or equal to a fourth preset threshold value, the track type is linear.
10. The method as claimed in claim 1, wherein the determining the trajectory type according to the top position of each object to be topped in the horizontal direction and the vertical direction and the position of the topping mechanism in the horizontal direction and the vertical direction comprises:
and if the distance between the top end position of the object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction is smaller than a third preset threshold, and the distance between the top end position of the object to be topped in the vertical direction and the position of the topping mechanism in the horizontal direction is smaller than a fourth preset threshold, determining that the track type is a distorted inverted L type.
11. A topping control apparatus, characterized in that the apparatus is applied to a topping device, the apparatus comprising:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for acquiring at least one frame of area image in the moving process of the topping device, and determining whether topping is executed or not according to information of objects to be topped included in the at least one frame of area image, the number of the objects to be topped and the top end position of each object to be topped;
the second determining module is used for controlling the topping device to stop moving if the topping device is in the state of the moving state, and determining a target motion track of the topping mechanism according to the top end position of each object to be topped and the position of the topping mechanism, wherein the topping mechanism is fixedly arranged on the topping device;
the control module is used for controlling the topping mechanism to carry out topping on the object to be topped according to the target motion track;
the second determining module is further used for determining the track type according to the top end position of each object to be topped in the horizontal direction and the position of the topping mechanism in the horizontal direction; determining a target motion track of the topping mechanism according to the parameter information corresponding to the track type;
the second determining module is further used for determining the track type according to the top end positions of the objects to be topped in the horizontal direction and the vertical direction and the positions of the topping mechanism in the horizontal direction and the vertical direction;
wherein the type of trajectory comprises at least one of: inverted U-shape, inverted L-shape, linear type, distorted inverted L-shape.
12. A topping device, comprising: a controller, a storage medium, a bus, and a topping mechanism, the topping mechanism being communicatively connected to the controller, the storage medium storing machine-readable instructions executable by the controller, the controller and the storage medium communicating via the bus when the topping device is operating, the controller executing the machine-readable instructions to perform the steps of the topping control method according to any one of claims 1 to 10.
13. An electronic device, comprising: a controller, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the controller, the controller and the storage medium communicating via the bus when the electronic device is operating, the controller executing the machine-readable instructions to perform the steps of the topping control method according to any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a controller, performs the steps of the topping control method according to any one of the claims 1 to 10.
CN202111658986.8A 2021-12-30 2021-12-30 Topping control method and device, topping device, electronic device and medium Active CN114303680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111658986.8A CN114303680B (en) 2021-12-30 2021-12-30 Topping control method and device, topping device, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111658986.8A CN114303680B (en) 2021-12-30 2021-12-30 Topping control method and device, topping device, electronic device and medium

Publications (2)

Publication Number Publication Date
CN114303680A CN114303680A (en) 2022-04-12
CN114303680B true CN114303680B (en) 2023-04-07

Family

ID=81018572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111658986.8A Active CN114303680B (en) 2021-12-30 2021-12-30 Topping control method and device, topping device, electronic device and medium

Country Status (1)

Country Link
CN (1) CN114303680B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117859549A (en) * 2024-03-11 2024-04-12 中化现代农业有限公司 Cotton variable topping method and device, electronic equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204157339U (en) * 2014-10-17 2015-02-18 新疆农业大学 Cotton top-cutting machine automatic control system
CN105549486B (en) * 2016-01-24 2018-03-30 山东农业大学 Tobacco topping sprout-inhibiting detecting and controlling system based on machine vision
CN108076886A (en) * 2017-12-14 2018-05-29 山东棉花研究中心 A kind of cotton topping device and method
CN110892828A (en) * 2019-12-27 2020-03-20 湘潭大学 Cotton topping method based on crawler-type robot
CN111108940A (en) * 2020-02-06 2020-05-08 山东农业大学 High-maneuverability cotton topping device and working method
CN111758424B (en) * 2020-06-22 2022-03-08 华中农业大学 Automatic device of pinching of field cotton
CN113273395A (en) * 2021-05-21 2021-08-20 佛山市中科农业机器人与智慧农业创新研究院 Cotton topping robot based on visual identification and implementation method thereof

Also Published As

Publication number Publication date
CN114303680A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN114303680B (en) Topping control method and device, topping device, electronic device and medium
CN113085850B (en) Vehicle obstacle avoidance method and device, electronic equipment and storage medium
CN107065919B (en) Turning path flight control method and device in reciprocating spraying process of agricultural plant protection unmanned aerial vehicle and unmanned aerial vehicle
CN104408408A (en) Extraction method and extraction device for robot spraying track based on curve three-dimensional reconstruction
CN112329117A (en) Building construction supervision method based on BIM
CN106774434B (en) Automatic obstacle avoidance method and system applied to unmanned aerial vehicle plant protection
CN107633202A (en) A kind of plant protection unmanned plane based on the identification of farmland characteristics of image flies control method and system
CN115002679B (en) Trajectory deviation rectifying processing method and device
CN109926817A (en) Transformer automatic assembly method based on machine vision
CN113050636A (en) Control method, system and device for autonomous tray picking of forklift
CN113375674B (en) Curve path generation method, device, equipment and readable storage medium
CN110749895A (en) Laser radar point cloud data-based positioning method
CN112306050A (en) Autonomous robot and walking path planning method and device thereof and storage medium
CN108326853A (en) A kind of milling robot system
US20230205212A1 (en) Mapping method for mobile robot, mobile robot and computer-readable storage medium
Menon et al. NBV-SC: Next best view planning based on shape completion for fruit mapping and reconstruction
CN110068832A (en) A kind of high-precision locating method of laser navigation AGV
CN114063615A (en) Backing navigation control method and system for intelligent vehicle for spraying pesticide between ridges in shed
CN109848988A (en) A kind of scan matching method and system based on the fusion of history multiframe point cloud information
Navone et al. Autonomous Navigation in Rows of Trees and High Crops with Deep Semantic Segmentation
CN114299042A (en) Work control method, work control device, work apparatus, electronic apparatus, and medium
CN116982609A (en) Spraying method, system and computer equipment based on crop prescription diagram
CN115170608A (en) Material tracking method and device
CN115097833A (en) Automatic obstacle avoidance method and system for pesticide application robot and storage medium
CN112056173B (en) Rubber tapping track planning method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant