技术领域technical field
本发明涉及农业自动化领域,特别涉及一种基于田间图像特征点匹配的农业装备横滚角获取方法。The invention relates to the field of agricultural automation, in particular to a method for acquiring roll angles of agricultural equipment based on field image feature point matching.
背景技术Background technique
农业装备向着大型化发展,机具的机构复杂程度、工作幅宽等方面也逐步加大。在垄作区耕种时,拖拉机跨垄作业,由于操作偶尔存在偏差、或者垄弯曲,可能会使拖拉机轮胎一侧在垄台、一侧在垄沟里。此时会引起机具的坡度角在一定范围内的变化。农业装备的横滚角会影响耕作质量,监测其横滚角可以为稳定耕作深度提供信息,从而使机具获得一致耕深、进而保证耕作质量。With the development of large-scale agricultural equipment, the mechanism complexity and working width of machinery and tools are also gradually increasing. When cultivating in a ridge area, tractors work across ridges. Due to occasional deviations in operation or ridge curvature, one side of the tractor tire may be on the ridge platform and the other side in the furrow. At this time, it will cause the slope angle of the implement to change within a certain range. The roll angle of agricultural equipment will affect the tillage quality, and monitoring the roll angle can provide information for stabilizing the tillage depth, so that the machine can obtain a consistent tillage depth, thereby ensuring the tillage quality.
目前农业装备获取姿态的方法多采用惯性传感器和GPS技术等方法获取。其中惯性传感器一般采用加速度和陀螺仪、倾角传感器等。发明专利“一种基于MEMS加速度计的载体姿态横滚角获取方法”(发明专利申请号:201510350410.3)公开了一种横滚角获取方法,预先将三轴MEMS加速度计安装于载体上,通过三轴MEMS加速度计实时获取载体三个轴方向上的向量参数,根据获取的三个轴方向上的向量参数计算出载体姿态基于重力向量的横滚角。发明专利“基于GPS的农业机械导航的多传感器信息融合方法”(发明专利申请号:201410081311.5)采用导航传感器组合测量得到农业机械的原始横滚角度。At present, the methods of obtaining the attitude of agricultural equipment are mostly obtained by methods such as inertial sensors and GPS technology. Among them, inertial sensors generally use acceleration and gyroscopes, inclination sensors, etc. The invention patent "A Method for Obtaining Roll Angle of Carrier Attitude Based on MEMS Accelerometer" (invention patent application number: 201510350410.3) discloses a method for obtaining roll angle. The three-axis MEMS accelerometer is installed on the carrier in advance, and the The axial MEMS accelerometer obtains the vector parameters in the three axis directions of the carrier in real time, and calculates the roll angle of the carrier attitude based on the gravity vector according to the obtained vector parameters in the three axis directions. The invention patent "Multi-sensor information fusion method for GPS-based agricultural machinery navigation" (invention patent application number: 201410081311.5) uses the combination of navigation sensors to measure the original roll angle of agricultural machinery.
发明内容Contents of the invention
本发明的目的是提供一种基于田间图像特征点匹配的农业装备横滚角获取方法,应用机器视觉技术,通过安装在农业装备前部的摄像头采集田间图像,根据所获取的田间图像相对位置变化,为农业装备提供田间作业时的横滚角信息。The purpose of the present invention is to provide a method for obtaining the roll angle of agricultural equipment based on field image feature point matching, which uses machine vision technology to collect field images through a camera installed in the front of the agricultural equipment, and changes the relative position of the obtained field images , to provide roll angle information for agricultural equipment during field operations.
为了实现本发明的上述目的,本发明提供了一种基于田间图像特征点匹配的农业装备横滚角获取方法,其特征在于:在初始时刻t0设定农业装备横滚角初始角度θ0(θ0可以设为0°,亦可设定为农业装备初始时刻相对于水平面的相对角度),拍摄并保存初始田间图像P0;设定固定的时间T1(T1根据需要自行设定,优选100ms≤T1≤10000ms),每间隔时间T1拍摄1张田间图像,当拍摄的图像数i≥2时,分别提取两张田间图像的特征点,对比两张田间图像特征点的相对位置变化,得到变换矩阵;由变换矩阵转换成两张田间图像的偏转角度;对两张田间图像的偏转角度进行计算,通过相应数学模型得出农业机械作业相对于初始角度的横滚角。In order to achieve the above object of the present invention, the present invention provides a method for obtaining roll angle of agricultural equipment based on field image feature point matching, characterized in that: at the initial time t0 , the initial angle θ0 of the roll angle of agricultural equipment is set ( θ0 can be set to 0°, or it can be set to the relative angle of the agricultural equipment relative to the horizontal plane at the initial moment), shoot and save the initial field image P0 ; set a fixed time T1 (T1 can be set by itself according to needs, Preferably 100ms≤T1 ≤10000ms), take a field image at every interval T1 , when the number of captured images i≥2, extract the feature points of the two field images respectively, and compare the relative positions of the feature points of the two field images Change to obtain the transformation matrix; convert the transformation matrix into the deflection angle of the two field images; calculate the deflection angle of the two field images, and obtain the roll angle of the agricultural machinery operation relative to the initial angle through the corresponding mathematical model.
一种基于田间图像特征点匹配的农业装备横滚角获取方法,通过安装在农业装备上的摄像头采集田间图像,通过田间图像的相对位置变化获取农业装备的横滚角;具体包括以下步骤:A method for obtaining a roll angle of agricultural equipment based on field image feature point matching, which collects field images through a camera installed on the agricultural equipment, and obtains the roll angle of the agricultural equipment through the relative position changes of the field images; specifically includes the following steps:
步骤一、在初始时刻t0设定农业装备横滚角初始角度θ0,拍摄并保存初始田间图像P0;Step 1. Set the initial roll angle θ0 of the agricultural equipment at the initial time t0 , take and save the initial field image P0 ;
步骤二、设定固定的时间T1,每间隔时间T1拍摄1张田间图像Pi(i为自然数),提取田间图像Pi的特征点;Step 2: Set a fixed time T1 , take a field image Pi (i is a natural number) every time interval T1 , and extract the feature points of the field image Pi ;
步骤三、计算田间图像Pi相对于初始田间图像P0的偏转角度δi,得出农业机械作业相对于初始角度的横滚角。Step 3: Calculate the deflection angle δi of the field image Pi relative to the initial field image P0 to obtain the roll angle of the agricultural machinery operation relative to the initial angle.
进一步地,所述步骤二提取田间图像Pi的特征点包括以下过程:Further, the step 2 extracting the feature points of the field image Pi includes the following process:
2.1)将所拍摄田间图像Pi进行灰度化处理;2.1) gray-scale processing the captured field image Pi ;
2.2)分别检测灰度化处理后每张田间图像Pi上的特征点;2.2) Detecting the feature points on each field image Pi after the gray scale processing respectively;
2.3)在每幅二维灰度田间图像上进行特征点精确定位、构建并提取关于特征点的描述子和相应位置信息;2.3) Precisely locate feature points on each two-dimensional grayscale field image, construct and extract descriptors and corresponding position information about feature points;
2.4)对田间图像P0和初始田间图像Pi上的特征点描述子进行匹配、去除误匹配;2.4) Match the feature point descriptors on the field image P0 and the initial field image Pi , and remove the mismatch;
进一步地,所述步骤三计算田间图像Pi相对于初始田间图像P0的偏转角度δi,得出农业机械作业相对于初始角度的横滚角的实现方法为:Further, the step 3 calculates the deflection angle δi of the field image Pi relative to the initial field image P0 , and obtains the implementation method of the roll angle of the agricultural machinery operation relative to the initial angle as follows:
分别计算所述步骤二提取的田间图像P1、田间图像P2、田间图像P3、……、田间图像Pi与初始田间图像P0之间的旋转角度θ1、θ2、θ3、……、θi,则田间图像Pi相对于初始田间图像P0的偏转角度:δ1=θ0+θ1、δ2=θ0+θ2、δ3=θ0+θ3、……、δi=θ0+θi。Calculate the rotation angles θ 1,θ2,θ3, ..., θi , the deflection angle of the field image Pi relative to the initial field image P0 : δ1 = θ0 + θ1 , δ2 = θ0 + θ2 , δ3 = θ0 + θ3 , ... ..., δi =θ0 +θi .
进一步地,所述初始田间图像P0与田间图像Pi的偏转角度的计算方法为:Further, the calculation method of the deflection angle of the initial field image P0 and the field image Pi is:
根据初始田间图像P0与田间图像Pi上的匹配特征点的位置计算两组特征点之间的变换参数,并得到变换矩阵:Calculate the transformation parameters between two groups of feature points according to the positions of the matching feature points on the initial field image P0 and field image Pi , and obtain the transformation matrix:
其中,ss=k×sin(θ),sc=k×cos(θ),k是初始田间图像P0与田间图像Pi间几何变换的缩放比例,θ是初始田间图像P0与田间图像Pi间的旋转角度,tx和ty分别是初始田间图像P0与田间图像Pi在x和y方向上的相对位移;Among them, ss=k×sin(θ), sc=k×cos(θ), k is the scaling ratio of the geometric transformation between the initial field image P0 and the field image Pi , θ is the initial field image P0 and the field image P The rotation angle betweeni , tx and ty are the relative displacements of the initial field image P0 and the field image Pi in the x and y directions, respectively;
再由变换矩阵θ=arctan(ss/sc)×180/π转换成初始田间图像P0与田间图像Pi的偏转角度。Then it is transformed into the deflection angle of the initial field image P0 and the field image Pi by the transformation matrix θ=arctan(ss/sc)×180/π.
进一步地,所述步骤三计算田间图像Pi相对于初始田间图像P0的偏转角度δi,得出农业机械作业相对于初始角度的横滚角的实现方法为:Further, the step 3 calculates the deflection angle δi of the field image Pi relative to the initial field image P0 , and obtains the implementation method of the roll angle of the agricultural machinery operation relative to the initial angle as follows:
分别求出所述步骤二提取的连续两张田间图像之间的旋转角度,即初始田间图像P0和田间图像P1,田间图像P1和田间图像P2,田间图像P2和田间图像P3,……,田间图像Pi-1与田间图像Pi之间的旋转角度为η1,η2,η3,……,ηi;再计算田间图像Pi相对于初始图像P0的偏转角度:δ1=δ0+η1、δ2=δ1+η2、δ3=δ2+η3、……、δi=δi-1+ηi,其中,δ0=θ0。Calculate the rotation angles between the two consecutive field images extracted in step 2, namely the initial field image P0 and field image P1 , field image P1 and field image P2 , field image P2 and field image P3 ,..., the rotation angle between the field image Pi-1 and the field image Pi is η1 , η2 , η3 ,..., ηi ; then calculate the rotation angle of the field image Pi relative to the initial image P0 Deflection angle: δ1 =δ0 +η1 , δ2 =δ1 +η2 , δ3 =δ2 +η3 ,..., δi =δi-1 +ηi , where δ0 =θ0 .
进一步地,所述田间图像Pi-1与Pi的偏转角度的计算方法为:Further, the calculation method of the deflection angles of the field images Pi-1 and Pi is:
根据两张田间图像Pi-1与Pi上的匹配特征点的位置计算两组特征点之间的变换参数,并得到变换矩阵:Calculate the transformation parameters between the two sets of feature points according to the positions of the matching feature points on the two field images Pi-1 and Pi , and obtain the transformation matrix:
其中,ss=k×sin(η),sc=k×cos(η),k是田间图像Pi-1与田间图像Pi间几何变换的缩放比例,η是两幅田间图像间的旋转角度,tx和ty分别是两幅田间图像间在x和y方向上的相对位移;Wherein, ss=k×sin (η), sc=k×cos (η), k is the scaling ratio of the geometric transformation between the field image Pi-1 and the field image Pi , and η is the rotation angle between the two field images , tx and ty are the relative displacements between the two field images in the x and y directions, respectively;
再由变换矩阵η=arctan(ss/sc)×180/π转换成田间图像Pi-1与Pi的偏转角度。Then, the deflection angles of the field images Pi−1 and Pi are converted by the transformation matrix η=arctan(ss/sc)×180/π.
进一步地,该基于田间图像特征点匹配的农业装备横滚角获取方法还包括:Further, the method for obtaining roll angle of agricultural equipment based on field image feature point matching also includes:
步骤四、初始田间图像调整:当距离初始时刻t0间隔一定时间段nT2时,其中n为自然数,T2=20T1,重新读取一张初始图像P0’以及该初始图像P0’的角度数据θ0’;以初始田间图像P0’作为后续提取的田间图像的对比模板,每隔一定时间段T1从摄像头读取一张田间图像Pi’,提取田间图像Pi’的特征点;然后返回所述步骤三进行田间图像Pi’相对于初始田间图像P0’的偏转角度δi’计算。Step 4. Initial field image adjustment: when there is a certain period of time nT2 from the initial time t0 , where n is a natural number, T2 =20T1 , re-read an initial image P0 ' and the initial image P0 ' The angle data θ0 'of; take the initial field image P0 ' as the comparison template of the subsequent extracted field images, read a field image Pi ' from the camera every certain time period T1 , and extract the field image Pi ' feature points; then return to step 3 to calculate the deflection angle δi ' of the field image Pi ' relative to the initial field image P0 '.
进一步地,所述步骤一中设定农业装备横滚角初始角度θ0,θ0可以设定为0°或设定为农业装备初始时刻相对于水平面的相对角度。Further, in the first step, the initial roll angle θ0 of the agricultural equipment is set, and θ0 can be set as 0° or as the relative angle of the agricultural equipment relative to the horizontal plane at the initial moment.
进一步地,为提高系统响应速度,可以根据需要选取每张图像中心的固定尺寸区域进行匹配处理。Further, in order to improve the response speed of the system, a fixed-size area in the center of each image can be selected for matching processing as required.
本发明使农业装备在田间作业时,应用携带的图像采集系统能够准确地进行横滚角的确定,为农业机械作业的监测调整提供保障。另外,本发明可以应用于多种农业装备,如拖拉机作业机组、植保无人机等,也可以结合陀螺仪、测距机、惯性测量单元等传感器进一步提高精度,亦可结合此方法进行农业装备的自主导航。The invention enables the agricultural equipment to accurately determine the roll angle by using a portable image acquisition system when the agricultural equipment is operating in the field, thereby providing guarantee for the monitoring and adjustment of the agricultural machinery operation. In addition, the present invention can be applied to a variety of agricultural equipment, such as tractor operating units, plant protection drones, etc., and can also be combined with sensors such as gyroscopes, rangefinders, and inertial measurement units to further improve accuracy, and can also be combined with this method for agricultural equipment. autonomous navigation.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
附图说明Description of drawings
图1为本发明基于田间图像特征点匹配的农业装备横滚角获取方法流程图;Fig. 1 is the flow chart of the method for obtaining roll angle of agricultural equipment based on field image feature point matching in the present invention;
图2为本发明基于田间图像特征点匹配的农业装备横滚角获取方法的第一种优选实施方式的流程图;Fig. 2 is the flow chart of the first preferred embodiment of the agricultural equipment roll angle acquisition method based on field image feature point matching in the present invention;
图3为本发明基于田间图像特征点匹配的农业装备横滚角获取方法的第二种优选实施方式的流程图。Fig. 3 is a flow chart of the second preferred embodiment of the method for obtaining the roll angle of agricultural equipment based on field image feature point matching in the present invention.
具体实施方式detailed description
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的步骤或具有相同或类似功能的步骤。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals denote the same or similar steps or steps having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
固定安装在农业装备上的图像采集装置(如:摄像头),在农业装备作业期间同农业装备保持相同的运动姿态。若农业装备相对于农田地表不完全平行、存在一定角度时,摄像头相对于农田地表亦具有相同横滚角度。因此,可以通过安装在农业装备上的摄像头采集田间图像,通过田间图像的相对位置变化获取农业装备的横滚角。The image acquisition device (such as a camera) fixedly installed on the agricultural equipment maintains the same movement posture as the agricultural equipment during the operation of the agricultural equipment. If the agricultural equipment is not completely parallel to the farmland surface and has a certain angle, the camera also has the same roll angle relative to the farmland surface. Therefore, the field image can be collected through the camera installed on the agricultural equipment, and the roll angle of the agricultural equipment can be obtained through the relative position change of the field image.
图1为本发明基于田间图像特征点匹配的农业装备横滚角获取方法流程图,从图中可见,基于田间图像特征点匹配的农业装备横滚角获取方法,包括如下步骤:Fig. 1 is the flow chart of the method for obtaining roll angle of agricultural equipment based on field image feature point matching in the present invention. As can be seen from the figure, the method for obtaining roll angle of agricultural equipment based on field image feature point matching includes the following steps:
步骤一、在初始时刻t0设定农业装备横滚角初始角度θ0(θ0可以设为0°,亦可设定为农业装备初始时刻相对于水平面的相对角度),拍摄并保存初始田间图像P0;Step 1. Set the initial roll angle θ0 of the agricultural equipment at the initial time t0 (θ0 can be set to 0°, or it can be set to the relative angle of the agricultural equipment relative to the horizontal plane at the initial moment), and take and save the initial field image P0 ;
步骤二、设定固定的时间T1,每间隔时间T1拍摄1张田间图像Pi(i为自然数),提取田间图像Pi的特征点;Step 2: Set a fixed time T1 , take a field image Pi (i is a natural number) every time interval T1 , and extract the feature points of the field image Pi ;
步骤三、计算田间图像Pi相对于初始田间图像P0的偏转角度δi,得出农业机械作业相对于初始角度的横滚角。Step 3: Calculate the deflection angle δi of the field image Pi relative to the initial field image P0 to obtain the roll angle of the agricultural machinery operation relative to the initial angle.
实施例1Example 1
S1:在初始时刻t0设定农业装备横滚角初始角度为0°,或设定为农业装备初始时刻相对于水平面的相对角度θ0;开始计时,同时拍摄并保存初始田间图像P0;S1: Set the initial roll angle of the agricultural equipment to 0° at the initial moment t0 , or set it to the relative angle θ0 of the agricultural equipment relative to the horizontal plane at the initial moment; start timing, and simultaneously shoot and save the initial field image P0 ;
S2:设定固定的时间T1,每间隔时间T1拍摄1张田间图像Pi(i为自然数);S2: Set a fixed time T1 , and take a field image Pi (i is a natural number) every time interval T1 ;
S3:将所拍摄田间图像Pi进行灰度化处理;S3: Perform grayscale processing on the captured field image Pi ;
S4:分别检测灰度化处理后每张田间图像Pi上的特征点;S4: respectively detect the feature points on each field image Pi after the grayscale processing;
S5:在每幅二维灰度田间图像上进行特征点精确定位、构建并提取关于特征点的描述子(所处尺度、方向)和相应位置信息;S5: Accurately locate feature points on each two-dimensional grayscale field image, construct and extract descriptors (scales, directions) and corresponding position information about feature points;
S6:对两幅田间图像P0和Pi上的特征点描述子进行匹配、去除误匹配,S6: Match the feature point descriptors on the two field images P0 and Pi , and remove the mismatch,
S7:对两张田间图像P0和Pi的偏转角度进行计算,得出农业机械作业相对于初始角度的横滚角。S7: Calculate the deflection angles of the two field images P0 and Pi to obtain the roll angle of the agricultural machinery operation relative to the initial angle.
如上所述的步骤S7,包括以下两个步骤:Step S7 as mentioned above includes the following two steps:
S71:程序在初始时刻t0,先实时读取一张初始田间图像P0,并读取该初始图像的角度数据θ0作为该初始图像的角度,以该初始图像P0作为此后所读取图像的对比模板,以后每隔一定时间段T1从摄像头读取一张田间图像P1、P2、P3、……、Pi(T1=100ms),并分别求出所读取的田间图像P1、P2、P3、……、Pi与初始图像P0之间的旋转角度θ1、θ2、θ3、……、θi,计算出所读取的图像相对于初始图像P0的偏转角度δ1=θ0+θ1、δ2=θ0+θ2、δ3=θ0+θ3、……、δi=θ0+θi(此为第一个循环)。S71: The program first reads an initial field image P0 in real time at the initial time t0 , and reads the angle data θ0 of the initial image as the angle of the initial image, and takes the initial image P0 as the The comparison template of the image, read a field image P1 , P2 , P3 , ..., Pi (T1 =100ms) from the camera every certain period of time T1 in the future, and calculate the read The rotation angles θ1 , θ2 , θ3 , ... , θi between the field images P1 , P2 , P3 , ... , Pi and the initial image P0 are calculated relative to the initial image P 0 The deflection angle of image P0 is δ1 =θ0 +θ1 , δ2 =θ0 +θ2 , δ3 =θ0 +θ3 , ..., δi =θ0 +θi (this is the first cycle).
S72:为了消除由于距离变化带来的影响,当距离初始时刻t0间隔一定时间段nT2(n为自然数,T2=20T1)时,则重新读取一张初始图像P0’和该初始图像的角度数据θ0’(θ0’为上一个循环中最后一张图像Pi的相对角度δi);以该初始图像P0’作为以后接收到的图像对比的模板,以后每隔一定时间段T1从摄像头读取一张田间图像,并分别求出所读取的图像P1’、P2’、P3’、……、Pi’与初始图像P0’之间的旋转角度(或两幅图像之间的旋转角度)θ1’、θ2’、θ3’、……、θi’,计算出所读取的图像相对于初始图像P0的偏转角度δ1’=θ0’+θ1’、δ2’=θ0’+θ2’、δ3’=θ0’+θ3’、……、δi’=θ0’+θi’(此为第二个循环);S72: In order to eliminate the influence caused by distance changes, when there is a certain period of time nT2 (n is a natural number, T2 =20T1 ) from the initial time t0 , re-read an initial image P0 ' and the The angle data θ0 ' of the initial image (θ0 ' is the relative angle δi of the last image Pi in the previous cycle); the initial image P0 ' is used as a template for comparison of images received later, and every subsequent Read a field image from the camera for a certain period of time T1 , and calculate the distance between the read images P1 ', P2 ', P3 ', ..., Pi ' and the initial image P0 ' Rotation angle (or rotation angle between two images) θ1 ', θ2 ', θ3 ', ..., θi ', calculate the deflection angle δ1 ' of the read image relative to the initial image P0 =θ0 '+θ1 ', δ2 '=θ0 '+θ2 ', δ3 '=θ0 '+θ3 ', ..., δi '=θ0 '+θi ' (this is second loop);
S73:若未到达间隔时间T2,则判断是否接收到中断指令,若未收到结束指令,则重复上一循环的操作;若收到结束指令,则结束角度获取。S73: If the interval time T2 is not reached, it is judged whether an interrupt command is received, and if the end command is not received, the operation of the previous cycle is repeated; if the end command is received, the angle acquisition is ended.
田间图像P0与Pi的偏转角度的计算方法为:The calculation method of the deflection angle of the field image P0 and Pi is:
根据两张田间图像P0与Pi上的匹配特征点的位置计算两组特征点之间的变换参数,并得到变换矩阵:Calculate the transformation parameters between the two sets of feature points according to the positions of the matching feature points on the two field images P0 and Pi , and obtain the transformation matrix:
其中,ss=k×sin(θ),sc=k×cos(θ),k是两图像Pi-1与Pi间几何变换的缩放比例,θ是两图像间的旋转角度,tx和ty分别是两图像间在x和y方向上的相对位移;Among them, ss=k×sin(θ), sc=k×cos(θ), k is the scaling ratio of the geometric transformation between the two images Pi-1 and Pi , θ is the rotation angle between the two images, tx and ty are the relative displacements between the two images in the x and y directions, respectively;
再由变换矩阵θ=arctan(ss/sc)×180/π转换成田间图像P0与Pi的偏转角度。Then it is converted into the deflection angles of the field images P0 and Pi by the transformation matrix θ=arctan(ss/sc)×180/π.
实施例2Example 2
S1:在初始时刻t0设定农业装备横滚角初始角度为0°,或设定为农业装备初始时刻相对于水平面的相对角度θ0;开始计时,同时拍摄并保存初始田间图像P0;S1: Set the initial roll angle of the agricultural equipment to 0° at the initial moment t0 , or set it to the relative angle θ0 of the agricultural equipment relative to the horizontal plane at the initial moment; start timing, and simultaneously shoot and save the initial field image P0 ;
S2:设定固定的时间T1,每间隔时间T1拍摄1张图像Pi(i为自然数);S2: Set a fixed time T1 , and take an image Pi (i is a natural number) every time interval T1 ;
S3:将所拍摄田间图像Pi进行灰度化处理;S3: Perform grayscale processing on the captured field image Pi ;
S4:分别检测灰度化处理后每张田间图像Pi上的特征点;S4: respectively detect the feature points on each field image Pi after the grayscale processing;
S5:在每幅二维灰度田间图像上进行特征点精确定位、构建并提取关于特征点的描述子(所处尺度、方向)和相应位置信息;S5: Accurately locate feature points on each two-dimensional grayscale field image, construct and extract descriptors (scales, directions) and corresponding position information about feature points;
S6:对连续两幅田间图像Pi-1和Pi上的特征点描述子进行匹配、去除误匹配;S6: Match the feature point descriptors on two consecutive field images Pi-1 and Pi , and remove mismatching;
S7:对相邻两张田间图像Pi-1和Pi的偏转角度进行计算,得出农业机械作业相对于初始角度的横滚角。S7: Calculate the deflection angles of two adjacent field images Pi-1 and Pi to obtain the roll angle of the agricultural machinery operation relative to the initial angle.
如上所述的步骤S7,包括以下两个步骤:Step S7 as mentioned above includes the following two steps:
S71:程序在初始时刻t0,先实时读取一张初始田间图像P0,并读取该初始图像的角度数据θ0作为该初始图像的角度,以该初始图像P0作为此后所读取图像的对比模板,以后每隔一定时间段T1从摄像头读取一张田间图像(T1=1000ms),并分别求出所读取的连续两张图像之间的旋转角度,P0和P1,P1和P2,P2和P3,……,Pi-1与Pi之间的旋转角度为η1,η2,η3,……,ηi;计算出所读取的图像相对于初始图像P0的偏转角度δ1=δ0+η1(其中δ0=θ0)、δ2=δ1+η2、δ3=δ2+η3、……、δi=δi-1+ηi(此为第一个循环);S71: The program first reads an initial field image P0 in real time at the initial time t0 , and reads the angle data θ0 of the initial image as the angle of the initial image, and takes the initial image P0 as the The comparison template of the image, read a field image (T1 = 1000ms) from the camera every certain period of time T1 later, and calculate the rotation angle between the read two consecutive images, P0 and P1 , P1 and P2 , P2 and P3 , ..., the rotation angle between Pi-1 and Pi is η1 , η2 , η3 , ..., ηi ; calculate the read The deflection angle of the image relative to the initial image P0 is δ1 =δ0 +η1 (where δ0 =θ0 ), δ2 =δ1 +η2 , δ3 =δ2 +η3 ,...,δi =δi-1 +ηi (this is the first cycle);
S72:为了消除由于距离变化带来的影响,当距离初始时刻t0间隔一定时间段nT2(n为自然数,T2=20T1)时,则重新读取一张初始田间图像P0’和该初始图像的角度数据η0’(η0’为上一个循环中最后一张图像Pi的相对角度δi),以该初始图像P0’作为以后接收到的图像对比的模板,以后每隔一定时间段T1从摄像头读取一张田间图像,并分别求出所读取的连续两张图像之间的旋转角度,P0’和P1’,P1’和P2’,P2’和P3’,……,Pi-1’与Pi’之间的旋转角度为η1’,η2’,η3’,……,ηi’;计算出所读取的图像相对于初始图像P0’的偏转角度δ1’=δ0’+η1’(其中δ0’=η0’)、δ2’=δ1’+η2’、δ3’=δ2’+η3’、……、δi’=δi-1’+ηi’(此为第二个循环);S72: In order to eliminate the influence caused by the distance change, when there is a certain period of time nT2 (n is a natural number, T2 =20T1 ) from the initial time t0 , re-read an initial field image P0 ' and The angle data η0 ' of the initial image (η0 ' is the relative angle δi of the last image Pi in the previous cycle), and the initial image P0 ' is used as a template for comparing images received later, and each subsequent Read a field image from the camera at intervals T1 , and calculate the rotation angles between the read two consecutive images, P0 ' and P1 ', P1 ' and P2 ', P2 'and P3 ', ..., the rotation angle between Pi-1 ' and Pi ' is η1 ', η2 ', η3 ', ..., ηi '; calculate the read image Relative to the deflection angle δ1 '=δ0 '+η1 ' (where δ0 '=η0 '), δ2 '=δ1 '+η2 ', δ3 '=δ2 relative to the initial image P0 ''+η3 ', ..., δi '=δi-1 '+ηi ' (this is the second cycle);
S73:若未到达间隔时间T2,则判断是否接收到中断指令,若未收到结束指令,则重复上一循环的操作;若收到结束指令,则结束角度获取。S73: If the interval time T2 is not reached, it is judged whether an interrupt command is received, and if the end command is not received, the operation of the previous cycle is repeated; if the end command is received, the angle acquisition is ended.
田间图像Pi-1与Pi的偏转角度的计算方法为:The calculation method of the deflection angle between field image Pi-1 and Pi is:
根据两张田间图像Pi-1与Pi上的匹配特征点的位置计算两组特征点之间的变换参数,并得到变换矩阵:Calculate the transformation parameters between the two sets of feature points according to the positions of the matching feature points on the two field images Pi-1 and Pi , and obtain the transformation matrix:
其中,ss=k×sin(η),sc=k×cos(η),k是两图像Pi-1与Pi间几何变换的缩放比例,η是两图像间的旋转角度,tx和ty分别是两图像间在x和y方向上的相对位移;Among them, ss=k×sin(η), sc=k×cos(η), k is the scaling ratio of the geometric transformation between the two images Pi-1 and Pi , η is the rotation angle between the two images, tx and ty are the relative displacements between the two images in the x and y directions, respectively;
再由变换矩阵η=arctan(ss/sc)×180/π转换成田间图像Pi-1与Pi的偏转角度。Then, the deflection angles of the field images Pi−1 and Pi are converted by the transformation matrix η=arctan(ss/sc)×180/π.
本专利申请是通过具体实施例进行说明的,在不脱离本专利申请范围的情况下,还可以对本专利申请进行各种变换及等同替代。另外,针对特定情形或具体情况,可以对本专利申请做各种修改和变形,这些修改和变形均不脱离本专利申请的范围。因此,本专利申请不局限于所公开的具体实施例,而应当包括落入本专利申请权利要求范围内的全部实施方式。This patent application is described through specific embodiments. Without departing from the scope of this patent application, various transformations and equivalent substitutions can also be made to this patent application. In addition, various modifications and deformations can be made to this patent application for specific situations or specific situations, and these modifications and deformations do not depart from the scope of this patent application. Therefore, this patent application is not limited to the specific embodiments disclosed, but shall include all implementations falling within the scope of the claims of this patent application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610551581.7ACN106225775A (en) | 2016-07-14 | 2016-07-14 | Agricultural equipment roll angle acquisition methods based on field image Feature Points Matching |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610551581.7ACN106225775A (en) | 2016-07-14 | 2016-07-14 | Agricultural equipment roll angle acquisition methods based on field image Feature Points Matching |
| Publication Number | Publication Date |
|---|---|
| CN106225775Atrue CN106225775A (en) | 2016-12-14 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610551581.7APendingCN106225775A (en) | 2016-07-14 | 2016-07-14 | Agricultural equipment roll angle acquisition methods based on field image Feature Points Matching |
| Country | Link |
|---|---|
| CN (1) | CN106225775A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110618683A (en)* | 2019-10-12 | 2019-12-27 | 江苏农林职业技术学院 | Agricultural machine attitude monitoring device and method based on Beidou navigation |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101733746A (en)* | 2009-12-22 | 2010-06-16 | 哈尔滨工业大学 | Autonomously identifying and capturing method of non-cooperative target of space robot |
| CN101819036A (en)* | 2009-11-25 | 2010-09-01 | 煤炭科学研究总院太原研究院 | Method for automatically measuring special position of tunnel boring machine |
| CN102435188A (en)* | 2011-09-15 | 2012-05-02 | 南京航空航天大学 | A Monocular Vision/Inertial Fully Autonomous Navigation Method for Indoor Environment |
| CN102538781A (en)* | 2011-12-14 | 2012-07-04 | 浙江大学 | Machine vision and inertial navigation fusion-based mobile robot motion attitude estimation method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101819036A (en)* | 2009-11-25 | 2010-09-01 | 煤炭科学研究总院太原研究院 | Method for automatically measuring special position of tunnel boring machine |
| CN101733746A (en)* | 2009-12-22 | 2010-06-16 | 哈尔滨工业大学 | Autonomously identifying and capturing method of non-cooperative target of space robot |
| CN102435188A (en)* | 2011-09-15 | 2012-05-02 | 南京航空航天大学 | A Monocular Vision/Inertial Fully Autonomous Navigation Method for Indoor Environment |
| CN102538781A (en)* | 2011-12-14 | 2012-07-04 | 浙江大学 | Machine vision and inertial navigation fusion-based mobile robot motion attitude estimation method |
| Title |
|---|
| 周俊 等: "农用轮式移动机器人相对位姿的求解方法", 《中国图像图形学报》* |
| 曾岱 等: "《侦察图像获取与融合技术》", 31 May 2015, 国防工业出版社* |
| 赵大伟 等: "基于序列图像的小型无人机姿态快速估计方法与实验", 《计算机测量与控制》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110618683A (en)* | 2019-10-12 | 2019-12-27 | 江苏农林职业技术学院 | Agricultural machine attitude monitoring device and method based on Beidou navigation |
| Publication | Publication Date | Title |
|---|---|---|
| CN110555889B (en) | A depth camera hand-eye calibration method based on CALTag and point cloud information | |
| US8320709B2 (en) | Information processing method and apparatus for calculating information regarding measurement target on the basis of captured images | |
| CN106056664B (en) | A kind of real-time three-dimensional scene reconstruction system and method based on inertia and deep vision | |
| CN100489833C (en) | Position posture measuring method, position posture measuring device | |
| JP5832341B2 (en) | Movie processing apparatus, movie processing method, and movie processing program | |
| EP2733457B1 (en) | Position and orientation calibration method and apparatus | |
| CN107909614B (en) | A positioning method of inspection robot under GPS failure environment | |
| CN110009681A (en) | A monocular visual odometry pose processing method based on IMU assistance | |
| CN109029257A (en) | Based on stereoscopic vision and the large-scale workpiece pose measurement system of structure light vision, method | |
| Tanaka et al. | Avisual marker for precise pose estimation based on lenticular lenses | |
| CN106679648A (en) | Vision-inertia integrated SLAM (Simultaneous Localization and Mapping) method based on genetic algorithm | |
| US7558689B2 (en) | Information processing method and system | |
| CN107063246A (en) | A Loose Combination Navigation Method of Visual Navigation/Inertial Navigation | |
| CN107314778A (en) | A kind of scaling method of relative attitude, apparatus and system | |
| CN105659107B (en) | Method and ultrasonic device for determining the pose of an object | |
| JP6145072B2 (en) | Sensor module position acquisition method and apparatus, and motion measurement method and apparatus | |
| JP2017119102A (en) | Kinematic analysis device, method and program | |
| CN110030979B (en) | A method for measuring relative pose of non-cooperative targets in space based on sequence images | |
| CN114485613A (en) | Multi-information fusion underwater robot positioning method | |
| CN104166995B (en) | Harris-SIFT binocular vision positioning method based on horse pace measurement | |
| CN115120967B (en) | Target positioning method, device, storage medium and terminal | |
| CN111307114B (en) | Measurement method of horizontal attitude of surface ship based on motion reference unit | |
| CN119164328B (en) | Vision-based arch bridge tower perpendicularity detection system | |
| CN112556681A (en) | Visual-based orchard machine navigation positioning method | |
| CN106225775A (en) | Agricultural equipment roll angle acquisition methods based on field image Feature Points Matching |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20161214 |