CN-115309158-B - Agricultural robot control system based on vision and navigation path extraction method
Abstract
The invention discloses an agricultural robot control system based on vision and a navigation path extraction method, which comprises a vision processing module, a controller, a power module, a motor driving module, an infrared reflection sensor, an ultrasonic sensor and a peristaltic pump module, wherein the controller is connected with the vision processing module; the agricultural robot comprises a camera, a visual processing module, a controller, an infrared reflection sensor, a peristaltic pump module, an ultrasonic sensor, a motor, an infrared reflection sensor, a controller, a peristaltic pump module, a controller and a controller, wherein crop information is acquired through the camera and is transmitted to the visual processing module, the navigation center line is obtained through processing of the visual processing module, required navigation parameters are transmitted to the controller, the motor is further controlled to rotate, movement control of the agricultural robot is achieved, the crop is detected through the infrared reflection sensor, the detection parameters are transmitted to the controller, the peristaltic pump module is controlled by the controller, medicine spraying is achieved, obstacle avoidance processing is conducted through the ultrasonic sensor, and safety of the agricultural robot is guaranteed. The method has the advantages of high precision, less time consumption, good adaptability and robustness under the environment of different crops.
Inventors
- CHANG JIANG
- LI CHUNSHENG
- WANG JIAMING
- CHANG LIANG
- XI QI
- XUE DI
- ZHANG LIANJUN
- LIU YALI
- LI SIYUAN
Assignees
- 佳木斯大学
Dates
- Publication Date
- 20260505
- Application Date
- 20220806
Claims (5)
- 1. The utility model provides an agricultural robot control system based on vision, which is characterized in that, including vision processing module, vision processing module passes through USB interface connection with the camera, the camera is installed directly over agricultural robot center, the camera shooting direction is agricultural robot organism the place ahead, vision processing module obtains navigation parameter after gathering crops line information with the camera and handles, vision processing module passes through SPI communication interface connection with the controller, vision processing module transmits navigation parameter into the controller, the controller passes into motor drive module with received navigation parameter, motor drive module is connected with direct current gear motor, motor drive module passes into direct current gear motor with control signal, direct current gear motor divide into left side direct current gear motor and right side direct current gear motor, vision processing module carries out following operation steps, S1, normalizing the value of R, G, B of the acquired image, normalizing the value of R, G, B of the current acquired image, wherein the normalization formula is shown in (1): s2, graying the crop line image, wherein the normalized image is grayed by adopting an improved super-green characteristic algorithm, and the formula of the improved super-green characteristic algorithm is shown as (2): G(x,y)=(1.88g(x,y)-r(x,y)-b(x,y)) (2) S3, performing image segmentation to convert the gray level image into a binary image; threshold segmentation is performed by an Otsu method, t is set as a threshold of a segmented region, the area ratios θ 1 and θ 2 of the region 1 and the region 2 separated by t to the whole image are set, and the average gray scale relationship between the whole image gray scale and the regions 1 and 2 is expressed by the formula (3): u=u 1 θ 1 +u 2 θ 2 (3) In order to optimize the separation of the separated images, the region variance is an effective parameter describing the gray scale difference, and the expression thereof can be expressed by the expression (4): the variance of two regions after the image is divided by the threshold value is expressed, and therefore, when the variance of the two regions after the division is maximum, the best separation state is considered, and thus the threshold value T is determined, and the expression of T can be expressed by the expression (5): S4, performing image smoothing processing to eliminate image noise, namely firstly performing median filtering on a binary image by adopting a 5 multiplied by 5 pixel structure body, performing corrosion processing on the image by utilizing a 3 multiplied by 3 pixel structure body, and then performing expansion processing on the image by utilizing the 3 multiplied by 3 pixel structure body so as to remove small-area noise; S5, acquiring crop row information by adopting a vertical projection method, and detecting crop row feature points; S6, fitting characteristic points by using a least square method to obtain a navigation line, wherein the least square method presets characteristic point coordinates as (x i ,y i ) (i=1, 2,3.. The use of the least square method is the same as the above, the slope and intercept of a fitted straight line are respectively a and b, and a straight line equation is set as follows: f(x)=ax+b (6) Let the residual function be: Determining a group of a and b to enable the parameter function E to be minimum, wherein the derivative of the parameter function E on the a and the b is a final fitting straight line, and the values of the a and the b can be obtained according to formulas (8) and (9), namely the slope and the intercept of the straight line fitting; S7, comparing the central line with the center of the image window to obtain an offset angle d, determining the position of the world coordinate system by combining the calibration parameters of the camera, and transmitting the navigation parameters to the controller.
- 2. The vision-based agricultural robot control system according to claim 1, wherein encoders are respectively arranged on the left direct current speed-reducing motor and the right direct current speed-reducing motor, the encoders are connected with a controller through an SPI communication interface, the encoders are used for detecting state information of running of the direct current speed-reducing motor, the encoders transmit the detected information to the controller, the controller adjusts control signals through a fuzzy PID algorithm, and the controller transmits the control signals processed by the fuzzy PID algorithm to the motor driving module in a PWM pulse width signal mode.
- 3. The vision-based agricultural robot control system according to claim 1, wherein the controller is connected with an ultrasonic sensor and an infrared reflection sensor through an IIC bus, the ultrasonic sensor is used for detecting obstacles in a farmland, the infrared reflection sensor is used for detecting information of crops, the ultrasonic sensor transmits the obstacle information to the controller, the controller controls a direct current speed reduction motor to stop running through a motor driving module, the controller is connected with a peristaltic pump module, the peristaltic pump module is connected with the peristaltic pump direct current speed reduction motor, and the infrared reflection sensor transmits the information of the detected crops to the controller, and the controller controls the peristaltic pump direct current speed reduction motor to run through the peristaltic pump module.
- 4. The vision-based agricultural robot control system according to claim 1, wherein the vision processing module, the controller, the motor driving module and the peristaltic pump module are respectively connected with a power module, the power module is provided with two output power supply ports of 12V and 5V, the 5V output power supply port supplies power to the vision processing module and the controller, and the 12V output power supply port supplies power to the motor driving module and the peristaltic pump module.
- 5. The vision-based agricultural robot control system of claim 1, wherein S5 specifically comprises the steps of: s501, dividing an image into 10 blocks according to the horizontal direction and the like; s502, sequentially selecting each image after horizontal division from the binary images to carry out vertical projection, wherein the vertical projection accumulates all columns of pixels in a binary image band, the accumulated pixels are compared with a threshold value, the area with the accumulated value larger than the threshold value is regarded as a crop area, the area with the accumulated value smaller than the threshold value is regarded as a background, and the formula is shown in the formula (10): Wherein B (i, j) is the value of each pixel in the image band, Δk is one tenth of the image, i.e., Δk=0.1h, h a is the image height; s503, calculating an accumulated average value M of column pixels, wherein the formula is shown in (11): S504, calculating a standard deviation E of the column pixels, wherein the formula is shown in (12): s505, setting a threshold value When G (J) > T is the target area of the crop, traversing the whole crop area, if G (J) > G (J-1), then Cm <0 > = J is expressed as the left edge point of the crop row, if G (J) < G (J-1), then Cm < 1 > = J is expressed as the right edge point of the crop row, setting the left and right edge threshold U i of the crop row to judge whether the detected edge point is the true edge point, if U i > Cm < 1 > -Cm <0 >, then the crop row is reserved, U i < Cm < 1 > -Cm <0 >, then discarding, then calculating the left and right edge midpoint of the crop row, repeating the steps, J=M a stopping the acquisition, obtaining the target point on the image band by scanning each image band, and classifying the center point on the image band for the central line of each target.
Description
Agricultural robot control system based on vision and navigation path extraction method Technical Field The invention relates to the field of agricultural robot navigation control, in particular to an agricultural robot control system based on vision and a navigation path extraction method. Background For the 21 st century, intellectualization gradually entered the agricultural field. Agricultural robots have higher precision and efficiency in agricultural production. The agricultural robot can acquire image information of crop growth vigor, weeds and the like through the camera, and a navigation route is formulated according to different agricultural conditions, so that the fertilizing amount and the fertilizing amount are accurately controlled. Acquiring the navigation path of the agricultural robot is a key for realizing agricultural automation, and the extraction of crop rows has great influence on the navigation precision of the agricultural robot. Agricultural robots are mainly operated in vast farmlands, and the control system and the extraction of navigation paths are complex, nonlinear and unstable systems. And the regions in China are wide, the planted crops are different, the application of the existing agricultural robot is mainly aimed at single crops, a general agricultural robot is not designed, and the agricultural robot cannot be widely popularized and applicable to all regions. Disclosure of Invention Aiming at the defects of the prior art, the invention provides an agricultural robot control system based on vision and a navigation path extraction method, which are used for preprocessing the crop rows of different crops and fitting navigation lines, and have the advantages of high precision, less time consumption, good adaptability and robustness. In order to achieve the purpose, the agricultural robot control system based on vision is characterized by comprising a vision processing module, wherein the vision processing module is connected with a camera through a USB interface, the camera is arranged right above the center of an agricultural robot, the shooting direction of the camera is in front of an agricultural robot body, the vision processing module acquires crop row information and processes the crop row information to obtain navigation parameters, the vision processing module is connected with a controller through an SPI communication interface, the vision processing module transmits the navigation parameters to the controller, the controller transmits the received navigation parameters to a motor driving module, the motor driving module is connected with a direct current speed reduction motor, a control signal is transmitted to the direct current speed reduction motor by the motor driving module, and the direct current speed reduction motor is divided into a left direct current speed reduction motor and a right direct current speed reduction motor. Further, encoders are respectively arranged on the left direct current speed reduction motor and the right direct current speed reduction motor, the encoders are connected with the controller through SPI communication interfaces, the encoders are used for detecting running state information of the direct current speed reduction motor, the encoders transmit the detected information to the controller, the controller adjusts control signals through a fuzzy PID algorithm, and the controller transmits the control signals processed by the fuzzy PID algorithm to the motor driving module in a PWM pulse width signal mode. Further, the controller is connected with the ultrasonic sensor and the infrared reflection sensor through the IIC bus, the ultrasonic sensor is used for detecting obstacles in a farmland, the infrared reflection sensor is used for detecting information of crops, the ultrasonic sensor transmits the obstacle information to the controller, the controller controls the direct-current speed reduction motor to stop running through the motor driving module, the controller is connected with the peristaltic pump module, the peristaltic pump module is connected with the peristaltic pump direct-current speed reduction motor, the infrared reflection sensor transmits the information of the detected crops to the controller, and the controller controls the peristaltic pump direct-current speed reduction motor to run through the peristaltic pump module. Further, the vision processing module, the controller, the motor driving module and the peristaltic pump module are respectively connected with the power supply module, the power supply module is provided with two output power supply ports of 12V and 5V, the 5V output power supply port supplies power for the vision processing module and the controller, and the 12V output power supply port supplies power for the motor driving module and the peristaltic pump module. A navigation path extraction method of an agricultural robot control system based on vision, comprising the following steps: S1, nor