Computer analysis-based automatic measurement method and system for crop harvesting area in farmland
By calculating the gradient and slope of farmland point cloud data, the system automatically marks field ridges and farmland points, cuts farmland into strips and distinguishes their types, solves the error problem in measuring farmland area in hilly areas, and achieves efficient and accurate three-dimensional area reconstruction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-16
- Publication Date
- 2026-03-27
AI Technical Summary
Existing methods for measuring farmland area have significant slopes and undulations in hilly and terraced areas, resulting in a non-negligible deviation between the planar projected area and the actual three-dimensional cultivated surface area, making it difficult to accurately reflect the true area of the actual land surface.
By extracting the spatial coordinates of point cloud data of farmland areas, calculating the gradient and slope of each point, marking field ridge points and farmland points according to a set threshold, cutting the farmland area into multiple long strips, calculating the field ridge ratio coefficient, distinguishing between non-extendable and extendable strips, and calculating the area of each strip.
It enables accurate measurement of the harvested area of farmland crops, overcomes the errors of traditional methods, and provides harvested area data that matches the actual land surface morphology, providing an accurate basis for yield estimation and policy subsidies.
Smart Images

Figure CN121527166B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of crop harvesting area measurement, and particularly relates to a computer analysis-based automatic measurement method and system for crop harvesting area in farmland. BACKGROUND
[0002] With the development of remote sensing and geographic information systems, the method of vectorizing a land plot on a two-dimensional plane and then calculating the area by using satellite images or aerial images has become popular. The existing farmland area measurement methods, whether traditional GPS trajectory recording or the popular two-dimensional vectorization estimation based on satellite / aerial images, have a major deficiency that the calculation result is only the horizontal projection area of the land plot. This method assumes that the ground surface is approximately flat. In complex hilly areas, terrace areas or farmland with dense ridges, the ground surface has significant slopes and undulations, and there will be a non-negligible deviation between the planar projection area and the actual three-dimensional surface area of the cultivated land, resulting in a serious underestimation of the harvesting area and making it difficult to accurately reflect the true area of the actual ground surface. Therefore, the computer analysis-based automatic measurement method and system for crop harvesting area in farmland are proposed. SUMMARY
[0003] The purpose of the present application is to provide a computer analysis-based automatic measurement method and system for crop harvesting area in farmland to solve the problems mentioned in the background.
[0004] The computer analysis-based automatic measurement method for crop harvesting area in farmland comprises the following steps:
[0005] Step 1: Extract the spatial coordinates Pi (Xi, Yi, Zi) of each point in the point cloud data of the farmland area, where i represents different points in the point cloud.
[0006] Step 2: Calculate the gradient of each point in the X and Y directions according to the spatial coordinates of each point.
[0007] Step 3: Calculate the slope of each point in the farmland area according to the gradient of each point in the X and Y directions.
[0008] Step 4: According to the slope of each point in the farmland area, mark the ridge points and farmland points in the farmland area according to the set threshold value.
[0009] Step 5: Cut the farmland area into multiple long strips, analyze the number of ridge points and farmland points contained in each long strip, obtain the ridge ratio coefficient of each strip, and mark the non-stretchable strips and stretchable strips in each strip according to the ridge ratio coefficient.
[0010] Step 6: Calculate the single harvesting area corresponding to the non-stretchable strips and stretchable strips, respectively, and finally accumulate the total harvesting area.
[0011] As a further scheme of the present application: the specific way of calculating the gradient of each point in X and Y directions is:
[0012] The spatial coordinates P0=(X0, Y0, Z0) and P1=(X1, Y1, Z1) of a single point and its adjacent points are obtained by: And The gradients GX1 and GY1 of the single point in X and Y directions are calculated, and the rest of the points are analyzed in the same way to obtain the gradients GXi and GYi of each point in X and Y directions.
[0013] As a further scheme of the present application: the specific way of obtaining the adjacent points of a single point is:
[0014] The distances between the single point and its surrounding points are obtained, and the point with the smallest distance is selected as the adjacent point of the single point. If there are multiple points with the smallest distance, a point is randomly selected as the adjacent point of the single point.
[0015] As a further scheme of the present application: the specific way of obtaining the slope of each point in the farmland area is:
[0016] The slope Di of each point is calculated by:
[0017] As a further scheme of the present application: the specific way of marking the ridge points and farmland points in the farmland area according to the set threshold value is:
[0018] The points with a slope greater than the set threshold value are marked as ridge points, and the points with a slope less than or equal to the set threshold value are marked as farmland points. The value range of the set threshold value is 8 degrees to 15 degrees.
[0019] As a further scheme of the present application: the specific way of marking the non-stretchable strips and stretchable strips in each strip according to the ridge proportion coefficient is:
[0020] The number of points marked as ridge points and the number of points marked as farmland points in each long strip are counted, and the ratio between the number of ridge points and the total number of ridge points and farmland points in each long strip is taken as the ridge proportion coefficient of each long strip. If the ridge proportion coefficient is less than a set threshold value Y1, the long strip is marked as a non-stretchable strip, and if the ridge proportion coefficient is greater than or equal to the set threshold value Y1, the long strip is marked as a stretchable strip. The set threshold value Y1 is 0.2.
[0021] As a further scheme of the present application: the specific way of calculating the single harvesting area corresponding to the non-stretchable strips and stretchable strips is:
[0022] For the strip marked as the non-stretchable strip, the projection grid area of the farmland region point cloud is obtained as ΔS, and the grid occupancy number of the farmland points in the non-stretchable strip is also obtained, and the product between the grid occupancy number in the same non-stretchable strip and the projection grid area of the farmland region ΔS is taken as the single strip harvesting area corresponding to the non-stretchable strip; for the strip marked as the stretchable strip, the slope value Dk of each farmland point in the non-stretchable strip is converted into the radian θk through Dk× (π / 180), that is, through The actual surface area of each farmland point is accumulated, and then the single strip harvesting area of the non-stretchable strip is obtained, wherein M is the total number of farmland points in the strip, k is different farmland points in the stretchable strip, and θk is the radian of the slope value of different farmland points in the stretchable strip.
[0023] As a further scheme of the present application: the specific way of obtaining the projection grid area ΔS of the farmland region point cloud is as follows:
[0024] After projecting the point cloud onto the X-Y plane, the farmland region is divided into a plurality of same-size grids, the edge length A of a single grid is obtained, and then the area of the single grid is taken as the projection grid area ΔS of the farmland region. 2
[0025] As a further scheme of the present application: the specific way of obtaining the grid occupancy number of the farmland points in the non-stretchable strip is as follows:
[0026] The positions of all farmland points in the non-stretchable strip in all grids of the farmland region are obtained, the grids with farmland points are marked as occupied grids, when a farmland point is on the dividing line of two grids, the two grids corresponding to the dividing line are both marked as occupied grids, the number of all occupied grids is obtained and taken as the grid occupancy number.
[0027] The automatic measurement system for the farmland crop harvesting area based on computer analysis comprises:
[0028] A spatial coordinate extraction module is configured to extract the spatial coordinates Pi (Xi, Yi, Zi) of each point in the farmland region point cloud data, wherein i represents different points in the point cloud.
[0029] A direction gradient acquisition module is configured to calculate the gradients of each point in the X and Y directions according to the spatial coordinates of each point.
[0030] A slope acquisition module is configured to calculate the slopes of each point in the farmland region according to the gradients of each point in the X and Y directions.
[0031] A ridge point and farmland point marking module is configured to mark the ridge points and farmland points in the farmland region according to the slopes of each point in the farmland region and according to a set threshold.
[0032] The non-stretchable strip and stretchable strip marking module cuts the farmland area into a plurality of long strips, analyzes the number of ridge points and farmland points contained in each long strip, obtains the ridge ratio coefficient of each strip, and marks the non-stretchable strip and stretchable strip in each strip according to the ridge ratio coefficient.
[0033] The total harvest area acquisition module calculates the single strip harvest area corresponding to the non-stretchable strip and the stretchable strip respectively, and finally accumulates to obtain the total harvest area.
[0034] Compared with the prior art, the beneficial effects of the present application are:
[0035] (1) In the present application, points with a slope greater than a threshold value are marked as ridge points, and points with a slope less than or equal to a threshold value are marked as farmland points, solving the problem that the traditional measurement cannot effectively distinguish between ridges and cultivated areas.
[0036] (2) In the present application, a plurality of narrow long strips are divided along the normal direction of the skeleton line, the number of ridge points and the number of farmland points in each strip are counted to calculate the ridge ratio coefficient, and the strip is automatically classified according to the coefficient to determine whether the strip is a stretchable strip or a non-stretchable strip, so that the flat area does not need complex three-dimensional calculation and can directly use the projected area, greatly improving the overall calculation efficiency.
[0037] (3) In the present application, for the non-stretchable strip and the stretchable strip, the former directly calculates the area by multiplying the number of farmland points by the uniform projection grid area; the latter projects the area of each farmland point, divides it by the cosine of the slope angle radian, and accumulates, to realize the restoration of the three-dimensional surface area, and finally sum up the areas of all strips to obtain the total harvest area of crops, so that the final result is the harvest area that matches the real ground shape, providing a more accurate area basis for yield estimation, operation cost accounting and policy subsidies. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a schematic diagram of the method framework structure of the present application;
[0039] Figure 2 is a schematic diagram of the system framework structure of the present application. DETAILED DESCRIPTION
[0040] The technical solutions of the present application will be described below in conjunction with the embodiments, obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0041] Example 1: Please refer to Figure 1The application provides a computer analysis-based automatic measurement method for crop harvesting area in farmland, comprising the following steps:
[0042] Step one: three-dimensional point cloud data of the farmland area is obtained by using a UAV or a laser radar technology, the collected point cloud data is unified in coordinates, and finally a pile of points is obtained, ensuring that the point cloud data is in the same reference coordinate system, each point cloud data contains its position in X, Y and Z coordinates, the spatial coordinates Pi (Xi, Yi, Zi) of each point are extracted from the obtained point cloud data, and i represents different points in the point cloud;
[0043] The photogrammetry equipment or the laser radar system carried by the UAV is used to perform high-density data collection above the farmland, and three-dimensional point cloud data containing X, Y and Z coordinates is obtained. Then, through geographic registration and coordinate conversion technology, all point cloud data is unified to the same reference coordinate system, providing a high-precision three-dimensional geometric basis for subsequent accurate calculation, overcoming the limitation of two-dimensional image data which only provides plane information, and providing reliable source data with elevation information for subsequent slope analysis and three-dimensional area restoration. All measurement data are aligned with each other in space, eliminating the coordinate errors caused by measurement equipment or time difference.
[0044] Step two: according to the spatial coordinates Pi (Xi, Yi, Zi) of each point, the gradient of each point in the X and Y directions is calculated by the point cloud difference algorithm, that is, the local slope of each point in the X and Y directions, and the specific method is as follows:
[0045] For a single point P0=(X0,Y0,Z0), the distances between it and its surrounding points are obtained, the point with the smallest distance is selected as the adjacent point of this point, if there are multiple points with the smallest distance, a point is randomly selected as the adjacent point of this point, for the spatial coordinates of the single point P0=(X0,Y0,Z0) and the corresponding adjacent point P1=(X1,Y1,Z1), the gradient GX1 and GY1 of the single point in the X and Y directions are calculated by and ; the same method is used to analyze the remaining points, and then the gradients GXi and GYi of each point in the X and Y directions are obtained, which reflect the change rate of the adjacent points in the three directions, and i represents different points;
[0046] For example, assuming that the X, Y and Z coordinates of a point in the obtained point cloud data are P0=(2,3,5), and the adjacent point is P1=(3,4,6), then the gradient in the X direction is GX1=6−5 / 3-2=1, and the gradient in the Y direction is GY1=6−5 / 4-3=1;
[0047] The point cloud difference algorithm is adopted to analyze the change rate of the target point P0 and its nearest neighbor point P1 in the horizontal and vertical directions. Specifically, the local slope in the X direction and the local slope in the Y direction, i.e., the ratio of the elevation change ΔZ to the horizontal displacement ΔX or ΔY, are calculated. These gradients reflect the degree of inclination of the ground surface in different directions, achieving mathematical quantification of the slight undulations of the farmland surface and providing basic data for distinguishing between flat cultivated areas and steep field ridges. High calculation efficiency: Compared with the complex algorithm of fitting the entire plane, the differential calculation principle based on neighborhood points is simple and fast.
[0048] Step three: According to the gradients GXi and GYi of each point in the X and Y directions, the slope of each point is calculated by the gradients in the X and Y directions, and then the slope of each point in the farmland area is obtained. The specific method is:
[0049] First, the vector composition of the X direction gradient and the Y direction gradient GXi and GYi of each point is performed using the Pythagorean theorem, and then the maximum change rate tan(θi) of each point is obtained. Subsequently, it is converted into an angle value, and then the slope of each point in the farmland area is obtained;
[0050] That is, the slope Di of each point is calculated by ; wherein, represents the total gradient modulus after composition, and (180 / π) is used to convert radians to degrees;
[0051] For example, the gradient of the point in the X direction is GX1=1, and the gradient in the Y direction is GY1=1. The slope of this point is arctan × (180 / π) = arctan(1.414) × 57.3 ≈ 54.7 degrees;
[0052] The X direction gradient and the Y direction gradient obtained in step two are vector composed using the Pythagorean theorem, and the modulus of the combined gradient is obtained. Subsequently, the modulus is converted into a slope angle Di in degrees using the arctan function, and the slope angle value in the maximum inclination direction of the ground surface is obtained. This is a key input parameter for three-dimensional surface area restoration, ensuring that the area calculation is based on the actual terrain inclination. Standardize the terrain features: Convert complex gradient data into angle values that are easy to understand and set thresholds.
[0053] Step four: According to the slope of each point in the farmland area, the field ridge points and farmland points in the farmland area are marked according to the set threshold value;
[0054] Points with a slope greater than the set threshold value are marked as field ridge points, and points with a slope less than or equal to the set threshold value are marked as farmland points. The set threshold value is determined according to actual needs, and the value range is 8 degrees to 15 degrees;
[0055] For example, if the threshold value is set to 15 degrees, the point with a slope of 45 degrees is marked as a ridge point, and the point with a slope of 8 degrees is marked as a farmland point;
[0056] The slope threshold value is set according to experience, and the slope of each point obtained in step three is judged. The points with a slope greater than the threshold value are marked as ridge points, and the points with a slope less than or equal to the threshold value are marked as farmland points, solving the problem of being unable to effectively distinguish between ridges and cultivated areas in traditional measurement, excluding non-harvest areas from the total area, greatly improving the effectiveness and accuracy of the harvest area. Automatic processing: avoids the tediousness and subjectivity of manual identification and delineation of ridge boundaries.
[0057] Step five: obtaining the center skeleton line of the farmland area, extending to both sides of the center skeleton line by a certain width, cutting the farmland area into multiple narrow strips, analyzing the number of ridge points and farmland points contained in each strip, obtaining the ridge ratio coefficient of each strip, and marking the non-stretchable strips and stretchable strips in each strip according to the ridge ratio coefficient;
[0058] The center skeleton line of the farmland area in the X-Y plane projection is extracted using a morphological thinning algorithm, and a vertical line is drawn along the normal direction of the skeleton line with a preset width L. The farmland area is cut into N long strips. The specific value of the preset width L is determined by relevant personnel according to actual needs. Here, the preset width L = 0.5 meters;
[0059] The specific way to extract the center skeleton line of the farmland area in the X-Y plane projection using the morphological thinning algorithm is as follows:
[0060] First, project the three-dimensional point cloud data of the farmland area onto the X-Y plane, then rasterize and identify the farmland area boundary to form a two-dimensional polygon or rasterized binary image, with the inside of the farmland being 1 and the outside being 0. Apply morphological thinning operation to gradually delete boundary points until no more points can be deleted. The remaining center skeleton line of the farmland area is obtained. The skeleton line is a set of points with equal distances from the boundaries of the farmland. Then, the strips are divided along the normal direction of the skeleton line;
[0061] Obtain the ratio between the number of ridge points in a single long strip and the sum of the number of ridge points and farmland points in the long strip, and use this ratio as the ridge ratio coefficient of the corresponding long strip. Long strips with a ridge ratio coefficient less than a set threshold value Y1 are marked as non-stretchable strips, and vice versa. Here, the set threshold value Y1 = 0.2;
[0062] Statistical analysis of the number of ridge points and the number of farmland points in each long strip, and calculation of the ridge ratio coefficient of each long strip by the number of ridge points / the number of ridge points + the number of farmland points;
[0063] If the ridge-occupied ratio coefficient is less than the set threshold Y1, it means that the strip terrain is relatively flat or there are few ridges, and it is marked as an inextensible strip, meaning that the error calculated by the plane projection is minimal; if the ridge-occupied ratio coefficient is greater than or equal to the set threshold Y1, it means that the strip contains more ridges or the terrain is more undulating, and it is marked as an extensible strip, meaning that three-dimensional surface area restoration calculation is needed;
[0064] For example, assume that there are 25 ridge points and 75 farmland points in a certain long strip, and the ridge-occupied ratio coefficient of the strip is 25 / (25+75)=0.25, and the set threshold Y1=0.2, because 0.25 is greater than 0.2, the long strip is marked as an extensible strip;
[0065] The morphological thinning algorithm is used to extract the center skeleton line of the farmland area. Then, a plurality of narrow and long strips are divided along the normal direction of the skeleton line. Next, the number of ridge points and the number of farmland points in each strip are counted to calculate the ridge-occupied ratio coefficient. Finally, whether the strip is an extensible strip or an inextensible strip is determined according to the coefficient, and the ridge-occupied ratio is introduced as a judgment basis to realize the adaptability of the calculation. For flat strips, the simple projection area calculation is directly used, which significantly improves the overall calculation efficiency. The skeleton line division method ensures that the strip can follow the natural direction of the farmland plot to the greatest extent, and the strip is automatically classified, so that the flat area does not need complex three-dimensional calculation and can directly use the projection area, greatly improving the overall calculation efficiency.
[0066] Step six: the single strip harvest area corresponding to the inextensible strip and the extensible strip is calculated, and finally the total harvest area is accumulated;
[0067] The specific way of calculating the single strip harvest area of the inextensible strip is as follows:
[0068] For the strip marked as an inextensible strip, it is considered to be flat, and the projection area calculation is directly used. First, the projection grid area △S of the farmland area point cloud is obtained, and the grid occupancy number of the farmland points in the inextensible strip is obtained. The product of the grid occupancy number in the same inextensible strip and the projection grid area △S of the farmland area is taken as the single strip harvest area corresponding to the inextensible strip;
[0069] The specific way of obtaining the projection grid area △S of the farmland area is as follows:
[0070] After projecting the point cloud onto the X-Y plane, the farmland area needs to be regularly rasterized, and the farmland area is divided into a plurality of same-size grids. The side length A of a single grid is obtained, and the area of a single grid is A 2 , which is taken as the projection grid area △S of the farmland area;
[0071] The method for obtaining the grid occupancy number of the farmland points in the non-stretchable strip is as follows:
[0072] The positions of all the farmland points in the non-stretchable strip in all the grids of the farmland area are obtained, the grids with the farmland points are marked as occupied grids, when the farmland points are on the dividing line of two grids, the two grids corresponding to the dividing line are both marked as occupied grids, the number of all the occupied grids is obtained and taken as the grid occupancy number;
[0073] For example, when a strip is marked as a non-stretchable strip and has 100 farmland points inside, the harvesting area of the non-stretchable strip = 100 x 0.1 = 10 square meters;
[0074] The specific method for calculating the single-strip area of the stretchable strip is as follows:
[0075] For the strip marked as a stretchable strip, the actual area of each farmland point in the stretchable strip needs to be restored according to the slope calculated in step three and the projected grid area ΔS, and the principle of calculus is used. First, the slope value Dk of each farmland point obtained in step three is converted into radian θk, and the projected area of each farmland point is divided by the cosine value of its radian to obtain the actual surface area of each farmland point:
[0076] The specific method for restoring the actual area of each farmland point in the stretchable strip is as follows:
[0077] The slope value Dk of each farmland point in the non-stretchable strip is converted into radian θk by Dk x (π / 180):
[0078] That is, by: The actual surface areas of each farmland point are added up to obtain the single-strip harvesting area of the non-stretchable strip, wherein M is the total number of farmland points in the strip, k is different farmland points in the stretchable strip, and θk is the radian of the slope value of different farmland points in the stretchable strip;
[0079] For example, when a strip is marked as a stretchable strip and has 1 farmland point inside, the slope calculated in step three is 60 degrees, and the actual harvesting area of the farmland point = 0.1 / cos(π / 3) = 0.1 / 0.5 = 0.2 square meters through 60 x (π / 180) = π / 3 (radian);
[0080] All the single-strip areas of the non-stretchable strips and the stretchable strips are added up to obtain the total harvesting area of the farmland crops;
[0081] For non-stretchable strips: a simplified projection area calculation is adopted, i.e. the number of farmland points × the projection grid area ΔS; for stretchable strips: the projection area ΔS of each farmland point is divided by the cosine value cos(θk) of its slope angle θk to obtain the actual surface area Sk, and then all Sk are accumulated, overcoming the error of traditional two-dimensional measurement, especially in complex terrain, ensuring the authenticity and reliability of the harvested area data. Provide final decision data: accumulate the area of all strips, output the final total harvested area of farmland crops, directly serving operation planning and subsidy accounting.
[0082] Three-dimensional point cloud data of farmland is obtained by using a UAV or a laser radar, and the spatial coordinates of each point are extracted in a unified coordinate system; then the local gradient of each point in the X and Y directions is calculated by point cloud difference and synthesized into a slope angle, realizing quantitative description of the micro-terrain undulation of the farmland. According to the slope threshold, the point cloud is automatically divided into ridge points and farmland points; then the point cloud is projected onto the X-Y plane, and the farmland center skeleton line is extracted by gridding and morphological thinning algorithm, and the farmland is divided into multiple narrow and long strips along the normal direction of the skeleton line. The proportion of ridge points in each strip is counted to distinguish non-stretchable strips and stretchable strips: the former is directly calculated by multiplying the number of farmland points by the unified projection grid area; the latter is calculated by dividing the projection area of each farmland point by the cosine of the slope angle and accumulating, realizing three-dimensional surface area restoration, and finally summing up the area of all strips to obtain the total harvested area of crops;
[0083] The spatial information and point-level slope characteristics of three-dimensional point cloud are fully utilized to overcome the problem that traditional manual measurement, GPS trajectory and two-dimensional remote sensing method can only obtain horizontal projection area, and systematically underestimate the actual surface area in slope and ridge dense areas, making the harvested area estimation closer to the real cultivated area, providing a more fair and accurate basis for yield assessment and subsidy accounting; the strips are divided by the skeleton line, and the non-stretchable strips and stretchable strips are screened by the ridge proportion, and only the stretchable strips with obvious undulation are subjected to three-dimensional area restoration, and the area of the non-stretchable flat area is calculated, which ensures the overall precision is improved significantly, and finally the harvested area matched with the real ground form is obtained, providing a more fair and accurate area basis for yield estimation, operation cost accounting and policy subsidy.
[0084] Embodiment two: please refer to Figure 2 The embodiment also provides an automatic farmland crop harvested area measurement system based on computer analysis, which implements the automatic farmland crop harvested area measurement method based on computer analysis disclosed in the foregoing embodiment, and specifically comprises:
[0085] A spatial coordinate extraction module extracts the spatial coordinates Pi(Xi, Yi, Zi) of each point in the point cloud data of the farmland area, and i represents different points in the point cloud.
[0086] The point cloud data obtained by the photogrammetry equipment or the laser radar system carried by the unmanned aerial vehicle provides geometric information of the three-dimensional space. The point cloud data of the farmland area is obtained by the unmanned aerial vehicle or the laser radar technology. The coordinate systems of the point cloud data are unified to ensure that all the point cloud data are unified to the same reference coordinate system. The spatial coordinates of each point are extracted for subsequent analysis.
[0087] The direction gradient obtaining module calculates the gradient of each point in the X and Y directions according to the spatial coordinates of each point, and reflects the slope change of each point in the horizontal direction. The elevation change rate between adjacent points is calculated by a difference algorithm, and the gradient value of each point is output to provide data support for subsequent slope calculation.
[0088] The slope obtaining module calculates the slope of each point in the farmland area according to the gradient of each point in the X and Y directions, calculates the slope of each point, and converts it into an angle value for use in distinguishing terrain features.
[0089] The Pythagorean theorem is used to synthesize the X and Y direction gradients of each point into a total gradient, and the arctan function is used to calculate the slope to output the slope value of each point for subsequent ridge point and farmland point marking.
[0090] The ridge point and farmland point marking module marks the ridge points and farmland points in the farmland area according to the slope of each point in the farmland area and according to a set threshold value.
[0091] The slope threshold value range is set, and each point is classified according to the slope. The points with a slope greater than the set threshold value are marked as ridge points, and the points with a slope less than or equal to the set threshold value are marked as farmland points.
[0092] The non-stretchable strip and stretchable strip marking module cuts the farmland area into multiple long strips, analyzes the number of ridge points and farmland points contained in each long strip, obtains the ridge ratio coefficient of each strip, and marks the non-stretchable strip and stretchable strip in each strip according to the ridge ratio coefficient.
[0093] The morphological thinning algorithm is used to extract the center skeleton line of the farmland area, and multiple narrow and long strips are divided along the normal direction of the center skeleton line. The ridge point ratio coefficient in each strip is calculated. If the ridge point ratio coefficient is less than a set threshold value, the strip is marked as a non-stretchable strip; if the ridge point ratio coefficient is greater than or equal to the set threshold value, the strip is marked as a stretchable strip.
[0094] The total harvest area acquisition module calculates the single harvest area corresponding to the non-stretchable strip and the stretchable strip respectively, and finally accumulates to obtain the total harvest area. For the non-stretchable strip, the projected area is directly used for calculation. For the stretchable strip, the actual surface area is restored by using the slope. The actual area is obtained by dividing the projected area of each farmland point by the cosine value of its slope angle. The areas of all strips are accumulated, and the total harvest area is output.
[0095] Embodiment three: as an embodiment three of the present application, in the specific implementation, compared with embodiment one and embodiment two, the technical scheme of the embodiment is to combine the schemes of the above-mentioned embodiment one and embodiment two.
[0096] The above formulas are all dimensionless numerical calculations. The formula is obtained by collecting a large amount of data to simulate the most recent real situation. The preset parameters and threshold values in the formula are set by a person skilled in the art according to the actual situation.
[0097] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for automatically measuring a crop harvesting area in a farmland based on computer analysis, characterized by, The method comprises the following steps: Step 1: Extract the spatial coordinates Pi (Xi, Yi, Zi) of each point in the point cloud data of the farmland area, and i represents different points in the point cloud; Step 2: Calculate the gradient of each point in the X and Y directions according to the spatial coordinates of each point, and the specific method is as follows: The spatial coordinates of a single point and its adjacent points P0=(X0, Y0, Z0) and P1=(X1, Y1, Z1) are obtained by and ; Calculate the gradient GX1 and GY1 of the single point in the X and Y directions, and analyze the remaining points in the same way to obtain the gradient GXi and GYi of each point in the X and Y directions; Step 3: Calculate the slope of each point in the farmland area according to the gradient of each point in the X and Y directions; Step 4: According to the slope of each point in the farmland area, mark the ridge points and farmland points in the farmland area according to the set threshold value; Step 5: Cut the farmland area into multiple long strips, analyze the number of ridge points and farmland points contained in each long strip, obtain the ridge ratio coefficient of each strip, and mark the non-stretchable strip and the stretchable strip in each strip according to the ridge ratio coefficient; Step 6: Calculate the single strip harvesting area corresponding to the non-stretchable strip and the stretchable strip respectively, and finally accumulate the total harvesting area; the specific method for calculating the single strip harvesting area corresponding to the non-stretchable strip and the stretchable strip is as follows: For the strips marked as non-stretchable strips, the projection grid area ΔS of the farmland region point cloud is obtained, and the grid occupancy number of the farmland points in the non-stretchable strips is also obtained. The product of the grid occupancy number and the projection grid area ΔS of the farmland region of the same non-stretchable strip is taken as the single strip harvest area corresponding to the non-stretchable strip. For the strips marked as stretchable strips, the slope value Dk of each farmland point in the non-stretchable strip is converted into radian θk through Dk× (π / 180). The actual surface area of each farmland point is accumulated, and then the single strip harvest area of the non-stretchable strip is obtained, wherein M is the total number of farmland points in the strip, k is different farmland points in the stretchable strip, and θk is the radian of the slope value of different farmland points in the stretchable strip. The actual surface area of each farmland point is accumulated, and then the single strip harvest area of the non-stretchable strip is obtained, wherein M is the total number of farmland points in the strip, k is different farmland points in the stretchable strip, and θk is the radian of the slope value of different farmland points in the stretchable strip. The specific method for obtaining the projection grid area ΔS of the point cloud of the farmland area is as follows: After projecting the point cloud to the X-Y plane, the farmland area is divided into a plurality of same-size grids, and the length A of a single grid is obtained, and then the area of the single grid is , which is further taken as the projection grid area ΔS of the farmland area.
2. The computer analysis based automatic measurement method of harvested crop area in a farmland according to claim 1, characterized by, The specific method for obtaining the adjacent points of a single point is as follows: For a single point, obtain the distance between the single point and each point around the single point, select the point with the smallest distance as the adjacent point of the single point, and if there are multiple points with the smallest distance, randomly select one point as the adjacent point of the single point.
3. The computer analysis based automatic measurement method of harvested crop area in a farmland according to claim 1, characterized by, The specific method for obtaining the slope of each point in the farmland area is as follows: The slope Di of each point is calculated by .
4. The computer analysis based automatic measurement method of harvested crop area in a farmland according to claim 3, characterized by, The specific method for marking the ridge points and farmland points in the farmland area according to the set threshold value is as follows: Mark the points with a slope greater than the set threshold value as ridge points, and mark the points with a slope less than or equal to the set threshold value as farmland points, and the value range of the set threshold value is 8 degrees-15 degrees.
5. The computer analysis based automatic measurement method of harvested crop area in a farmland according to claim 4, wherein, The specific method for marking the non-stretchable strip and the stretchable strip in each strip according to the ridge ratio coefficient is as follows: Statistically obtain the number of marked ridge points and the number of marked farmland points in each long strip, take the ratio between the number of ridge points and the total number of ridge points and farmland points in each long strip as the ridge ratio coefficient of each long strip, if the ridge ratio coefficient is less than the set threshold value Y1, mark it as a non-stretchable strip, if the ridge ratio coefficient is greater than or equal to the set threshold value Y1, mark it as a stretchable strip, and the set threshold value Y1=0.
2.
6. The computer analysis based automatic measurement method of harvested crop area in a farmland according to claim 1, wherein, The specific method for obtaining the grid occupation number of the farmland points in the non-stretchable strip is as follows: Obtain the position of all farmland points in all grids in the farmland area in the non-stretchable strip, mark the grid with a farmland point as an occupied grid, when a farmland point is on the dividing line of two grids, mark both grids corresponding to the dividing line as occupied grids, obtain the number of all occupied grids and take it as the grid occupation number.
7. An automatic computer analysis based farmland crop harvest area measuring system, which implements the automatic computer analysis based farmland crop harvest area measuring method according to any one of claims 1-6, characterized in that: a spatial coordinate extraction module that extracts the spatial coordinates Pi (Xi, Yi, Zi) of each point in the point cloud data of the farmland area, where i represents different points in the point cloud; a direction gradient acquisition module that calculates the gradient of each point in the X and Y directions according to the spatial coordinates of each point; a slope acquisition module that calculates the slope of each point in the farmland area according to the gradient of each point in the X and Y directions; a ridge point and farmland point marking module that marks the ridge points and farmland points in the farmland area according to the slope of each point in the farmland area and according to a set threshold value; an inextensible strip and extensible strip marking module that cuts the farmland area into multiple long strips, analyzes the number of ridge points and farmland points contained in each long strip, obtains the ridge ratio coefficient of each strip, and marks the inextensible strips and extensible strips in each strip according to the ridge ratio coefficient; a total harvest area acquisition module that calculates the single strip harvest area corresponding to the inextensible strips and extensible strips respectively, and finally accumulates to obtain the total harvest area.
8. The automatic computer analysis based farmland crop harvest area measuring system according to claim 7, characterized in that: the spatial coordinate extraction module extracts the spatial coordinates of each point in the point cloud data of the farmland area by using the point cloud data processing software; the direction gradient acquisition module calculates the gradient of each point in the X and Y directions by using the point cloud data processing software; the slope acquisition module calculates the slope of each point in the farmland area by using the point cloud data processing software; the ridge point and farmland point marking module marks the ridge points and farmland points in the farmland area by using the point cloud data processing software; the inextensible strip and extensible strip marking module marks the inextensible strips and extensible strips in each strip by using the point cloud data processing software; the total harvest area acquisition module calculates the single strip harvest area corresponding to the inextensible strips and extensible strips respectively by using the point cloud data processing software, and finally accumulates to obtain the total harvest area.
Citation Information
Patent Citations
Field ridge extraction method, terminal device and computer program product
CN118762194A
Land section data creation system
JP2008234163A