A method, system and apparatus for path planning in polygonal regions
By optimizing the path planning method for polygonal regions, identifying concave points, and utilizing the longest side benchmark segmentation strategy, the path planning problem for concave polygonal plots was solved, achieving efficient and standardized operation path planning, and reducing computational complexity and energy consumption.
Patent Information
- Application Number
- CN202510946613.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-07-09
AI Technical Summary
Traditional path planning methods lead to overlapping or omission of work areas in concave polygonal plots, increasing energy consumption and computational complexity. Furthermore, the work trajectories between the decomposed sub-regions lack directional consistency, which affects precision agriculture management.
By optimizing the segmentation strategy, the concave points of polygonal blocks are identified, and the longest side is used as a reference to determine whether to segment, thereby reducing the number of segmentations and generating a serpentine path to maintain the integrity of the field structure and the consistency of direction.
It significantly reduces the number of times concave polygon blocks are divided, lowers computational complexity, improves operational efficiency, provides a standardized basis for field management operations, and meets the collaborative needs of multi-device parallel operations.
Smart Images

Figure CN120445230B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of path planning technology, specifically relating to a method, system, and apparatus for path planning in polygonal regions. Background Technology
[0002] The BeiDou Navigation Satellite System (BDS), with its superior high-precision positioning capabilities, provides reliable navigation support for agricultural robots, enabling them to accurately complete a series of agricultural operations such as sowing, fertilizing, spraying, and harvesting. However, in actual agricultural production, farmland boundaries often exhibit irregular and complex concave polygonal block characteristics, which poses challenges to the path planning of agricultural robots.
[0003] Traditional global path planning methods are mainly applicable to fields with convex polygonal shapes. Based on the row-and-column operation characteristics of crop planting and harvesting, they often employ spiral or reciprocating path planning strategies. These methods can achieve high operational coverage in regular fields. However, when fields have concave features, directly applying these methods can lead to repeated coverage or omissions in the operational area, significantly reducing operational efficiency and increasing energy consumption.
[0004] For path planning in concave polygonal plots, existing technology (CN 117707190A, a method for full-coverage path planning of concave polygonal plots) involves dividing the concave polygonal plot into several convex polygonal sub-regions and then planning the path separately. However, this method may generate too many sub-regions, significantly increasing the complexity and computational burden of path planning. Furthermore, the operational trajectories between the decomposed sub-regions often lack directional consistency. This abrupt change in operational paths not only disrupts the spatiotemporal continuity of farmland operation data but also interferes with key aspects of subsequent precision agriculture management, such as variable sowing and fertilization, precision spraying, and intelligent harvesting, ultimately increasing overall operational costs and management difficulty. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method, system and apparatus for polygonal region path planning. By optimizing the segmentation strategy, the number of segmentations required for concave polygonal blocks is significantly reduced, unnecessary subdivision operations are avoided, thereby improving the overall segmentation efficiency while maintaining the integrity of the field structure.
[0006] This invention relates to a path planning method for a polygonal region, comprising the following steps:
[0007] S1. Acquire an image of the target region;
[0008] S2. Construct polygonal blocks with straight line segments as boundaries based on the image;
[0009] S3. Identify the concave points among all vertices of the polygonal block;
[0010] S4. Using the longest side other than the side connected by the concave point as the reference, determine whether the current polygon block needs to be divided. If so, go to S5; otherwise, go to S8.
[0011] S5. Determine whether the number of concave points of the polygonal block exceeds 2. If yes, proceed to S6; otherwise, proceed to S7.
[0012] S6. Divide the polygonal block into at least two polygonal blocks with no more than two concave points, and then proceed to S4;
[0013] S7. For the polygonal blocks that need to be segmented, determine the segmentation method based on the position of the concave point and segment them, and use the segmented area as the planning area.
[0014] S8. For polygonal blocks that do not need to be divided, treat them as a whole as the planning area;
[0015] S9. Construct the inner boundary of the planned area, generate an equidistant offset line parallel to the longest side, and calculate the coordinates of its intersection with the inner boundary.
[0016] S10. Generate a serpentine path within each planning area and a transition path between adjacent planning areas based on the coordinates of the intersection points.
[0017] Furthermore, S2 includes the following steps:
[0018] S201. Determine the boundary feature points of the image and extract their coordinates;
[0019] S202. Project and transform the coordinates of the boundary feature points to obtain their two-dimensional coordinates in a Cartesian coordinate system.
[0020] S203. Fit multiple straight lines to all boundary feature points to obtain polygonal blocks.
[0021] Furthermore, S3 includes the following steps:
[0022] S301. Construct the first vector and the second vector respectively, with each vertex as the starting point and its adjacent points as the ending points.
[0023] S302. Determine whether a vertex is a concave point based on the two-dimensional cross product result of the first vector and the second vector.
[0024] Furthermore, S302 also includes:
[0025] When all vertices are sorted counterclockwise: if the cross product > 0, the vertex is a convex vertex; if the cross product < 0, the vertex is a concave vertex.
[0026] When all vertices are sorted clockwise: if the cross product > 0, the vertex is concave; if the cross product < 0, the vertex is convex.
[0027] Furthermore, S4 includes the following steps:
[0028] S401. Select the longest edge among the remaining edges in the polygonal block, excluding the edges connected by concave points, and calculate the unit direction vector of the longest edge, whose direction is on the same side as the centroid of the polygon.
[0029] S402. Taking one endpoint of the longest side as the starting point and the other endpoint as the ending point, calculate the projection values of all vertices projected onto the normal vector of the unit direction vector in sequence to obtain the projection sequence and the point-line diagram formed by it. The horizontal axis is the vertex number and the vertical axis is the corresponding projection value.
[0030] S403. Determine whether the projection sequence is a unimodal sequence based on the monotonicity of the dot-line graph. If it is, no segmentation is required; otherwise, segmentation is required.
[0031] Furthermore, S403 includes: if the projected sequence meets any of the following conditions, then it is a single-peaked sequence;
[0032] ,
[0033] ;
[0034] in, p i Represents the projection sequence. k Indicates the sequence number.
[0035] Furthermore, S5 includes the following steps:
[0036] S701. If one of the concave points is located in a trough and the other concave point is neither located in a trough nor a crest, then connect the concave point located in the trough to the two endpoints of the longest side in sequence, and determine whether there is a case where the connecting line is outside the polygon block. If so, select the connecting line inside the polygon block as the dividing line. Otherwise, calculate the sum of compactness of the regions on both sides of the connecting line, and select the connecting line corresponding to the maximum sum of compactness as the dividing line to divide the polygon block.
[0037] S702. If both concave points are located in the trough, then connect the two concave points to the endpoints of the longest side that are closest to their serial numbers, and use the connecting lines as dividing lines to divide the polygonal blocks.
[0038] S703. If there is a concave point located at a wave crest, then the polygonal block is divided by connecting all the concave points located at the wave crests or troughs along a direction parallel to the longest side to the polygonal block.
[0039] Furthermore, the formula for calculating the sum of the compactnesses is as follows:
[0040] , ;
[0041] Among them, Ω i This indicates the areas corresponding to both sides of the line. Area (Ω i () represents the area of the corresponding region. Perimeter (Ω i ) indicates the perimeter of the corresponding area.
[0042] The present invention also provides a polygonal region path planning system, comprising:
[0043] The image acquisition module is used to acquire images of the target area;
[0044] A boundary extraction module is used to construct polygonal blocks with straight line segments as boundaries based on the image;
[0045] A concave dot recognition module is used to identify concave dots in all vertices of the polygonal block;
[0046] The segmentation judgment module is used to determine whether the polygon block needs to be segmented based on the longest side other than the side connected by the concave point. If so, the region segmentation module is executed; otherwise, the region planning module is executed.
[0047] The concave point count module is used to determine whether the number of concave points in a polygonal block exceeds 2. If it does, the block segmentation module is executed; otherwise, the region segmentation module is executed.
[0048] The block segmentation module is used to segment the polygonal block into at least two polygonal blocks with no more than two concave points, and to execute the segmentation judgment module;
[0049] The region segmentation module is used to determine the segmentation method based on the position of the concave point for the polygonal block that needs to be segmented, and then segment it, using the segmented region as the planning region.
[0050] The planning area module is used to treat polygonal blocks that do not need to be divided as a whole as a planning area;
[0051] The intersection calculation module is used to construct the inner boundary of the planning area, generate an equidistant offset line parallel to the longest side, and calculate the coordinates of its intersection with the inner boundary.
[0052] The path planning module is used to generate a serpentine path within each planning area and a transition path between adjacent planning areas based on the coordinates of the intersection points.
[0053] The present invention also provides a polygonal region path planning device, including a processor and a memory, wherein the memory is used to store a computer program and the processor is used to execute the computer program to implement the steps of the above method.
[0054] The beneficial effects of this invention are:
[0055] 1. The method in this invention significantly reduces the number of times concave polygon blocks need to be divided while maintaining the integrity of the land parcel by optimizing the segmentation strategy, thereby avoiding unnecessary subdivision operations and reducing computational and operational complexity.
[0056] 2. The method in this invention enables all polygonal regions with no more than 2 concave points to be path-planned in a uniform direction, providing a standardized operational basis for subsequent field management operations such as sowing, fertilization, and spraying.
[0057] 3. The method in this invention optimizes the spatial layout, achieving a non-intersecting layout of the movement trajectories of each work sub-area, fully meeting the collaborative needs of multiple devices operating in parallel, and significantly improving the overall operating efficiency of the system. Attached Figure Description
[0058] Figure 1 This is a flowchart of the method in this invention;
[0059] Figure 2 for Figure 1 The method shown is illustrated in the following diagram of the land parcel model (where Figure a represents the image of the target area and Figure b represents the polygonal block corresponding to Figure a).
[0060] Figure 3 for Figure 1 A schematic diagram of the unimodal region in the method shown (where Figure a represents the unimodal region image and Figure b represents the dotted line graph corresponding to Figure a);
[0061] Figure 4 for Figure 1 A schematic diagram of the segmentation of multi-concave polygonal blocks in the method shown;
[0062] Figure 5 for Figure 1 The diagram illustrates the first segmentation method for non-unimodal regions in the method shown (where Figure a represents the segmentation diagram of the first non-unimodal region image, and Figure b represents the dotted line diagram corresponding to Figure a).
[0063] Figure 6 for Figure 1 The diagram illustrates the second segmentation method for non-unimodal regions in the method shown (where Figure a represents the segmentation diagram of the second non-unimodal region image, and Figure b represents the dot-line diagram corresponding to Figure a).
[0064] Figure 7 for Figure 1 The diagram illustrates the third segmentation method for non-unimodal regions in the method shown (where Figure a represents the segmentation diagram of the third non-unimodal region image, and Figure b represents the dot-line diagram corresponding to Figure a).
[0065] Figure 8 for Figure 3 A schematic diagram of path planning for a unimodal region image is shown.
[0066] Figure 9 for Figure 5 The diagram shows a path planning schematic for a non-unimodal region image.
[0067] Figure 10 for Figure 6 The diagram shows a path planning schematic for a non-unimodal region image.
[0068] Figure 11 for Figure 7 The diagram shows a path planning diagram for a non-unimodal region image. Detailed Implementation
[0069] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0070] Taking a certain farmland plot as an example, such as Figures 1 to 11 As shown, the present invention provides a path planning method for a polygonal region, comprising the following steps:
[0071] S1. Acquire images of the target area. In this step, the area map can be acquired in two ways: one is to use a handheld positioning device to walk along the farmland boundary and manually collect the coordinate information of several key points, recording the boundary feature points of the target area in the form of discrete points; the other is to use a drone equipped with a high-precision GNSS module or remote sensing imaging equipment to carry out aerial photography of the target farmland area to obtain high-resolution geographic images or terrain data, and then manually select the boundary points of the target area through the images or maps.
[0072] S2. Construct polygonal blocks bounded by straight line segments based on the image. The purpose of this step is to convert the relevant information of the target plot into computer-readable data to facilitate subsequent operations. Specifically, this includes the following steps:
[0073] S201. Determine the boundary feature points of the image and extract their coordinates.
[0074] S202. Project the feature point coordinates to obtain their two-dimensional coordinate information in a Cartesian coordinate system. Since the acquired boundary information is usually expressed in latitude and longitude, belonging to the geographic coordinate system, to adapt to subsequent geometric modeling and path planning requirements, the Universal Transverse Mercator (UTM) projection coordinate transformation method needs to be used to uniformly map them to a Cartesian coordinate system, thereby obtaining the lateral coordinates of the boundary in a two-dimensional plane. x with vertical coordinate y That is, to realize the geometric representation of farmland boundaries in planar space.
[0075] S203. Fit multiple straight lines to all boundary feature points to obtain polygonal blocks. For example... Figure 2 As shown, to achieve structured modeling of farmland boundary geometry, simplify the model, and improve algorithm processing efficiency, straight line fitting is performed on the boundary curve based on boundary feature points, and then the original region is approximated by a series of line segments connected end to end. Ultimately, the original boundary information with complex shapes and irregular contours can be converted into polygonal blocks composed of regular straight line segments.
[0076] S3. Identify concave vertices among all vertices of the polygonal block. A concave vertices are points where the angle corresponding to a vertex exceeds 180°. For concave polygonal blocks, their vertices are divided into convex and concave vertices; therefore, it is necessary to identify the concave vertices to facilitate subsequent segmentation operations. This step also includes the following steps:
[0077] S301, Sort all vertices in order, and take one of the vertices as an example. v i As the starting point, its adjacent points v i-1 and v i+1 Construct the first vector for the endpoint respectively q i,i-1 Second vector q i,i+1 We can then obtain the first and second vectors corresponding to all vertices in sequence.
[0078] S302. Determine whether a vertex is concave based on the cross product of the first and second vectors. The criteria for judgment are as follows:
[0079] When all vertices are sorted counterclockwise: if the cross product > 0, the vertex is a convex vertex; if the cross product < 0, the vertex is a concave vertex.
[0080] When all vertices are sorted clockwise: if the cross product > 0, the vertex is concave; if the cross product < 0, the vertex is convex.
[0081] S4. Using the longest side excluding the side connected by the concave point as the reference, determine whether the current polygon block needs to be segmented. If so, proceed to S5; otherwise, proceed to S6. This step proposes a method for determining whether a polygon block needs to be segmented, specifically including the following steps:
[0082] S401. Traverse all edges of the polygonal block boundary, identify and exclude edges connected by concave points, sort the remaining edges by length, and calculate the unit direction vector of the longest edge. u Its direction is on the same side as the centroid of the polygon, and this vector is used as the reference parameter for subsequent path planning or region division.
[0083] Farmland plots typically exhibit regular, long boundary characteristics, where the main directional distribution of the plot forms the longest continuous working space. Path planning based on these long boundaries can reduce the frequency of agricultural equipment turning, optimize path structure, and improve operational efficiency.
[0084] S402. Starting from one endpoint of the longest side and ending at the other endpoint, sequentially traverse all vertices to form a set. V ={ v 1 , v 2 ,..., v n}, where each vertex v i =( x i , y i For each vertex in the set. v i Calculate its direction vector u normal vector n = ( x 0 , y 0 Projected scalar on ) p i This is the projected value. The calculation formula is: In this way, the projection sequence can be obtained { p 1 , p 2 , ..., p n} and the resulting dot-line graph. The horizontal axis of the dot-line graph represents the vertex index, and the vertical axis represents the corresponding projection value. In this example, as... Figure 3 As shown, the boundary of the polygonal block has 7 vertices, and its longest side is the base, that is... v 1 v7 Therefore, its right end v 1 Begin by calculating the projection values of all vertices counter-clockwise. If we consider the leftmost vertex... v 7 To begin, calculate the projection values of all vertices in a clockwise direction.
[0085] S403. Determine whether the projected sequence is a unimodal sequence based on the monotonicity of the dot-line plot. If it is, no segmentation is needed; otherwise, segmentation is required. Unimodality means that the sequence reaches an extreme value (maximum or minimum) at a certain position, and the parts before and after it exhibit monotonic changes, appearing as a single peak on the dot-line plot. If the projected sequence meets any of the following conditions, it is a unimodal sequence;
[0086] ① First increasing, then decreasing: that is ,
[0087] ② First decreasing then increasing: that is ;
[0088] in, p i Represents the projection sequence. k Indicates the sequence number.
[0089] S5. For polygonal blocks with a large number of concave points, it is also necessary to determine whether they need to be segmented for subsequent operations. Specifically, it is determined whether the number of concave points in the polygonal block exceeds 2. If so, proceed to S6; otherwise, proceed to S7.
[0090] S6. Divide the polygonal block into at least two polygonal blocks with no more than two concave vertices each, and then return to S4. For example... Figure 4 As shown, the polygonal block has 5 concave points. It is divided into two polygonal blocks, each with 2 concave points. The boundaries of the divided polygonal blocks are then used as the target objects for subsequent processing. In this step, the block segmentation method can be achieved by manually selecting the segmentation points or by automatically obtaining them using other existing algorithms; the specific method is not limited. The final multiple polygonal blocks all satisfy the condition that the number of concave points does not exceed 2.
[0091] S7. For the polygonal blocks that need to be segmented, determine the segmentation method based on the location of the concave points and perform the segmentation. The segmented areas are then used as the planning area. For projection sequences that do not satisfy the unimodality property, for any n-sided concave block (number of concave points ≤ 2), its two concave points must be located on the same side of the longest side. At this time, the projection sequence { p iThere are at most five extreme points, which are represented in the corresponding dotted line graph as a typical distribution of no more than three peaks and two troughs. Based on this, non-monotropic regions can be reasonably converted into regions with monotropic characteristics according to the number and distribution of troughs and peaks. Specifically, the following steps are also included:
[0092] S701, such as Figure 5 As shown, if one of the concave points v 4 Located at the trough and another concave point v 5 If it is neither located at a trough nor a crest, then it will be located at a trough. v 4 The concave points are successively connected to the longest side v 1 v 8 The two endpoints v 1 and v 8 Connect the polygons and determine if any connecting lines are outside the polygonal blocks. If so, select the connecting lines inside the polygonal blocks as the dividing lines; otherwise, calculate the sum of the compactness of the regions on both sides of the connecting line, and select the connecting line with the maximum sum of compactness as the dividing line to segment the polygonal blocks. The formula for calculating the sum of compactness is:
[0093] , ;
[0094] Among them, Ω i This represents the regions corresponding to both sides of the line, where i takes values of 1 and 2. Area (Ω i () represents the area of the corresponding region. Perimeter (Ω i () represents the perimeter of the corresponding region. Calculations show that when v 1 and v 4 After connecting, the sum of the compactness of the two regions is maximized, therefore the line is used to connect them. v 1 v 4 Divide into boundaries.
[0095] S702, such as Figure 6 As shown, if two concave points v 4 and v 6 If all are located at the trough, then the concave point will be... v 4 The longest adjacent edge v 1v 8 endpoints v 1 Connect the lines to the concave points. v 6 The longest adjacent edge v 1 v 8 endpoints v 8 Connect the lines, and use the connecting lines v 1 v 4 and v 6 v 8 Divide polygonal blocks using dividing lines.
[0096] S703, such as Figure 7 As shown, if there is a concave point v 10 If it is located at a crest, then all the concave points located at the crest or trough will be included. v 6 and v 10 As the endpoint, along the longest side v 1 v 11 Connect the direction to the polygonal block, and form a connecting line. v 6 v 12 and v 10 v 12 Divide polygonal blocks using dividing lines.
[0097] In other words, the planning areas obtained by the above method all exhibit unimodality in the direction of the longest side, thus they can be directly used for path planning.
[0098] S8. For polygonal blocks that do not need to be divided, that is, polygonal blocks that meet the unimodal condition, treat them as a whole as the planning area.
[0099] S9. Construct the inner boundary of the planning area, generate equidistant offset lines parallel to the longest side, and calculate the coordinates of their intersection points with the inner boundary. During reciprocating operations, equipment turning limitations and positioning accuracy deviations may lead to collisions. To address this, before calculating the intersection path, the entire area or the segmented planning area needs to be inner-bounded, reserving a safe distance for equipment turning. For the plot boundary, first connect each vertex sequentially in a clockwise or counterclockwise order to form a directional edge vector. The edge vector is... s = v i+1 - v i (in v n+1 = v 1 Calculate the inward-pointing normal vector based on the vertex connection direction. Then, move each vertex a distance along the normal vector directions of the adjacent two sides. b The movement direction is the resultant of the two normal vectors. After the vertex moves, the new edges may intersect. The intersection points of adjacent new edges are then calculated as the new vertices of the equidistant inner contour after shrinking. These intersection points are connected in sequence to obtain the equidistant inner contour after shrinking.
[0100] To achieve systematic traversal of the target area, a classic and efficient full-coverage path planning method, namely the scanline method (also known as the ordered edge list method), is adopted, which is widely used in the representation and location analysis of parcel datasets. This method generates paths by constructing a set of regularly arranged scanlines. Using the longest edge of the parcel as the reference direction, a series of scanlines with intervals of [missing information] are generated along that direction. d Parallel lines. These parallel lines are equivalent to the actual walking path. By calculating the coordinates of the intersection points of each parallel line with the equidistant inner contour, it is easy to determine the start and end positions of the path and the sequence of movement.
[0101] S10. Generate a serpentine path within each planning area and a transition path between adjacent planning areas based on the intersection coordinates.
[0102] like Figure 8 As shown, to ensure that the equipment can efficiently complete its tasks sequentially between various unimodal areas, the path connection strategy fully incorporates the equipment's own motion characteristics. Unlike traditional agricultural machinery operations, which require reserving large-radius turning spaces such as pear-shaped or fishtail-shaped turns, the equipment platform targeted by this invention has the ability to turn on the spot and can achieve zero-radius turns. Based on the above characteristics, during the path generation process, according to the preset spatial traversal logic, key intersections on the boundaries of each planned area are selected and connected sequentially using the shortest connection method in a specific order, thereby forming a serpentine trajectory that runs through the entire working area.
[0103] like Figure 10 and Figure 11 As shown, for multiple adjacent planning areas formed due to regional segmentation or task requirements, the serpentine planning direction of each planning area is first dynamically adjusted to make the path endpoint and starting point of adjacent planning areas as close as possible in space. For example, if the path endpoint in the previous planning area is on the right, while the path starting point in the next planning area is on the left, and the two points are far apart, the path in the previous planning area can be reversed, so that its endpoint is on the left, shortening the distance between the two points.
[0104] Then, extending from the current planned area path endpoint towards the adjacent planned area to the safe operation boundary, a first candidate connection point is determined. Simultaneously, a second candidate connection point is determined near the starting point of the path in the adjacent planned area. Then, through comprehensive analysis of terrain structure and spatial connectivity characteristics, an optimal transition path is established between the two candidate points. The selection of the transition path can be done in two ways:
[0105] One scenario involves two points where there are no physical obstacles between them. In this case, a straight line can be used to connect the two points to create a transition path. For example, when a drone sprays pesticides or applies fertilizer, since there are no obstacles in the air, it can move directly along a transition path generated in this way.
[0106] Another scenario involves a physical obstacle between two points. In this case, a transition path can be obtained by connecting the two points along an equidistant line that is recessed from the boundary of the polygonal block. For example, if there is a pool of water or a ground protrusion between two points, and ground equipment cannot cross the obstacle, then a transition path generated in this way can be used to move.
[0107] The effective path proportions obtained through the above methods are 100%, 97.65%, 97.85%, and 97.57%, respectively.
[0108] The present invention also provides a polygonal region path planning system, including an image acquisition module, a boundary extraction module, a concave point recognition module, a segmentation judgment module, a concave point quantity module, a block segmentation module, a region segmentation module, a planning region module, an intersection point calculation module, and a path planning module.
[0109] The image acquisition module is used to acquire images of the target area.
[0110] The boundary extraction module is used to construct polygonal blocks with straight line segments as boundaries based on the image.
[0111] The concave point recognition module is used to identify concave points in all vertices of the polygonal block.
[0112] The segmentation judgment module is used to determine whether a polygon block needs to be segmented, based on the longest side other than the side connected by the concave point. If so, the region segmentation module is executed; otherwise, the planning region module is executed.
[0113] The concave point count module is used to determine whether the number of concave points in a polygonal block exceeds 2. If it does, the block segmentation module is executed; otherwise, the region segmentation module is executed.
[0114] The block segmentation module is used to segment the polygonal block into at least two polygonal blocks with no more than two concave points, and to execute the segmentation judgment module.
[0115] The region segmentation module is used to determine the segmentation method based on the location of the concave points for polygonal blocks that need to be segmented, and then segment them, using the segmented regions as the planning areas.
[0116] The planning area module is used to treat polygonal blocks that do not need to be divided as a whole as a planning area.
[0117] The intersection calculation module is used to construct the inner boundary of the planning area, generate an equidistant offset line parallel to the longest side, and calculate the coordinates of its intersection with the inner boundary.
[0118] The path planning module is used to generate a serpentine path within each planning area and a transition path between adjacent planning areas based on the intersection coordinates.
[0119] The present invention also provides a polygonal region path planning device, including a processor and a memory, wherein the memory is used to store a computer program and the processor is used to execute the computer program to implement the steps of the above method.
[0120] It should be noted that the equipment in this invention can be unmanned or manned, such as unmanned machinery or manned machinery that performs tasks such as sowing, fertilizing, spraying, weeding, and harvesting.
[0121] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A path planning method for a polygonal region, characterized in that, Includes the following steps: S1. Acquire an image of the target region; S2. Construct polygonal blocks with straight line segments as boundaries based on the image; S3. Identify the concave points among all vertices of the polygonal block; S4. Using the longest side excluding the side connected by the concave point as the reference, determine whether the current polygon block needs to be divided. If so, proceed to S5; otherwise, proceed to S8. S4 includes the following steps: S401. Select the longest edge among the remaining edges in the polygonal block, excluding the edges connected by concave points, and calculate the unit direction vector of the longest edge, whose direction is on the same side as the centroid of the polygon. S402. Taking one endpoint of the longest side as the starting point and the other endpoint as the ending point, calculate the projection values of all vertices projected onto the normal vector of the unit direction vector in sequence to obtain the projection sequence and the point-line diagram formed by it. The horizontal axis is the vertex number and the vertical axis is the corresponding projection value. S403. Determine whether the projection sequence is a unimodal sequence based on the monotonicity of the dot-line graph. If it is, no segmentation is required; otherwise, segmentation is required. S5. Determine whether the number of concave points of the polygonal block exceeds 2. If yes, proceed to S6; otherwise, proceed to S7. S6. Divide the polygonal block into at least two polygonal blocks with no more than two concave points, and then proceed to S4; S7. For the polygonal blocks that need to be segmented, determine the segmentation method and segment them according to the position of the concave point in the dot-line diagram at the peak or trough, and use the segmented area as the planning area. S8. For polygonal blocks that do not need to be divided, treat them as a whole as the planning area; S9. Construct the inner boundary of the planned area, generate an equidistant offset line parallel to the longest side, and calculate the coordinates of its intersection with the inner boundary. S10. Generate a serpentine path within each planning area and a transition path between adjacent planning areas based on the coordinates of the intersection points.
2. The polygonal region path planning method according to claim 1, characterized in that, S2 includes the following steps: S201. Determine the boundary feature points of the image and extract their coordinates; S202. Project and transform the coordinates of the boundary feature points to obtain their two-dimensional coordinates in a Cartesian coordinate system. S203. Fit multiple straight lines to all boundary feature points to obtain polygonal blocks.
3. The polygonal region path planning method according to claim 1, characterized in that, S3 includes the following steps: S301. Construct the first vector and the second vector respectively, with each vertex as the starting point and its adjacent points as the ending points. S302. Determine whether a vertex is a concave point based on the two-dimensional cross product result of the first vector and the second vector.
4. The polygonal region path planning method according to claim 3, characterized in that, S302 also includes: When all vertices are sorted counterclockwise: if the cross product > 0, the vertex is a convex vertex; if the cross product < 0, the vertex is a concave vertex. When all vertices are sorted clockwise: if the cross product > 0, the vertex is concave; if the cross product < 0, the vertex is convex.
5. The polygonal region path planning method according to claim 1, characterized in that, S403 includes: If the projected sequence meets any of the following conditions, then it is a single-peaked sequence; , ; in, p i Represents the projection sequence. k Indicates the sequence number.
6. The polygonal region path planning method according to claim 1, characterized in that, S7 includes the following steps: S701. If one of the concave points is located in a trough and the other concave point is neither located in a trough nor a crest, then connect the concave point located in the trough to the two endpoints of the longest side in sequence, and determine whether there is a case where the connecting line is outside the polygon block. If so, select the connecting line inside the polygon block as the dividing line. Otherwise, calculate the sum of compactness of the regions on both sides of the connecting line, and select the connecting line corresponding to the maximum sum of compactness as the dividing line to divide the polygon block. S702. If both concave points are located in the trough, then connect the two concave points to the endpoints of the longest side that are closest to their serial numbers, and use the connecting lines as dividing lines to divide the polygonal blocks. S703. If there is a concave point located at a wave crest, then the polygonal block is divided by connecting all the concave points located at the wave crests or troughs along a direction parallel to the longest side to the polygonal block.
7. A polygonal region path planning method according to claim 6, characterized in that, The formula for calculating the sum of the compactnesses is: , ; Among them, Ω i This indicates the areas corresponding to both sides of the line. Area (Ω i () represents the area of the corresponding region. Perimeter (Ω i ) indicates the perimeter of the corresponding area.
8. A polygonal region path planning system, characterized in that, include: The image acquisition module is used to acquire images of the target area; A boundary extraction module is used to construct polygonal blocks with straight line segments as boundaries based on the image; A concave dot recognition module is used to identify concave dots in all vertices of the polygonal block; The segmentation judgment module is used to determine whether the current polygon block needs to be segmented, based on the longest side excluding the edge connected by the concave point. If so, the region segmentation module is executed; otherwise, the region planning module is executed. This module performs the following steps: Select the longest edge among the remaining edges in the polygonal block, excluding the edges connected by concave points, and calculate the unit direction vector of the longest edge, whose direction is on the same side as the centroid of the polygon. Starting from one endpoint of the longest side and ending at the other endpoint, the projection values of all vertices projected onto the normal vector of the unit direction vector are calculated sequentially to obtain the projection sequence and the point-line graph formed by it. The horizontal axis represents the vertex number and the vertical axis represents the corresponding projection value. Determine whether the projection sequence is a unimodal sequence based on the monotonicity of the dot-line graph. If it is, no segmentation is needed; otherwise, segmentation is required. The concave point count module is used to determine whether the number of concave points in a polygonal block exceeds 2. If it does, the block segmentation module is executed; otherwise, the region segmentation module is executed. The block segmentation module is used to segment the polygonal block into at least two polygonal blocks with no more than two concave points, and to execute the segmentation judgment module; The region segmentation module is used to determine the segmentation method and perform segmentation for polygonal blocks that need to be segmented based on the position of the concave points in the point-line diagram at the peaks or troughs, and to use the segmented regions as planning regions. The planning area module is used to treat polygonal blocks that do not need to be divided as a whole as a planning area; The intersection calculation module is used to construct the inner boundary of the planning area, generate an equidistant offset line parallel to the longest side, and calculate the coordinates of its intersection with the inner boundary. The path planning module is used to generate a serpentine path within each planning area and a transition path between adjacent planning areas based on the coordinates of the intersection points.
9. A polygonal area path planning device, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, and the processor being used to execute the computer program to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Full-coverage path planning method for concave polygonal field
CN117707190A
Method and apparatus for image analysis, method and system for image processing, and operation program therefor
JP2006107018A
Map area division method, autonomous mobile device, and computer-readable medium
WO2025066727A1