CN104615150B - A kind of adaptive accurate spraying apparatus and method based on machine vision - Google Patents
A kind of adaptive accurate spraying apparatus and method based on machine vision Download PDFInfo
- Publication number
- CN104615150B CN104615150B CN201410783866.4A CN201410783866A CN104615150B CN 104615150 B CN104615150 B CN 104615150B CN 201410783866 A CN201410783866 A CN 201410783866A CN 104615150 B CN104615150 B CN 104615150B
- Authority
- CN
- China
- Prior art keywords
- spray
- task
- camera
- module
- speed
- 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.)
- Expired - Fee Related
Links
- 238000005507 spraying Methods 0.000 title claims abstract description 47
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000003044 adaptive effect Effects 0.000 title description 2
- 239000007921 spray Substances 0.000 claims abstract description 54
- 230000033001 locomotion Effects 0.000 claims abstract description 20
- 239000003814 drug Substances 0.000 claims abstract description 3
- 238000003860 storage Methods 0.000 claims abstract description 3
- 238000001514 detection method Methods 0.000 claims description 29
- 239000000284 extract Substances 0.000 claims description 14
- 238000000605 extraction Methods 0.000 claims description 5
- 230000009466 transformation Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000010606 normalization Methods 0.000 claims description 4
- 230000004927 fusion Effects 0.000 claims description 3
- 238000000746 purification Methods 0.000 claims description 3
- 238000005538 encapsulation Methods 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 11
- 238000009826 distribution Methods 0.000 abstract description 4
- 238000003912 environmental pollution Methods 0.000 abstract description 2
- 239000000126 substance Substances 0.000 abstract description 2
- 238000006073 displacement reaction Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 241000196324 Embryophyta Species 0.000 description 1
- 206010034719 Personality change Diseases 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000003337 fertilizer Substances 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 239000000575 pesticide Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000010223 real-time analysis Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 238000009333 weeding Methods 0.000 description 1
Landscapes
- Catching Or Destruction (AREA)
- Guiding Agricultural Machines (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
本发明涉及一种基于机器视觉的自适应精准定位喷雾设备及方法,包括机械臂、壳体、核心计算模块、图像采集模块、喷雾模块,壳体固定在机械臂上,核心计算模块固定在壳体内,图像采集模块包括安装在壳体上并与核心计算模块相连的主摄像头、辅摄像头和补光灯,喷雾模块包括安装在机械臂上的储药箱、喷管和喷头,喷管上安装有与核心计算模块相连的电磁阀。本发明利用机器视觉技术,在农用机械运行过程中实时获取喷雾任务目标分布信息,通过单目摄像头轨迹重构技术结合卡尔曼滤波算法估算出机械实时移动轨迹,依据作业机械移动轨迹信息推算出喷头的正确喷雾时机,实现精准的变量喷雾,提高了药剂的使用效率,减轻了环境的污染。
The invention relates to a self-adaptive precise positioning spraying device and method based on machine vision. Inside the body, the image acquisition module includes a main camera, an auxiliary camera and a supplementary light installed on the housing and connected to the core computing module. The spray module includes a medicine storage box, a nozzle and a nozzle installed on the mechanical arm. There are solenoid valves connected to the core computing module. The invention utilizes machine vision technology to acquire spray task target distribution information in real time during the operation of agricultural machinery, estimates the real-time movement trajectory of the machinery through the monocular camera trajectory reconstruction technology combined with the Kalman filter algorithm, and calculates the nozzle according to the movement trajectory information of the operating machinery The correct timing of spraying realizes precise variable spraying, improves the use efficiency of chemicals, and reduces environmental pollution.
Description
技术领域technical field
本发明属于农机自动化领域,涉及一种基于机器视觉的自动喷雾设备及方法,尤其涉及一种基于机器视觉的自适应精准定位喷雾设备及方法。The invention belongs to the field of agricultural machinery automation, and relates to an automatic spraying device and method based on machine vision, in particular to an adaptive and precise positioning spraying device and method based on machine vision.
背景技术Background technique
传统的农用喷雾机械适用于较大规模种植,具有经济、高效、省时,显著降低劳动强度与成本等诸多优点,但在作业过程中难以根据作物的生长和分布情况进行精准喷雾,从而导致农药或肥料的大量浪费,导致生产成本高以及污染残留给农产品和环境带来的种种问题。随着机器视觉技术和农业机械技术的发展,通过机器视觉技术对田间作物生长位置和生长密度进行信息获取与实时分析,并通过靶向变量实现喷雾控制是农机自动化领域技术发展的一个趋势。要实现喷雾目标的精准定位和实时变量喷雾是基于机器视觉的自动喷雾设备及方法的一个技术难点,突出体现在喷雾机械的实时准确的速度估计上。现有的方法大体分为三类:第一类是使用农用机械慢速情况下平均速度作为整个喷雾作业中的参考速度,以此控制喷雾时机的选择;第二类是使用GPS进行定位,获取任务中的喷雾装置的相对实时移动位置;第三类是使用专门的速度传感器进行测速。Traditional agricultural spraying machinery is suitable for large-scale planting. It has many advantages such as economical, efficient, time-saving, and significantly reduces labor intensity and cost. However, it is difficult to accurately spray according to the growth and distribution of crops during the operation, resulting in pesticides Or a large amount of waste of fertilizers, resulting in high production costs and various problems caused by pollution residues to agricultural products and the environment. With the development of machine vision technology and agricultural machinery technology, information acquisition and real-time analysis of field crop growth position and growth density through machine vision technology, and spray control through targeted variables are a trend in the development of agricultural machinery automation technology. Accurate positioning of spray targets and real-time variable spraying is a technical difficulty of automatic spraying equipment and methods based on machine vision, which is prominently reflected in the real-time and accurate speed estimation of spraying machinery. The existing methods are roughly divided into three categories: the first category is to use the average speed of the agricultural machinery at a slow speed as the reference speed in the entire spraying operation, so as to control the choice of spraying timing; the second category is to use GPS for positioning and obtain The relative real-time moving position of the spray device in the task; the third type is to use a special speed sensor for speed measurement.
第一类方案实现简单,但在实际运行中目标定位误差较大,在田间作业实际推广中往往会造成喷药药剂的大量浪费。第二类方法,如专利ZL02246301.1提供的离线分析方法,先采集田间杂草位置和密度信息,离线分析之后制成处方图;具体农机喷雾工作时,将离线的分析信息和位置发送给喷雾设备控制器。此方法虽然通过离线解决了变量喷雾的要求,但由于受GPS作业精度所限,只适于大片区的较大粒度的变量喷雾作业,难以实时精准的对片区内作物实现更准确的对靶喷雾。第三类方法,如专利ZL02829239.1设计了一种轨道车辆的除草方法,通过速度传感器进行实时的速度测量,配合使用轨道车辆减少运行中的机械抖动和姿态变换,以增加速度传感器的测量精度,使喷雾时机控制更加准确。但这种方法需要首先架设固定轨道,设备成本相对较高,且速度传感器在长时间的工作过程中产生的累积误差影响难以消除,对喷雾作业的准确程度仍会产生较大影响。The first type of scheme is easy to implement, but the target positioning error is relatively large in actual operation, and it often causes a lot of waste of spraying agents in the actual promotion of field operations. The second type of method, such as the offline analysis method provided by patent ZL02246301.1, first collects the location and density information of weeds in the field, and then makes a prescription map after offline analysis; when the specific agricultural machinery is spraying, the offline analysis information and location are sent to the sprayer device controller. Although this method solves the requirement of variable spraying offline, due to the limitation of the accuracy of GPS operation, it is only suitable for variable spraying operations with large particle sizes in large areas, and it is difficult to achieve more accurate target spraying of crops in the area in real time and accurately. . The third type of method, such as the patent ZL02829239.1, designed a rail vehicle weeding method, which uses a speed sensor for real-time speed measurement, and uses rail vehicles to reduce mechanical vibration and attitude changes during operation, so as to increase the measurement accuracy of the speed sensor , so that the spray timing control is more accurate. However, this method needs to set up a fixed track first, and the equipment cost is relatively high, and the cumulative error effect of the speed sensor in the long-term working process is difficult to eliminate, which will still have a great impact on the accuracy of the spraying operation.
发明内容Contents of the invention
本发明针对现有技术中存在的不足,提供了一种基于机器视觉的自适应精准定位喷雾设备及方法。Aiming at the deficiencies in the prior art, the present invention provides a self-adaptive precise positioning spraying device and method based on machine vision.
本发明是通过以下技术方案实现的:The present invention is achieved through the following technical solutions:
一种基于机器视觉的自适应精准定位喷雾设备,包括机械臂、壳体、核心计算模块、图像采集模块、喷雾模块;所述壳体固定在机械臂上;所述核心计算模块固定在壳体内;所述图像采集模块包括安装在壳体上并与核心计算模块相连的主摄像头、辅摄像头和补光灯;所述喷雾模块包括安装在机械臂上的储药箱、喷管和喷头,喷管上安装有与核心计算模块相连的电磁阀。A self-adaptive and precise positioning spraying device based on machine vision, including a mechanical arm, a housing, a core computing module, an image acquisition module, and a spraying module; the housing is fixed on the mechanical arm; the core computing module is fixed in the housing ; The image acquisition module includes a main camera, an auxiliary camera and a supplementary light installed on the housing and connected to the core computing module; A solenoid valve connected to the core computing module is installed on the tube.
所述核心计算模块包括距离参数自动校准模块、目标检测模块、速度检测模块、时延估计模块和喷雾任务执行模块。The core calculation module includes a distance parameter automatic calibration module, a target detection module, a speed detection module, a delay estimation module and a spray task execution module.
所述主摄像头帧数为60帧/秒。The frame rate of the main camera is 60 frames per second.
所述辅摄像头帧数为30帧/秒。The frame rate of the auxiliary camera is 30 frames per second.
一种基于机器视觉的自适应精准定位喷雾方法,包括以下步骤:A machine vision-based self-adaptive precise positioning spraying method, comprising the following steps:
步骤S1:分别通过主摄像头和辅摄像头抽取视频帧,规格化后对图片目标区域进行特征提取、特征匹配,从视差中获取以像素为单位的摄像头位置差,估计出喷雾的实际距离;Step S1: Extract video frames through the main camera and the auxiliary camera respectively, perform feature extraction and feature matching on the target area of the picture after normalization, obtain the camera position difference in pixels from the parallax, and estimate the actual distance of the spray;
步骤S2:将主摄像头抓取的视频帧中的目标检测区域进行网格化,依次提取并快速统计有效点,根据有效点个数对网格单元进行目标融合,分析判断喷雾目标的具体位置和面积,封装形成喷雾任务;Step S2: Grid the target detection area in the video frame captured by the main camera, extract and quickly count the effective points in turn, perform target fusion on the grid unit according to the number of effective points, and analyze and judge the specific position and location of the spray target. Area, encapsulation to form a spray task;
步骤S3:从主摄像头中获取相邻的两个视频帧,分别从图像中的目标检测区域提取特征点,利用特征点进行特征匹配和提纯,推算出摄像头的空间变换距离,进一步计算出摄像头在一个视频帧间隔时间内的平均移动速度,以此速度信息更新和修正卡尔曼滤波器,利用卡尔曼滤波器平均每隔20帧估计一次摄像头的移动速度;Step S3: Obtain two adjacent video frames from the main camera, extract feature points from the target detection area in the image respectively, use the feature points to perform feature matching and purification, calculate the spatial transformation distance of the camera, and further calculate the The average moving speed within a video frame interval time, update and correct the Kalman filter with this speed information, and use the Kalman filter to estimate the moving speed of the camera every 20 frames on average;
步骤S4:根据目标检测模块获取的喷雾任务队列和速度检测模块估算出的摄像头移动速度,方法以固定20ms一个周期的速度不断遍历任务队列,不断利用当前摄像头移动速度累积积分出单个任务的运动轨迹。根据检测设备和喷雾设备设定的间隔距离和累积积分出的任务移动距离准确的计算出喷雾任务的准确执行时间。一旦任务达到系统设定喷雾间隔距离,则立即发送喷雾任务命令给喷雾任务执行模块,并从任务队列中清除该喷雾任务。Step S4: According to the spray task queue obtained by the target detection module and the camera movement speed estimated by the speed detection module, the method continuously traverses the task queue at a fixed cycle speed of 20ms, and continuously uses the current camera movement speed to accumulate and integrate the movement trajectory of a single task . Accurately calculate the exact execution time of the spraying task according to the interval distance set by the detection equipment and the spraying equipment and the accumulated task movement distance. Once the task reaches the spray interval set by the system, the spray task command is sent to the spray task execution module immediately, and the spray task is cleared from the task queue.
步骤S5:通过分析发送过来的任务命令,发送设定的高低电平信号控制电磁阀开启或者关闭,完成喷雾作业的开启或关闭。Step S5: By analyzing the task command sent, sending the set high and low level signals to control the opening or closing of the solenoid valve, and completing the opening or closing of the spraying operation.
与现有技术相比,本发明利用机器视觉技术,在农用机械运行过程中实时获取喷雾任务目标分布信息,通过单目摄像头轨迹重构技术结合卡尔曼滤波算法估算出机械实时移动轨迹,依据作业机械移动轨迹信息推算出喷头的正确喷雾时机,实现精准的变量喷雾,从而解决了现有农机田间喷雾技术中存在的喷雾时机控制问题,提高了药剂的使用效率,减轻了环境的污染。Compared with the prior art, the present invention uses machine vision technology to obtain real-time distribution information of spraying task targets during the operation of agricultural machinery, and estimates the real-time moving trajectory of the machinery through the monocular camera trajectory reconstruction technology combined with the Kalman filter algorithm. The information of the moving track of the machine calculates the correct spraying timing of the nozzle to achieve precise variable spraying, thus solving the problem of spraying timing control in the existing field spraying technology of agricultural machinery, improving the use efficiency of chemicals, and reducing environmental pollution.
附图说明Description of drawings
图1是本发明的自适应精准喷雾工作流程示意图;Fig. 1 is a schematic diagram of the self-adaptive precision spray workflow of the present invention;
图2是本发明的自适应精准喷雾设备立体图;Fig. 2 is a perspective view of the self-adaptive precise spraying device of the present invention;
图3是本发明的自适应精准喷雾设备结构示意图。Fig. 3 is a structural schematic diagram of the self-adaptive precise spraying device of the present invention.
其中,1、壳体,2、核心计算模块,3、主摄像头,4、辅摄像头,5、补光灯,6、喷头,7、喷管,8、电磁阀。Among them, 1. Shell, 2. Core computing module, 3. Main camera, 4. Auxiliary camera, 5. Fill light, 6. Nozzle, 7. Nozzle, 8. Solenoid valve.
具体实施方式detailed description
以下结合附图和实施例对本发明的技术方案作详细说明。The technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.
图2和图3为本发明的基于机器视觉的自适应精准定位喷雾设备的立体图和结构示意图,包括机械臂、固定在机械臂上的壳体1、固定在壳体1内的核心计算模块2、安装在壳体1上的图像采集模块和喷雾模块;图像采集模块包括分别与核心计算模块2相连的主摄像头3、辅摄像头4和补光灯5,其中主摄像头帧数为60帧/秒、辅摄像头帧数为30帧/秒;喷雾模块包括安装在机械臂上的储药箱、喷管7和喷头6,喷管7上安装有与核心计算模块2相连的电磁阀8。Fig. 2 and Fig. 3 are the three-dimensional view and structural diagram of the self-adaptive precise positioning spraying equipment based on machine vision of the present invention, including a mechanical arm, a housing 1 fixed on the mechanical arm, and a core computing module 2 fixed in the housing 1 , an image acquisition module and a spray module installed on the housing 1; the image acquisition module includes a main camera 3, an auxiliary camera 4 and a fill light 5 respectively connected to the core computing module 2, wherein the frame number of the main camera is 60 frames per second , The frame rate of the auxiliary camera is 30 frames per second; the spray module includes a medicine storage box installed on the mechanical arm, a nozzle 7 and a nozzle 6, and a solenoid valve 8 connected to the core computing module 2 is installed on the nozzle 7.
图1为本发明的基于机器视觉的自适应精准定位喷雾方法工作流程图,其自适应精准定位喷雾设备的核心计算模块2包括距离参数自动校准模块、目标检测模块、速度检测模块、时延估计模块和喷雾任务执行模块。该方法首先自动获取喷雾装置具体安装高度下检测单元和喷雾单元的像素距离。然后通过规则格网化视频图像,快速检测出喷雾目标,形成任务队列。利用主摄像头提取相邻视频图像中的特征点,通过特征点匹配获取摄像头相邻视频帧间隔内的像素距离,并且通过结合卡尔曼滤波技术获取指定时间粒度下的摄像头移动速度估计值。通过累积积分,重建出摄像头的运动轨迹,从而获取农用机械的实际最佳喷雾时机,实现最终的精准喷雾作业。其具体步骤如下:Fig. 1 is the working flow chart of the self-adaptive precise positioning spraying method based on machine vision of the present invention, the core calculation module 2 of the self-adaptive precise positioning spraying equipment includes a distance parameter automatic calibration module, a target detection module, a speed detection module, and a time delay estimation module and the spray task execution module. The method first automatically obtains the pixel distance between the detection unit and the spray unit at the specific installation height of the spray device. Then, by regularly gridding the video image, the spray target is quickly detected and a task queue is formed. The main camera is used to extract the feature points in the adjacent video images, and the pixel distance in the adjacent video frame interval of the camera is obtained through feature point matching, and the estimated moving speed of the camera at the specified time granularity is obtained by combining the Kalman filter technology. By accumulating points, the trajectory of the camera is reconstructed, so as to obtain the actual optimal spraying time of the agricultural machinery and realize the final precise spraying operation. The specific steps are as follows:
步骤S1:距离参数自动校准模块分别通过主摄像头3和辅摄像头4抽取视频帧,规格化后对图片目标区域进行特征提取、特征匹配,从视差中获取摄像头位置差,估计出喷雾的实际距离。其中包括:Step S1: The distance parameter automatic calibration module extracts video frames through the main camera 3 and the auxiliary camera 4 respectively, performs feature extraction and feature matching on the target area of the picture after normalization, obtains the camera position difference from the parallax, and estimates the actual distance of the spray. These include:
步骤S11:首先分别通过主摄像头3和辅助摄像头4抽取视频帧,规格化后分别提取特征点,对特征点计算其描述子;Step S11: first extract video frames through the main camera 3 and the auxiliary camera 4 respectively, extract feature points after normalization, and calculate their descriptors for the feature points;
步骤S12:利用比值法进行快速的特征点匹配,然后使用RANSAC算法提纯匹配结果,得到可信度更高的匹配特征点对;Step S12: Use the ratio method to perform fast feature point matching, and then use the RANSAC algorithm to purify the matching result to obtain matching feature point pairs with higher reliability;
步骤S13:利用匹配特征点对求取由于视差造成的位移平均值Dcam,公式如下:Step S13: Use the matching feature point pairs to obtain the average value of displacement D cam caused by parallax, the formula is as follows:
由于已知主摄像头3、辅摄像头4相对距离L,而主摄像头距离喷头单元距离为2L,可以直接估算出目标检测单元到达喷射装置的在统一焦距和高度下的像素距离 Since the relative distance L between the main camera 3 and the auxiliary camera 4 is known, and the distance between the main camera and the sprinkler unit is 2L, the pixel distance from the target detection unit to the spraying device at the same focal length and height can be directly estimated
步骤S2:目标检测模块将主摄像头3抓取的视频帧中的目标检测区域进行网格化,依次提取并快速统计有效点,根据有效点个数对网格单元进行目标融合,分析判断喷雾目标的具体位置和面积,封装形成喷雾任务。其中包括:Step S2: The target detection module grids the target detection area in the video frame captured by the main camera 3, sequentially extracts and quickly counts effective points, performs target fusion on the grid units according to the number of effective points, and analyzes and judges the spray target The specific location and area are packaged to form a spray task. These include:
步骤S21:通过主摄像头3抽取实时检测到的视频数据。为了加快目标提取的速度和定位的稳定性,算法先对检测区域进行网格化,以检测区域内划分的规则格网作为处理和判断的基本单元;Step S21: extracting real-time detected video data through the main camera 3 . In order to speed up the speed of target extraction and the stability of positioning, the algorithm first grids the detection area, and uses the regular grid divided in the detection area as the basic unit of processing and judgment;
步骤S22:在网格单元中,根据公式Step S22: In the grid unit, according to the formula
快速的提取目标像素点,并且统计单个网格内目标像素点个数;Quickly extract the target pixels, and count the number of target pixels in a single grid;
步骤S23:以单个网格区域为基准,过滤掉有效点密度过低的单元,在有效点密度达到要求的前景网格中统计单元中的有效点分布质心位置。令N为有效像素个数,和为前景网格中有效点质心,公式如下:Step S23: Based on a single grid area, filter out units with too low effective point density, and count the effective point distribution centroid positions of the cells in the foreground grid whose effective point density meets the requirements. Let N be the number of effective pixels, with is the centroid of effective points in the foreground grid, the formula is as follows:
将相邻的前景网格单元通过种子填充算法快速的融合,将融合后的网格单元覆盖区域作为单个喷雾目标体覆盖区域,通过累加融合的网格单元质心,将其快速求和取平均后作为目标区域的质心,Tx和Ty为融合目标区域的质心位置,M为单块融合前景网格联通体的个数,质心计算公式如下:The adjacent foreground grid units are quickly fused through the seed filling algorithm, and the fused grid unit coverage area is used as a single spray target body coverage area. By accumulating the fused grid unit centroids, they are quickly summed and averaged. As the center of mass of the target area, Tx and Ty are the position of the center of mass of the fused target area, and M is the number of single-block fused foreground grid connected bodies. The formula for calculating the center of mass is as follows:
根据当前的目标检测状态跳变信息,将喷雾任务封装成单独任务结点,推送到时延估计模块。According to the current target detection state transition information, the spray task is packaged into a separate task node and pushed to the delay estimation module.
步骤S3:速度检测模块从主摄像头3中获取相邻的两个视频帧,分别从图像中的目标检测区域提取特征点,利用特征点进行特征匹配和提纯,推算出摄像头的空间变换距离,进一步计算出摄像头在一个视频帧间隔时间内的平均移动速度,以此速度信息更新和修正卡尔曼滤波器,利用卡尔曼滤波器平均每隔20帧估计一次摄像头的移动速度。其中包括:Step S3: The speed detection module obtains two adjacent video frames from the main camera 3, extracts feature points from the target detection area in the image respectively, uses the feature points to perform feature matching and purification, and calculates the spatial transformation distance of the camera, and further Calculate the average moving speed of the camera in a video frame interval, update and correct the Kalman filter with this speed information, and use the Kalman filter to estimate the moving speed of the camera every 20 frames on average. These include:
步骤S31:为喷雾设备执行喷雾任务的行驶轨迹建立线性运动模型,算法首先创建一个时间间隔为330ms的卡尔曼滤波器;Step S31: Establish a linear motion model for the trajectory of the spraying equipment performing the spraying task. The algorithm first creates a Kalman filter with a time interval of 330ms;
步骤S32:利用主摄像头获取相邻视频图像数据,在指定目标区域中提取特征点,并且使用描述子对其进行描述;Step S32: Use the main camera to acquire adjacent video image data, extract feature points in the specified target area, and describe them using descriptors;
步骤S33:通过比值法和RANSAC提纯,设定最小匹配特征点个数,随机从提纯后的特征点集中提取出三个不共线的特征点;Step S33: Purify by ratio method and RANSAC, set the minimum number of matching feature points, and randomly extract three non-collinear feature points from the purified feature point set;
步骤S34:由于图像采集模块相对机械臂固定,抽取的视频图像只存在旋转、平移为主的运动方式,系统可以采用计算运动参数的方法对摄像机的二维运动方式进行描述,从而得到整个喷雾设备在喷雾作业中的运动轨迹。此处采用直角坐标系,故而平面运动中XY两个坐标轴旋转角度相同θX=θY=θ,可以利用六参数仿射变换模型推算摄像头的全局运动,其中起始位置(XT0,YT0),目标位置(XTP,YTP),平面位移(XSP,YSP),具体公式如下:Step S34: Since the image acquisition module is fixed relative to the mechanical arm, the extracted video images only have rotation and translation-based motion modes. The system can use the method of calculating motion parameters to describe the two-dimensional motion mode of the camera, so as to obtain the entire spray equipment Trajectories of motion during spraying operations. The Cartesian coordinate system is used here, so the rotation angles of the two coordinate axes of XY in plane motion are the same θ X = θ Y = θ, and the global motion of the camera can be estimated by using the six-parameter affine transformation model, where the starting position (X T0 , Y T0 ), target position (X TP , Y TP ), plane displacement (X SP , Y SP ), the specific formula is as follows:
根据运动参数模型,求解出参数:缩放scale,旋转rotation,x轴偏移量xtranslation,y轴偏移量ytranslation。已知相邻帧的抽取时间为tf,进而得到相邻视频帧间隔内平均移动像素的距离,移动速度v=(xtranslate/tf,ytranslate/tf);According to the motion parameter model, the parameters are solved: scaling scale, rotation rotation, x-axis offset xtranslation, y-axis offset ytranslation. The extraction time of the known adjacent frame is t f , and then the distance of the average moving pixel in the adjacent video frame interval is obtained, and the moving speed v=(xtranslate/t f , ytranslate/t f );
步骤S35:重复S32到S34的过程,以解算出的像素单位下的速度信息更新卡尔曼滤波器参数,同时利用预测模型估计出指定时间间隔内的摄像头运动速度值。Step S35: Repeat the process from S32 to S34 to update the parameters of the Kalman filter with the calculated speed information in pixel units, and at the same time use the predictive model to estimate the camera movement speed value within a specified time interval.
步骤S4:时延估计模块根据目标检测模块获取的喷雾任务队列和速度检测模块估算出的主摄像头3移动速度,方法以固定20ms一个周期的速度不断遍历任务队列,不断利用当前主摄像头3移动速度累积积分出单个任务的运动轨迹。根据检测设备和喷雾设备设定的间隔距离和累积积分出的任务移动距离准确的计算出喷雾任务的准确执行时间。一旦任务达到系统设定喷雾间隔距离,则立即发送喷雾任务命令给喷雾任务执行模块,并从任务队列中清除该喷雾任务。其中包括:Step S4: The time delay estimation module continuously traverses the task queue at a fixed cycle speed of 20 ms according to the spray task queue obtained by the target detection module and the moving speed of the main camera 3 estimated by the speed detection module, and continuously uses the current moving speed of the main camera 3 The trajectory of a single task is accumulated and integrated. Accurately calculate the exact execution time of the spraying task according to the interval distance set by the detection equipment and the spraying equipment and the accumulated task movement distance. Once the task reaches the spray interval set by the system, the spray task command is sent to the spray task execution module immediately, and the spray task is cleared from the task queue. These include:
步骤S41:以固定周期T遍历任务队列,依次取出单个任务队列,进行位移积分并更新参数。其中任务节点中最近一次更新时间为t,当前像素位移累积为s,速度检测模块中最近的速度估计值v和当前结点的更新时间tcur,具体更新操作如下:Step S41: traverse the task queue with a fixed period T, take out a single task queue in turn, perform displacement integration and update parameters. The latest update time in the task node is t, the current pixel displacement accumulation is s, the latest speed estimate v in the speed detection module and the update time t cur of the current node, the specific update operation is as follows:
步骤S42:判断当前像素距离s是否接近喷雾目标范围,一旦满足|s-2L|<ε(ε为像素距离vT/4)则向喷雾任务执行模块发送开启或关闭喷雾指令,同时将此任务从任务队列中删除。Step S42: Judging whether the current pixel distance s is close to the spray target range, once |s-2L|<ε (ε is the pixel distance vT/4) is met, send an instruction to turn on or off the spray to the spray task execution module, and at the same time set the task from Deleted from the task queue.
步骤S5:喷雾任务执行模块通过分析发送过来的任务命令,发送设定的高低电平信号控制电磁阀8开启或者关闭,完成喷雾作业的开启或关闭。Step S5: The spraying task execution module analyzes the sent task command and sends the set high and low level signals to control the opening or closing of the solenoid valve 8 to complete the opening or closing of the spraying operation.
以上所述,仅为本发明中的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉该技术的人在本发明所揭露的技术范围内,可理想得到的变换和改型,也应视为被涵盖在本发明的保护范围之内。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, anyone familiar with the technology can ideally obtain the transformation and modification within the technical scope disclosed in the present invention , should also be deemed to be covered within the protection scope of the present invention.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410783866.4A CN104615150B (en) | 2014-12-17 | 2014-12-17 | A kind of adaptive accurate spraying apparatus and method based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410783866.4A CN104615150B (en) | 2014-12-17 | 2014-12-17 | A kind of adaptive accurate spraying apparatus and method based on machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104615150A CN104615150A (en) | 2015-05-13 |
CN104615150B true CN104615150B (en) | 2017-10-03 |
Family
ID=53149648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410783866.4A Expired - Fee Related CN104615150B (en) | 2014-12-17 | 2014-12-17 | A kind of adaptive accurate spraying apparatus and method based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104615150B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106296799A (en) * | 2015-06-10 | 2017-01-04 | 西安蒜泥电子科技有限责任公司 | Characteristic point for object scanning is supplemented and extracting method |
CN106020245A (en) * | 2016-06-29 | 2016-10-12 | 韩斌 | Movable shower water spraying device based on intelligent home |
EP3403899A1 (en) * | 2017-05-17 | 2018-11-21 | Bayer Aktiengesellschaft | High speed weed control |
CN109285141B (en) * | 2018-07-27 | 2021-06-25 | 仲恺农业工程学院 | A real-time detection method for plant protection drone spraying effect |
CN110298854B (en) * | 2019-05-17 | 2021-05-11 | 同济大学 | Co-localization method of flying snake-like arm based on online adaptation and monocular vision |
CN111753388B (en) * | 2019-12-30 | 2021-06-15 | 广州极飞科技股份有限公司 | Spraying control method, spraying control device, electronic equipment and computer-readable storage medium |
CN114119736A (en) * | 2020-08-28 | 2022-03-01 | 中联农业机械股份有限公司 | Control method and control device for agricultural machine, agricultural machine and processor |
CN113312986A (en) * | 2021-05-10 | 2021-08-27 | 浙江科技学院 | Spraying control system based on visual processing and control method thereof |
CN114145279A (en) * | 2021-11-30 | 2022-03-08 | 福建省鼎贤市政园林工程有限公司 | Intelligent banyan insect pest multi-angle insecticidal sprinkler |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5222324A (en) * | 1991-02-21 | 1993-06-29 | Neall Donald L O | Crop spraying system |
US5924239A (en) * | 1994-10-25 | 1999-07-20 | Rees Equipment Pty Ltd. | Controller for agricultural sprayers |
CN101927220A (en) * | 2010-07-05 | 2010-12-29 | 中国农业大学 | Precise and intelligent target sprayer |
CN101961003A (en) * | 2010-08-10 | 2011-02-02 | 江苏大学 | Precise targeted spraying and weeding device |
CN102800083A (en) * | 2012-06-19 | 2012-11-28 | 中国农业大学 | Crop spraying positioning method based on binocular vision gridding partition matching algorithm |
CN103988824A (en) * | 2014-04-18 | 2014-08-20 | 浙江大学 | Automatic targeting and spraying system based on binocular vision technology |
CN104069970A (en) * | 2014-06-10 | 2014-10-01 | 潍坊美奥农业科技有限公司 | Agriculture intelligent spraying machine |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0712264B2 (en) * | 1990-06-01 | 1995-02-15 | 株式会社丸山製作所 | Method and device for spraying pest control spray |
-
2014
- 2014-12-17 CN CN201410783866.4A patent/CN104615150B/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5222324A (en) * | 1991-02-21 | 1993-06-29 | Neall Donald L O | Crop spraying system |
US5924239A (en) * | 1994-10-25 | 1999-07-20 | Rees Equipment Pty Ltd. | Controller for agricultural sprayers |
CN101927220A (en) * | 2010-07-05 | 2010-12-29 | 中国农业大学 | Precise and intelligent target sprayer |
CN101961003A (en) * | 2010-08-10 | 2011-02-02 | 江苏大学 | Precise targeted spraying and weeding device |
CN102800083A (en) * | 2012-06-19 | 2012-11-28 | 中国农业大学 | Crop spraying positioning method based on binocular vision gridding partition matching algorithm |
CN103988824A (en) * | 2014-04-18 | 2014-08-20 | 浙江大学 | Automatic targeting and spraying system based on binocular vision technology |
CN104069970A (en) * | 2014-06-10 | 2014-10-01 | 潍坊美奥农业科技有限公司 | Agriculture intelligent spraying machine |
Also Published As
Publication number | Publication date |
---|---|
CN104615150A (en) | 2015-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104615150B (en) | A kind of adaptive accurate spraying apparatus and method based on machine vision | |
CN107356252B (en) | Indoor robot positioning method integrating visual odometer and physical odometer | |
CN110349250B (en) | RGBD camera-based three-dimensional reconstruction method for indoor dynamic scene | |
CN110488811B (en) | Method for predicting pedestrian track by robot based on social network model | |
CN102368158B (en) | Navigation positioning method of orchard machine | |
CN104049634B (en) | Intelligent body fuzzy dynamic obstacle avoidance method based on Camshift algorithm | |
CN102800083B (en) | Crop spraying positioning method based on binocular vision gridding partition matching algorithm | |
CN113276106B (en) | Climbing robot space positioning method and space positioning system | |
CN101650178B (en) | Method for image matching guided by control feature point and optimal partial homography in three-dimensional reconstruction of sequence images | |
CN102688823B (en) | Atomizing positioning device and method based on hand-eye atomizing mechanical arm | |
CN108563220A (en) | The motion planning of apery Soccer robot | |
CN105160703A (en) | Optical flow computation method using time domain visual sensor | |
CN108877269A (en) | A kind of detection of intersection vehicle-state and V2X broadcasting method | |
CN115468567A (en) | Cross-country environment-oriented laser vision fusion SLAM method | |
CN110766785A (en) | A device and method for real-time positioning and three-dimensional reconstruction of underground pipelines | |
CN118168545A (en) | Weeding robot positioning and navigation system and method based on multi-source sensor fusion | |
CN112541938A (en) | Pedestrian speed measuring method, system, medium and computing device | |
CN116823812A (en) | Silage corn field life detection method | |
CN112308033A (en) | Obstacle collision warning method based on depth data and visual chip | |
CN106325278A (en) | Robot positioning and navigating method based on ellipse identification | |
CN107647828A (en) | The sweeping robot of fish-eye camera is installed | |
CN104075710B (en) | Maneuvering extension target axial attitude real-time estimation method based on track prediction | |
CN109785365A (en) | Address events drive the real-time modeling method method of unstructured signal | |
CN108646760A (en) | Based on the target following of monocular vision mobile robot and platform control system and method | |
CN102359788B (en) | Series image target recursive identification method based on platform inertia attitude parameter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171003 Termination date: 20201217 |