An extensible field boundary regularization simplification method, system, device and terminal
By combining the determination of a list of farmland categories, the use of labeled training of a segmentation model, and traditional digital image processing, a highly efficient simplification of farmland boundaries is achieved. This solves the problems of high labor costs in traditional methods and poor segmentation results in deep learning, and is suitable for farmland boundary representation in the field of remote sensing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANGTZE DELTA REGION INST OF UNIV OF ELECTRONICS SCI & TECH OF CHINE (HUZHOU)
- Filing Date
- 2022-11-22
- Publication Date
- 2026-04-10
AI Technical Summary
Traditional manual methods for delineating farmland boundaries are labor-intensive, and existing deep learning segmentation techniques are not effective for delineating regular farmland edges, and suffer from jagged boundaries and redundant points.
A scalable farmland boundary regularization and simplification method is adopted, which includes determining a list of farmland categories, using annotation to train a segmentation model to obtain a segmentation mask, performing binarization processing, extracting the contours of connected components through traditional digital image processing, and performing polygon approximation to remove redundant points.
It reduces labor costs, improves the accuracy of farmland boundary description, saves storage costs, is applicable to the approximation of forest areas and residential areas in the field of remote sensing, and reduces image representation costs.
Smart Images

Figure CN115719355B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of artificial intelligence and digital image processing, and particularly relates to an extensible farmland boundary regularization simplification method, system, device and terminal. BACKGROUND
[0002] At present, accurate division of farmland in an area and obtaining statistical information thereof have a great effect on local agricultural development. The traditional method uses a manual annotation method, which has the advantage of accurate annotation, but requires high labor cost. Although the existing deep learning segmentation technology can divide the general outline of the farmland, the division effect of the relatively regular farmland edge is often unsatisfactory.
[0003] With the continuous development of deep learning, the division accuracy of farmland is getting higher and higher, but there are characteristics of sawtooth of farmland edge and more redundant points. Since a large number of farmlands need to be represented, using fewer feature points to represent the outline of the farmland can save storage cost and facilitate further processing. Therefore, it is urgent to design a new extensible farmland boundary regularization simplification method.
[0004] Through the above analysis, the problems and defects of the prior art are:
[0005] (1) The traditional method of dividing the farmland boundary by manual annotation requires high labor cost.
[0006] (2) The existing deep learning segmentation technology has poor division effect on the relatively regular farmland edge. SUMMARY
[0007] In view of the problems existing in the prior art, the present application provides an extensible farmland boundary regularization simplification method, system, device and terminal.
[0008] The present application is implemented as follows: an extensible farmland boundary regularization simplification method, which comprises the following steps: determining a farmland class list to be divided; using an existing annotation to train a segmentation model to obtain a segmentation mask corresponding to the class list of all farmlands; performing binaryzation processing on the segmentation mask to obtain a binaryzation image; performing digital image processing on the binaryzation image to extract the outline of each connected domain; using the outline information obtained by image processing to perform polygon approximation and remove redundant points to obtain farmland boundary representation.
[0009] Further, the extensible farmland boundary regularization simplification method comprises the following steps:
[0010] Step 1: determining a farmland class list to be divided and a segmentation mask;
[0011] Step two, traditional digital image processing operation is performed on the binary image;
[0012] Step three, polygon approximation is performed on the extracted contour, and redundant points are removed.
[0013] Further, in step one, after determining the list of farmland categories to be segmented, a segmentation model is obtained using existing partial annotation training; the segmentation result of the farmland is obtained by the segmentation model, represented by a mask mask; the pixel value of the mask represents the index value of the class name in the class list, the index value starts from 1, and the 0 pixel represents the background, and the 255 pixel represents other classes for subsequent expansion.
[0014] Further, in step one, the processing of the single-class farmland category list includes:
[0015] (1) extracting the pixel information of the selected class from the mask;
[0016] (2) shielding the pixels not belonging to the selected class as background processing, marked as 0; marking the pixel value of the specified class as 1, and converting the image into a binary graph form.
[0017] Further, the traditional digital image processing operation on the binary image in step two includes:
[0018] (1) using the closing operation of the image to process the binary image, eliminating small holes in the image; filling the holes in the adjacent objects to form a connected domain;
[0019] (2) performing connected domain processing on the processed image, using the seed filling method in computer graphics to process the image, using 8-connected condition for connected domain analysis, obtaining a set of connected domains marked with different pixel values, and the center point coordinates and area size of each connected domain; traverse the set and remove the regions with an area size less than 100 pixels;
[0020] (3) judging each connected domain, extracting the contour of each connected domain using the contour extraction algorithm; obtaining the boundary point set on the contour; obtaining the number of boundary points, if the number of boundary points is less than 5, marking the region.
[0021] Further, the polygon approximation and removal of redundant points of the extracted contour in step three include:
[0022] (1) for each boundary point of the connected domain that meets the condition, calculate the distance from the center point of the connected domain, and take P0 as the point with the maximum distance from the center point O; continue to traverse the boundary points of the connected domain contour, and obtain the point P1 with the maximum distance from the point P0, so that the points P0P1 divide the connected domain into A and B sub-regions;
[0023] (2) Statistics of the number of boundary points N on the outline of A, B region A ,N B Take m = min(N A ,N B ) / 10 as the number of elements in a group;
[0024] (3) Sort the boundary points of the outline of A / B region according to the size of the vertical coordinate, take m points as a group, and directly connect the beginning and end if there are less than m points; take the midpoint coordinate C of each group, and take the larger one as the midpoint coordinate if there are more than one; mark the beginning and end coordinates as Ps and Pe, connect APs, APe, and mark as h d1 ,h d2 ; take the maximum radial distance h max = max(h d1 ,h d2 ) of each group, and draw a perpendicular line from C to PsPe; calculate the vertical distance v d for all groups in A, B region, and calculate the mean mean(d A ), mean(d B ), standard deviation std(d A ), and stda(d B ) in A, B region respectively; take c(A) = mean(d A )+std(d A )*ε, c(B) = mean(d B )+std(d B )*ε, where ε is a parameter with a value range of [1, 8], and C max = max(c(A), c(B)); for each group of points, calculate v = max(h d1 ,h d2 ), and calculate the mean v mean in the entire point set to determine the threshold Thr = v mean +Cmax*μ, where μ is between 0 and 1;
[0025] (4) For each point set of A, B, calculate the vertical distance and radial distance of the points. If the vertical distance is greater than the maximum vertical distance of A / B corresponding part or the radial distance is greater than Thr, the point is marked as 1, otherwise it is marked as 0;
[0026] (5) For the group points, if all the group points are marked as 1, recursively process the group points, take the midpoint of the group points as the boundary point, and go to step (4) for processing until the group points are marked as 0; if the group points are marked as 0, directly take the beginning and end points of the group points for simplification;
[0027] (6) The values of ε and μ are determined by the following method, using the following evaluation indicators: compression ratio, the ratio of the overlap of the areas before and after simplifying the polygon, and the offset distance between the center points, wherein the compression ratio refers to the ratio of the number of corner points of the simplified polygon to the boundary points of the original polygon contour; a reasonable range is taken as a basis for manual observation to determine the parameters, wherein ε is traversed with a step size of 0.5, and μ is traversed with a step size of 0.1.
[0028] Another object of the present application is to provide an extendable farmland boundary regularization and simplification system applying the extendable farmland boundary regularization and simplification method.
[0029] A farmland category list determination module is configured to determine a farmland category list to be segmented.
[0030] A farmland segmentation module is configured to use an existing labeled training segmentation model to obtain a segmentation mask of the farmland.
[0031] A binarization processing module is configured to perform binarization processing on the segmentation mask to obtain a binarized image.
[0032] A digital image processing module is configured to perform traditional digital image processing on the binarized image to extract the contours of each connected domain of the binarized image.
[0033] A farmland boundary representation module is configured to use the contour information obtained by the traditional image processing to perform polygon approximation and remove redundant points to obtain a farmland boundary representation.
[0034] Another object of the present application is to provide a computer device including a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to cause the processor to perform the steps of the extendable farmland boundary regularization and simplification method.
[0035] Another object of the present application is to provide a computer-readable storage medium storing a computer program, and the computer program is executed by the processor to cause the processor to perform the steps of the extendable farmland boundary regularization and simplification method.
[0036] Another object of the present application is to provide an information data processing terminal for implementing the extendable farmland boundary regularization and simplification system.
[0037] In combination with the above technical solutions and the technical problems solved, the technical solutions protected by the present application have the following advantages and positive effects:
[0038] First, in view of the technical problems existing in the prior art and the difficulty of solving the problems, the technical scheme of the present application and the results and data obtained during the research and development are closely combined to analyze in detail and depth how the technical scheme of the present application solves the technical problems and brings some creative technical effects after solving the problems.
[0039] The present application provides a method for extracting local farmland regular boundary, which uses the farmland segmentation result obtained by deep learning segmentation, uses traditional image processing method and adds polygon approximation algorithm to perform regularization processing on the result, and simplifies the contour points of the farmland, so as to obtain a better farmland boundary representation.
[0040] Secondly, from the perspective of the product as a whole, the technical scheme of the present application has the technical effects and advantages, which are described as follows:
[0041] The present application provides an extensible farmland boundary regularization and simplification method, which performs regularization processing on the segmented farmland by using some traditional image processing methods and a polygon approximation algorithm, and simplifies the contour points of the farmland, so as to obtain a better farmland boundary representation.
[0042] Thirdly, as the auxiliary evidence for the creativity of the claims of the present application, it is also reflected in the following important aspects:
[0043] 1) The expected income and commercial value of the technical scheme of the present application after transformation are:
[0044] The present application uses fewer points to represent irregular farmland, greatly reduces the representation cost of images containing more farmland, and greatly reduces the labor cost since only program design is required without additional manual operation.
[0045] 2) Whether the technical scheme of the present application solves the technical problems that people have been eager to solve but have failed to solve:
[0046] With the development of deep learning, the segmentation technology can label the approximate area of farmland, but the boundary point often encounters boundary sawtooth and discontinuity, and the traditional digital image processing and polygon approximation algorithm introduced here can better solve the above problems. The method can cooperate with the segmentation technology to better bring the farmland representation with high precision and small memory consumption. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to make the technical solutions of the embodiments of the present application clearer, the drawings needed in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0048] Figure 1 is a scalable farmland boundary regularization simplification method flow chart provided by the embodiments of the present application;
[0049] Figure 2 is a scalable farmland boundary regularization simplification method principle diagram provided by the embodiments of the present application;
[0050] Figure 3 is a traditional digital image processing step flow chart for processing the segmented mask provided by the embodiments of the present application;
[0051] Figure 4 is a schematic diagram for dividing the region provided by the embodiments of the present application;
[0052] Figure 5 is a schematic diagram of the radial distance and vertical distance of a single group of points provided by the embodiments of the present application;
[0053] Figure 6 is a flow chart for polygon approximation and redundant point simplification provided by the embodiments of the present application.
[0054] Figure 7 is a result display provided by the embodiments of the present application, wherein (a) represents a farmland mask schematic diagram obtained by segmentation; and (b) is a farmland regularization result after processing by the present example. DETAILED DESCRIPTION
[0055] In order to make the technical solutions, advantages and characteristics of the present application clearer, the present application will be further described in detail below with reference to the embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
[0056] In view of the problems existing in the prior art, the present application provides a scalable farmland boundary regularization simplification method, system, device and terminal, which will be described in detail below with reference to the drawings.
[0057] In order for those skilled in the art to have a full understanding of how the present application is specifically implemented, this part is an explanatory embodiment of the technical solution of the claims.
[0058] As Figure 1 shown, the extendable farmland boundary regularization simplification method provided by the embodiment of the present application includes the following steps:
[0059] S101, determine the farmland category list to be segmented;
[0060] S102, use the existing labeled training segmentation model to obtain the segmentation mask of all farmlands;
[0061] S103, perform binaryzation processing on the segmentation mask to obtain a binary image; perform traditional digital image processing on the binary image to extract the contour of each connected domain;
[0062] S104, use the contour information obtained by traditional image processing to perform polygon approximation and remove redundant points to obtain the farmland boundary representation.
[0063] As a preferred embodiment, as Figure 2 shown, the extendable farmland boundary regularization simplification method provided by the embodiment of the present application specifically includes the following steps:
[0064] 1. Determine the farmland category list to be segmented, use the existing partial labeled training to obtain a segmentation model with high precision, and obtain the segmentation result of the farmland through the above model, represented by a mask mask. The pixel value of the mask represents the index value of the class name in the class list, the index value starts from 1, 0 pixel represents the background, and 255 pixel represents other classes for subsequent expansion. The following takes a single-class farmland as an example for description, and the same processing can be performed on the entire category list.
[0065] 1.1 Extract the pixel information of the selected class from the mask.
[0066] 1.2 Mask the pixels that do not belong to the selected class as background processing, marked as 0, and mark the pixel value of the specified class as 1, and convert the image into a binary graph form.
[0067] 2. Perform the following traditional digital image processing operations on the above binary image.
[0068] 2.1 Use the closing operation of the image to process the binary image, eliminate small holes in the image, and connect two regions to form a connected domain.
[0069] 2.2 The processed image is subjected to connected domain processing, seed filling method commonly used in computer graphics is used to process the image, connected domain analysis is performed using 8-connected condition, a plurality of connected domain sets marked with different pixel values and center point coordinates of each connected domain and area size are obtained. The set is traversed, and the area with an area size less than 100 pixels is removed.
[0070] 2.3 Each connected domain is judged, and a contour extraction algorithm is used to extract the contour of each connected domain. A boundary point set on the contour is obtained. The number of boundary points is obtained, and if the number of boundary points is less than 5, the region is marked and does not need to be processed in the following.
[0071] Figure 2 It is shown that the scalable farmland boundary regularization simplification method needs to determine the segmented farmland class first, use the segmentation model to obtain the mask of the specified class list on the existing segmentation label, perform binaryzation processing on the mask, and perform image closing operation and connected domain analysis and other traditional digital image processing, and finally use the boundary output obtained by the above process to perform polygon approximation, and remove the redundant points of the boundary.
[0072] The traditional digital image processing provided by the embodiment of the application is shown in the process flowchart for processing the segmented mask. Figure 3
[0073] Figure 3 It is shown that the specific digital image processing steps are as follows: first, the binary image is processed using the closing operation of the image to eliminate small holes and complete the gap of adjacent regions, then connected domain analysis is performed, and the seed filling method is combined with the 8-connected judgment condition to obtain the related information (such as area, center point information, etc.) of each connected domain. After the above operation, a contour extraction algorithm is used to extract the contour of each connected domain, and a boundary point set on the contour is obtained. If the number of boundary points is less than 3, subsequent processing is not needed, otherwise, subsequent polygon approximation and redundant point simplification processing are needed.
[0074] 3. The following algorithm is used to perform polygon approximation on the extracted contour and remove redundant points.
[0075] 3.1 For each boundary point of the connected domain, the distance from the center point of the connected domain is calculated, and P0 is taken as the point with the maximum distance from the center point O. The point P1 with the maximum distance from P0 is obtained by continuing to traverse the boundary points of the connected domain contour. P0P1 divides the connected domain into A and B sub-regions.
[0076] 3.2 The number of boundary points on the contour of A and B regions is counted, and m = min(N A ,N B is taken. A ,NB ) is the number of elements in a group.
[0077] 3.3 Sort the contour boundary points of A, B region according to the size of the ordinate, take m points as a group, if the last group is less than m points, directly connect the head and tail, and do not process it. Take the midpoint coordinates C of each group (if there is more than one midpoint coordinate, take the larger one as the midpoint coordinate), and record the head and tail coordinates as Ps and Pe respectively. Connect CPs, CPe, and mark it as h d1 , d2 , take the maximum radial distance of each group h max = max(h d1 , h d2 ), and draw a perpendicular line from C to PsPe, and the foot is D. Calculate the vertical distance CD for all groups of points in A and B regions, and calculate the mean of the branch distance in A and B regions respectively mean(d A ), mean(d B ), standard deviation std(d A ), stda(d B ), take the vertical distance threshold of A and B part respectively c(A) = mean(d A )+std(d A )*ε, c(B) = mean(d B )+std(d B )*ε, where ε is a parameter, the value range is [1,8], which is determined by step 3.6. The final vertical threshold is C max = max(c(A), c(B)). For each point set, calculate the maximum radial distance v = max(h d1 , h d2 ), and calculate the mean v mean in the whole point set, and determine the subsequent radial distance threshold Thr = v mean +Cmax*μ, where μ is in the range of 0-1, which is determined by step 3.6.
[0078] 3.4 For each point in the A, B point set divided in 3.3, the following judgment is made. Calculate the vertical distance and radial distance of the point, if the vertical distance is greater than the maximum vertical distance threshold C max or the radial distance is greater than the radial threshold Thr, the point is marked as 1, otherwise it is marked as 0.
[0079] 3.5 For each group of points in A and B, if the group is marked as 1, the group is processed recursively, taking the midpoint of the group points as the limit point, and going to 3.4 for processing, until the group point is marked as 0; if the group is marked as 0, directly take the head and tail points of the group for simplification.
[0080] 3.6 The values of ε and μ in step 3.3 are determined by the following method, using the following evaluation indexes: compression ratio, the coincidence rate of the front and rear area of the simplified polygon, and the offset distance between the center points, wherein the compression ratio refers to the ratio of the number of corner points of the simplified polygon to the boundary points of the original polygon contour. The parameters are determined by taking a reasonable range and manual observation, wherein ε is traversed with a step of 0.5, and μ is traversed with a step of 0.1.
[0081] The schematic diagram for dividing the region provided by the embodiment of the present application is shown in Figure 4 The schematic diagram of the radial distance and vertical distance of a single group of points provided by the embodiment of the present application is shown in Figure 5 The flow chart for polygon approximation and simplification of redundant points provided by the embodiment of the present application is shown in Figure 6
[0082] The expandable farmland boundary regularization and simplification system provided by the embodiment of the present application comprises:
[0083] A farmland category list determination module is configured to determine a farmland category list to be segmented.
[0084] A farmland segmentation module is configured to use an existing labeled training segmentation model to obtain a farmland segmentation mask.
[0085] A binarization processing module is configured to perform binarization processing on the segmentation mask to obtain a binarized image.
[0086] A digital image processing module is configured to perform traditional digital image processing on the binarized image to extract the contour of each connected domain of the binarized image.
[0087] A farmland boundary representation module is configured to use the contour information obtained by the traditional image processing to perform polygon approximation and remove redundant points to obtain a farmland boundary representation.
[0088] Figure 6 The method for polygon approximation algorithm to approximate the boundary and simplify the redundant points of the boundary is shown. First, the boundary is approximated according to Figure 5 The schematic method divides the connected domain into A and B regions, counts the number of boundary points on the contour of A and B regions, takes the smaller value divided by 10 as the element number of a group, sorts the contour boundary points of A and B regions according to the size of the vertical coordinate, takes the element number calculated above as a group, if the last group is not enough, directly connects the head and tail, does not perform subsequent processing, takes the midpoint coordinate C of each group (if there is more than one midpoint coordinate, take the larger one as the midpoint coordinate), at the same time, the head and tail coordinates are recorded as Ps and Pe, connects CPs, CPe, takes the maximum radial distance of each group as the larger value of the two, at the same time, a vertical line is drawn from the point C to PsPe, and the foot of the vertical line is D. Calculate the vertical distance CD of all group points in A and B regions, calculate the mean and standard deviation of the branch distance in A and B regions respectively, and thus calculate the vertical distance threshold of A and B parts. For each group of points, calculate the maximum radial distance in the group, calculate the mean in the whole point set, and determine the radial distance threshold; then the following judgment is performed on each point in the divided A and B point set. Calculate the vertical distance and radial distance of the point, if the vertical distance is greater than the maximum vertical distance threshold or the radial distance is greater than the radial threshold, the point is marked as 1, otherwise it is marked as 0. For the group points, if the group point marks are all 1, the midpoint of the group points is taken as the limit point, and the threshold value is determined, until the group point mark is 0; if the group point mark is 0, the head and tail points of the group points are directly taken for simplification; finally, the following evaluation indexes are used to determine the model parameters: compression ratio, overlap ratio of area before and after simplifying the polygon, offset distance between center points, and actual visual effect.
[0089] Figure 4 The contour region division criterion is illustrated, the center point in the figure is O, the point P1 is the point farthest from the center point O in the boundary point set, P2 is the point farthest from the point P1 among the remaining boundary points, and P1P2 divides the region into two parts A and B.
[0090] Figure 5 The vertical distance and radial distance of a single group of points are illustrated, the initial point in the figure is Ps, the terminal point is Pe, Ps, Pk, Pk+1, … Pk+9, … Pe is a group of schematic points, wherein the vertical distance is vd, and the radial distance is h d1 and h d2 , the maximum radial distance is the larger value of h d1 , h d2 .
[0091] In order to prove the creativity and technical value of the technical scheme of the application, this part is an application embodiment of the technical scheme of the claim on a specific product or related technology.
[0092] Using deep learning technology and traditional digital image processing, in the case of reducing labor costs as much as possible, the core is to use partition to judge the local pattern, and the global contour information is combined, and the two are combined more reasonably. It can be widely used in shape simplification work, such as remote sensing field house, forest land approximation, for better statistics related information, or for extracting object corner point information through the design, finally, the design has strong applicability, and does not need more parameter adjustment process, and has the applicability of different data.
[0093] The embodiment of the application has achieved some positive effects in the research and development or use process, and indeed has great advantages compared with the prior art, which will be described below in combination with the data, graphs and the like of the test process.
[0094] In the design process, the balance between running speed and actual precision is fully considered, compared with the traditional method, the example has the great advantage that the data applicability is strong. Compared with the deep model, it has the advantages of fast running time, not needing to rely on data seriously, not needing long training time and parameter adjustment cost. The following is the test result on the personal CPU.
[0095] Up Figure 7 The left (a) is the mask obtained by segmentation, and the right (b) is the result obtained by using the design method, the example is only used as an example for single class, and the example only shows the simplification result of the largest farmland. From the running time, for ordinary hardware platform, it is completely acceptable, and from the accuracy, it has the characteristics of high accuracy.
[0096] It should be noted that the embodiments of the application can be realized by hardware, software or a combination of software and hardware. The hardware part can be realized by using special logic; the software part can be stored in the memory and executed by the appropriate instruction execution system, such as microprocessor or special designed hardware. Those skilled in the art can understand that the above devices and methods can be realized by computer executable instructions and / or included in processor control code, such as provided on carrier medium, such as magnetic disk, CD or DVD-ROM, programmable memory, such as read-only memory (firmware), or data carrier, such as optical or electronic signal carrier. The devices of the application and their modules can be realized by hardware circuit, such as ultra large scale integrated circuit or gate array, semiconductor, such as logic chip, transistor, or programmable hardware device, such as field programmable gate array, programmable logic device, software executed by various types of processors, or a combination of the above hardware circuit and software, such as firmware.
[0097] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any modification, equivalent replacement and improvement within the technical range disclosed by the present application and within the spirit and principle of the present application should be covered within the protection scope of the present application.
Claims
1. A scalable method for field boundary regularization simplification, characterized in that, The scalable farmland boundary regularization simplification method comprises the following steps: The scalable farmland boundary regularization simplification method comprises the following steps: Step one, determine the list of farmland categories to be segmented and the segmentation mask; Step two, perform traditional digital image processing operations on the binary image; Step three, perform polygon approximation on the extracted contour and remove redundant points; The traditional digital image processing operation on the binary image in step two comprises: (1) using the closing operation of the image to process the binary image, eliminating small holes in the image; connecting two regions to form a connected domain; (2) performing connected domain processing on the processed image, using the seed filling method in computer graphics to process the image, using the 8-connected condition for connected domain analysis, obtaining a set of connected domains marked with different pixel values, as well as the center point coordinates and area size of each connected domain; traverse the set and remove regions with an area size less than 100 pixels; (3) judge each connected domain, use the contour extraction algorithm to extract the contour of each connected domain; get the boundary point set on the contour; get the number of boundary points, if the number of boundary points is less than 5, mark the region.
2. The scalable field boundary regularization simplification method of claim 1, wherein, In step one, after determining the list of farmland categories to be segmented, use the existing partially labeled training to obtain the segmentation model; obtain the segmentation result of the farmland by the segmentation model, represented by the mask mask; The pixel value of the mask represents the index value of the class name in the class list, the index value starts from 1, and the 0 pixel represents the background, and the 255 pixel represents other classes for subsequent expansion.
3. The scalable field boundary regularization simplification method of claim 1, wherein, In step one, the processing of the single-class farmland category list comprises: (1) extract the pixel information of the selected class from the mask; (2) shield the pixels that do not belong to the selected class as background processing, and mark them as 0; mark the pixel value of the specified class as 1, and convert the image into a binary graph form.
4. The scalable field boundary regularization simplification method of claim 1, wherein, The polygon approximation and removal of redundant points of the extracted contour in step three comprises: (1) for each connected domain boundary point that meets the requirements, calculate the distance from the center point of the connected domain, and take P0 as the point with the maximum distance from the center point O; continue to traverse the connected domain contour boundary points, and obtain the point P1 with the maximum distance from P0, so that P0P1 divides the connected domain into A and B sub-regions; (2) the number of boundary points N on the contour of the A, B region A ,N B Statistics are performed, and m = min(N A ,N B ) / 10 is taken as the number of elements in a group; (3) Sort the boundary points of regions A and B according to their ordinates, and take m points as a group. If there are fewer than m points, the last group is directly connected end to end without further processing. Take the midpoint coordinate C of each group, and denote the first and last coordinates as PsPe respectively. Connect CPs and CPe and denote it as h. d1 ,h d2 Take the maximum radial distance h for each group max =max(h d1 ,h d2 Simultaneously, draw a perpendicular line from point C to PsPe, with the foot of the perpendicular at D; calculate the vertical distance CD for all points in regions A and B, and calculate the mean (d) of the tree branch distances in regions A and B respectively. A ),mean(d B ), standard deviation std(d A stda(d) B ); Take the vertical distance thresholds for parts A and B as c(A) = mean(d) A )+std(d A )*ε,c(B)=mean(d B )+std(d B )*ε, where ε is a parameter with a value range of [1,8], which is determined through subsequent steps (6); the final vertical threshold is C. max =max(c(A),c(B)); For each set of points, calculate the maximum radial distance v = max(h) within the set. d1 ,h d2 ), calculate the mean v over the entire set of points. mean The subsequent radial distance threshold Thr = v is determined. mean +Cmax*μ, where μ is in the range of 0 to 1 and is determined by the subsequent (6) steps; (4) For each point in the set of A, B points divided in step (3), the following judgment is made: calculate the vertical distance and radial distance of the point, if the vertical distance is greater than the maximum vertical distance threshold C max or the radial distance is greater than the radial threshold Thr, the point is marked as 1, otherwise marked as 0; (5) judge the group points, if all the group points are marked as 1, recursively process the group points, take the midpoint of the group points as the limit point, and go to step (4) for processing, until the group point is marked as 0; if the group point is marked as 0, directly take the first and last points of the group point for simplification; (6) The values of ε and μ are determined by the following method, using the following evaluation indicators: compression ratio, the ratio of the overlap of the simplified polygon before and after the area, and the offset distance between the center points, wherein the compression ratio refers to the ratio of the number of corner points of the simplified polygon to the boundary points of the original polygon contour; reasonable ranges are taken to determine the parameters, and manual observation is used to determine the parameters, wherein ε is traversed with a step size of 0.5, and μ is traversed with a step size of 0.
1.
5. An extensible field boundary regularizing and simplifying system which applies the extensible field boundary regularizing and simplifying method according to any one of claims 1 to 4, characterized by The scalable farmland boundary regularization simplification system comprises: a farmland category list determination module configured to determine a farmland category list to be segmented; a farmland segmentation module configured to obtain a segmentation mask of the farmland by using an existing labeled training segmentation model; a binary processing module configured to perform binary processing on the segmentation mask to obtain a binary image; a digital image processing module configured to perform traditional digital image processing on the binary image to extract the contour of each connected domain of the binary image; a farmland boundary representation module configured to perform polygon approximation on the contour information obtained by using the traditional image processing and remove redundant points to obtain a farmland boundary representation.
6. A computer device, comprising: A computer device comprises a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the scalable farmland boundary regularization simplification method according to any one of claims 1-4.
7. A computer readable storage medium storing a computer program, the computer program being executed by a processor to make the processor execute the steps of the scalable farmland boundary regularization simplification method according to any one of claims 1-4.
8. An information data processing terminal, characterized by An information data processing terminal is configured to implement the scalable farmland boundary regularization simplification system according to claim 5.
Citation Information
Patent Citations
Arc workpiece matching and positioning method based on high-precision geometric primitive extraction
CN111311618A
Farmland boundary identification method and system
CN113221740A
Pedestrian crossing early warning recognition detection method and system
CN113780070A