Grid map editing method and device, equipment and medium

By discretizing the coordinate sequence of the operating points and performing regionalized binary editing, the problem of incomplete filling of trajectories in raster maps is solved, and the accuracy and clarity of navigation planning are improved.

CN120707792APending Publication Date: 2025-09-26SHENZHEN LINGSI ROBOT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510868302.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing technology, the raster map constructed by laser point cloud has incomplete filling of track edge pixels, which leads to inaccurate path recognition during navigation planning, blurring and unclean erasure.

Method used

By obtaining the continuous motion trajectory of the map editing tool in the raster map, discretizing it into a sequence of operating point coordinates, generating a discretized editing area, and performing regionalized binary editing operations to generate a map trajectory without intermediate grayscale.

Benefits of technology

Improves the clarity and recognizability of map trajectories, ensures the accuracy of path recognition, and avoids blurred boundaries and misidentification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707792A_ABST
    Figure CN120707792A_ABST
Patent Text Reader

Abstract

The invention discloses a grid map editing method. The method comprises the following steps: acquiring a continuous movement track of a map editing tool in a grid map; discretizing the motion trail into an operation point coordinate sequence; generating a corresponding discretization editing area based on the operation point coordinate sequence; and on the basis of the discretized editing region, executing a regionalized binary editing operation, and generating a map track without an intermediate gray scale. According to the method, a motion track is discretized into an operation point coordinate sequence, and a discretization editing area which does not exist and only occupies part of pixel grids is generated according to the operation point coordinate sequence, so that a map track which is free of middle gray scale and fuzzy boundary is generated through area binary editing operation; and the definition and identifiability of the map track are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of map editing technology, and in particular to a raster map editing method, device, equipment and medium. Background Art

[0002] With the development of laser point cloud technology, raster maps constructed from laser point clouds have been widely used in navigation maps. Since navigation maps are single-channel and have 256 levels of grayscale data, navigation maps usually identify individual pixels near the gray area (i.e., the 200-level grayscale area) as areas not identified by the laser scan, and individual pixels near the white area (i.e., the 255-level grayscale area) as passable areas. The remaining gray levels are represented as black areas, representing areas where obstacles are inaccessible.

[0003] Therefore, after editing a navigation map with an anti-aliased brush, the edge pixels of the strokes often don't fill the entire pixel grid (i.e., they are blurred). In this case, the edges of areas drawn with black strokes become blurred. Erasing these areas with a white brush may result in incomplete erasure, causing these areas to be identified as obstacles during navigation planning, resulting in non-shortest paths. Therefore, a map editing method is needed that can completely fill the unit pixel grids in a raster map during map editing. Summary of the Invention

[0004] Embodiments of the present invention provide a grid map editing method, apparatus, device, and medium to solve the problem that map trajectories in laser point cloud maps cannot completely fill unit pixel grids, thereby causing inaccurate path recognition.

[0005] In a first aspect, the present disclosure provides a raster map editing method, comprising: obtaining a continuous motion trajectory of a map editing tool in a raster map; discretizing the motion trajectory into a sequence of operation point coordinates; generating a corresponding discretized editing area based on the sequence of operation point coordinates; and performing a regionalized binary editing operation based on the discretized editing area to generate a map trajectory without intermediate grayscale.

[0006] In some embodiments, obtaining the continuous motion trajectory of a map editing tool in a grid map includes: determining the center filling unit of the map editing tool based on the current coordinates of the map editing tool in the grid map; determining the unit editing trajectory of the continuous motion trajectory based on the center filling unit and the preset pixel value of the map editing tool; and determining the continuous motion trajectory of the map editing tool based on the unit editing trajectory.

[0007] In some embodiments, based on the current coordinates of the map editing tool on the grid map, the center filling unit of the map editing tool is determined, including: based on the current coordinates, determining the center coordinates of the map editing tool; based on the center coordinates and a preset side length, determining the center filling unit of the map editing tool, the center filling unit being a square unit with the center coordinates as the vertex, and the square unit containing the current coordinates.

[0008] In some embodiments, based on the preset pixel values ​​of the circle center filling unit and the map editing tool, the unit editing trajectory of the continuous motion trajectory is determined, including: determining the radius of the unit editing trajectory based on the preset pixel value of the map editing tool; making a circle based on the radius with the circle center filling unit as the center; determining the unit filling unit of the map editing tool based on the circle center filling unit, and the unit filling unit has the same shape as the circle center filling unit; based on the circle, with the circle center filling unit as the center, using the unit filling unit to fill around the circle center filling unit to obtain the unit editing trajectory, the side length of the unit filling unit coincides with the side length of the circle center filling unit, or the side length of the unit filling unit coincides with the side length of the unit filling unit, and the overlapping area between the unit filling unit and the circle is greater than the preset area threshold.

[0009] In some embodiments, the motion trajectory is discretized into a sequence of operation point coordinates, including: discretizing the motion trajectory, determining unit editing trajectories corresponding to multiple moments, and determining the vertex coordinates and circle center coordinates corresponding to each unit editing trajectory, where the vertex coordinates are the coordinates of the vertex of the unit editing trajectory; and determining the vertex coordinates and circle center coordinates as a sequence of operation point coordinates.

[0010] In some embodiments, the operation point coordinate sequence includes multiple vertex coordinates and multiple circle center coordinates; based on the operation point coordinate sequence, a corresponding discretized editing area is generated, including: when the coordinate values ​​of two adjacent circle center coordinates in at least one coordinate axis are the same, the area formed by the multiple vertex coordinates corresponding to the two adjacent circle center coordinates is determined as a unit discretization area; when the coordinate values ​​of two adjacent circle center coordinates in any coordinate axis are different, based on the two adjacent circle center coordinates and the multiple vertex coordinates corresponding to the two adjacent circle center coordinates, the target bridge point coordinates are determined to determine the area formed by the multiple vertex coordinates corresponding to the two adjacent circle center coordinates and the target bridge point coordinates as a unit discretization area; traverse multiple circle center coordinates to obtain multiple unit discretization areas, so as to determine the multiple unit discretization areas as discretized editing areas.

[0011] In some embodiments, based on the coordinates of two adjacent circle centers and multiple vertex coordinates corresponding to the two adjacent circle center coordinates, the target bridge point coordinates are determined, including: determining the vertex coordinates with the farthest vertical distance from the first straight line among the corresponding multiple vertex coordinates as the tangent point coordinates, and the first straight line passes through the two adjacent circle center coordinates; based on the tangent point coordinates, determining multiple candidate bridge point coordinates corresponding to each tangent point coordinate, the candidate bridge point coordinates being the coordinates of the tangent point coordinates after being translated by one unit pixel along the coordinate axis direction close to the adjacent tangent point coordinates; based on the tangent point coordinates and the multiple candidate bridge point coordinates, determining multiple second straight lines, the second straight lines being straight lines passing through the tangent point coordinates and the candidate bridge point coordinates; based on the angle between the first straight line and the multiple second straight lines, determining the target bridge point coordinates from the candidate bridge point coordinates, wherein the angle between the second straight line corresponding to the target bridge point coordinates and the first straight line is the smallest among the multiple angles.

[0012] In a second aspect, the present disclosure provides a grid map editing device, comprising: An acquisition unit, used for acquiring a continuous motion trajectory of a map editing tool in a grid map; Discrete unit, used to discretize the motion trajectory into a sequence of operating point coordinates; A first generating unit, configured to generate a corresponding discretized editing area based on an operation point coordinate sequence; The second generating unit is used to perform a regionalized binary editing operation based on the discretized editing area to generate a map trajectory without intermediate grayscale.

[0013] In a third aspect, the present disclosure provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned raster map editing method when executing the computer program.

[0014] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program, which implements the above-mentioned raster map editing method when executed by a processor.

[0015] In the scheme implemented by the aforementioned raster map editing method, apparatus, device, and medium, the continuous motion trajectory of a map editing tool in a raster map is obtained; the motion trajectory is discretized into a sequence of operating point coordinates to generate a corresponding discretized editing region; and then a regionalized binary editing operation is performed on the discretized editing region to generate a map trajectory without intermediate grayscale. In the present invention, by discretizing the motion trajectory into a sequence of operating point coordinates, a discretized editing region is generated based on the operating point coordinate sequence, which does not occupy only a portion of a pixel grid. Thus, through the regionalized binary editing operation, a map trajectory without intermediate grayscale and fuzzy boundaries is generated, thereby improving the clarity and recognizability of the map trajectory. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] Figure 1 is a flow chart of a method for editing a grid map in one embodiment of the present invention; Figure 2 is a coordinate example diagram of a grid map editing method according to an embodiment of the present invention; Figure 3 This is another coordinate example diagram of the grid map editing method according to one embodiment of the present invention; Figure 4 This is another coordinate example diagram of the grid map editing method according to one embodiment of the present invention; Figure 5 is another flow chart of a method for editing a raster map according to an embodiment of the present invention; Figure 6 is another flow chart of a method for editing a raster map according to an embodiment of the present invention; Figure 7 This is another coordinate example diagram of the grid map editing method according to one embodiment of the present invention; Figure 8 is another flow chart of a method for editing a raster map according to an embodiment of the present invention; Figure 9 This is another coordinate example diagram of the grid map editing method according to one embodiment of the present invention; Figure 10 is another flow chart of a method for editing a raster map according to an embodiment of the present invention; Figure 11 This is another coordinate example diagram of the grid map editing method according to one embodiment of the present invention; Figure 12 is another flow chart of a method for editing a raster map according to an embodiment of the present invention; Figure 13 This is another coordinate example diagram of the grid map editing method according to one embodiment of the present invention; Figure 14 is another flow chart of a method for editing a raster map according to an embodiment of the present invention; Figure 15 This is another coordinate example diagram of the grid map editing method according to one embodiment of the present invention; Figure 16 This is a principle block diagram of a grid map editing device according to one embodiment of the present invention; Figure 17It is a principle block diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0018] In one embodiment, if Figure 1 As shown, a raster map editing method is provided, comprising the following steps: S101, obtaining a continuous motion trajectory of a map editing tool in a grid map; S102, discretizing the motion trajectory into a sequence of operating point coordinates; S103, generating a corresponding discretized editing area based on the operation point coordinate sequence; S104: Based on the discretized editing area, perform a regionalized binary editing operation to generate a map trajectory without intermediate grayscale.

[0019] Among them, the map editing tool can be an editing tool such as a mouse cursor, an electronic brush, etc., which is not limited in this disclosure.

[0020] As an example, in step S101, the movement route of the map editing tool on the grid map can be captured, and the map area covered by the unit editing range of the map editing tool when it moves along the movement route can be determined as a continuous movement trajectory.

[0021] For example Figure 2 As shown, the movement route of the map editing tool on the grid map is from P to Q, and area M is the unit editing range of the map editing tool. The continuous movement trajectory of the map editing tool is the area passed by area M when it moves from P to Q.

[0022] As an example, in step S102, the continuous motion trajectory can be discretized into a sequence of operation point coordinates having integer coordinate values. In other words, the multiple coordinate points in the grid map covered by the continuous motion trajectory can be determined as the sequence of operation point coordinates, wherein the coordinate values ​​of the multiple coordinate points are all integers.

[0023] For example Figure 3 As shown, Figure 3 The shaded area in (a) is the continuous motion trajectory of the map editor. The coordinate points with integer coordinate values ​​in the shaded area can be determined as the operation point coordinate sequence. Figure 3 The multiple coordinate points shown in (b) are determined as the operating point coordinate sequence, where: Figure 3 The coordinate values ​​of the plurality of coordinate points shown in (b) are all integer values.

[0024] As an example, in step S103, it is possible to determine whether there is an area in the continuous motion trajectory that does not occupy all unit pixel grids based on the operation point coordinate sequence, and then, based on the result of the determination, the area corresponding to the operation point coordinate sequence that can occupy all unit pixel grids is determined as a discretized editing area, thereby avoiding identifying an obstacle-free area as an obstacle area, or identifying an obstacle area as an obstacle-free area, when identifying the map trajectory. The pixel value of the unit pixel grid can be 1 pixel value or other pixel values, which is not limited in this disclosure.

[0025] In other words, the discretized editing area does not contain an area that does not occupy all unit pixel grids and is consistent with the operation point coordinate sequence.

[0026] For example Figure 4 As shown, the operating point coordinate sequence includes coordinate points A1 to A4, coordinate points B1 to B5, and coordinate points C1 to C6, and the generated discretized coordinate region is Figure 4 The shaded area in the image is , where each square is a unit pixel grid.

[0027] As an example, in step S104, a regionalized binary editing operation can be performed on the discretized editing area, a grayscale value is assigned to the discretized editing area, and another grayscale value is assigned to other areas outside the discretized editing area, thereby generating a map track in the raster map without other grayscale values.

[0028] In other words, the map track is the discretized editing area after performing regionalized binary editing.

[0029] For example, the discretized editing area can be assigned a grayscale value of 0, and the other raster map areas outside the discretized editing area can be assigned a grayscale value of 255. The discretized editing area with a grayscale value of 0 is determined as the map track, so that there are only two grayscale values ​​in the entire raster map. Since the map track can completely occupy each unit pixel grid, there is no edge blur in the map track, which can effectively improve the accuracy of the map path.

[0030] In this example, the continuous motion trajectory of a map editing tool in a raster map is obtained; the motion trajectory is discretized into a sequence of operating points to generate a corresponding discretized editing region; and then a regionalized binary editing operation is performed on the discretized editing region to generate a map trajectory without intermediate grayscale. In the present invention, by discretizing the motion trajectory into a sequence of operating point coordinates, a discretized editing region is generated based on the operating point coordinate sequence, which does not occupy only a portion of the pixel grid. Thus, through the regionalized binary editing operation, a map trajectory without intermediate grayscale and fuzzy boundaries is generated, thereby improving the clarity and recognizability of the map trajectory.

[0031] like Figure 5 As shown, step S101, i.e. obtaining the continuous motion trajectory of the map editing tool in the grid map, includes: S201, determining a center fill cell of the map editing tool based on the current coordinates of the map editing tool on the grid map; S202, determining a unit editing trajectory of the continuous motion trajectory based on the circle center filling unit and the preset pixel value of the map editing tool; S203: Determine a continuous motion trajectory of the map editing tool based on the unit editing trajectory.

[0032] As an example, in step S201, since the pixel size of the map editor selected when editing the map track for different targets may be different, it is necessary to determine the center filling unit of the map editor so that when the pixel size of different map editors is selected, the center filling unit can be directly used as the center to construct the stroke of the map editing tool, thereby improving the drawing speed of the map track.

[0033] The pixel size of the center filling unit may be 1 pixel, but is not limited thereto.

[0034] As an example, in step S201 , according to the current coordinate point of the map editing tool in the grid map, the grid area corresponding to the current coordinate point can be determined as the center filling unit of the map editing tool.

[0035] Specifically, you can refer to Figure 6 The steps shown to determine the center fill cell include: S301, determining the center coordinates of the map editing tool based on the current coordinates; S302: Determine a circle center filling unit of the map editing tool based on the circle center coordinates and the preset side length. The circle center filling unit is a square unit with the circle center coordinates as vertices, and the square unit contains the current coordinates.

[0036] As an example, in step S301, since the coordinate value of the current coordinate may not be an integer value, in order to avoid the center filling unit from not occupying a complete unit pixel grid, the coordinate value of the current coordinate can be rounded, and the coordinates obtained after evidence collection can be determined as the center coordinates to ensure that when the center filling unit is constructed using the center coordinates, the center filling unit can occupy one or more complete unit pixel grids.

[0037] For example, when the current coordinate is (0.6, 0.7), the coordinate values ​​of the horizontal axis and the vertical axis of the current coordinate are rounded up, and the coordinate (1, 1) obtained after evidence collection is determined as the center coordinate of the circle.

[0038] It should be understood that when the current coordinates are rounded, the coordinate values ​​of both the horizontal and vertical axes may be rounded up; or the coordinate values ​​of both the horizontal and vertical axes may be rounded down; or the coordinate values ​​of the vertical axis may be rounded down while the horizontal axis is rounded up; or the coordinate values ​​of the vertical axis may be rounded up while the horizontal axis is rounded down. This disclosure does not limit this.

[0039] As an example, in step S302, the center coordinates can be used as the vertex of the center filling unit, and the preset side length can be used as the side length of the center filling unit to construct the center filling unit, wherein the center filling unit should contain the current coordinates, and in order to ensure that the center filling unit can occupy the entire unit pixel grid, the shape of the center filling unit is a square.

[0040] It should be understood that the present disclosure does not limit the preset side length, and any length that can be constructed to completely occupy the unit pixel grid in the grid map can be used as the preset side length.

[0041] For example Figure 7 As shown, the center coordinates are obtained by rounding down the horizontal axis of the current coordinates and rounding up the vertical axis coordinates. At this time, the center coordinates can be used as the upper left corner vertex of the center filling unit, and based on the center coordinates, the center filling unit shown in the figure can be constructed using the preset side length.

[0042] As an example, in step S202, the center filling unit can be used as the center and the preset pixel value of the map editing tool can be used as the target. The center filling unit can be filled using squares that can completely occupy the unit pixel grid until the pixel value of the filled area reaches the preset pixel value, and the filled area is determined as the unit editing track (i.e., the stroke shape of the map editing tool).

[0043] The stroke shape of the map editing tool (ie, the unit editing track of the map editing tool) may be determined according to the center fill unit and the preset pixel value of the map editing tool.

[0044] Specifically, you can refer to Figure 8 The steps shown determine the unit edit track, including: S401, determining a radius of a unit editing track based on a preset pixel value of a map editing tool; S402, taking the center filling unit as the center and making a circle based on the radius; S403, determining a unit filling unit of the map editing tool based on the circle center filling unit, where the unit filling unit has the same shape as the circle center filling unit; S404: Determine a unit filling unit of the map editing tool based on the circle center filling unit, where the unit filling unit has the same shape as the circle center filling unit.

[0045] As an example, in step S401, the preset pixel value of the map editing tool can be used as the area of ​​a square, and the side length of the square can be used as the radius of the unit editing track. In other words, the radius of the unit editing track can be determined by taking the square root of the preset pixel value.

[0046] As an example, in step S402, in order to simulate the brush strokes of a real brush, the radius obtained in step S401 can be used as the radius of the target circle, and the center point of the center filling unit can be used as the center of the circle to draw a circle. The circle can be understood as the ideal unit editing track of the map editing tool.

[0047] As an example, in step S403, since the center filling unit can occupy a complete unit pixel grid, in order to ensure that the unit editing track can also occupy a complete unit pixel grid, the unit filling unit of the map editing tool can be determined to be a square unit with the same shape as the center filling unit.

[0048] As an example, in step S404, in order to make the unit editing track occupy the entire circle as much as possible and ensure that the unit editing track can occupy the complete unit pixel grid, the center filling unit can be used as the center and the unit filling unit can be used to fill around the center filling unit to obtain the unit editing track.

[0049] The side length of the unit filling unit coincides with the side length of the center filling unit, or the side length of the unit filling unit coincides with the side length of the unit filling unit, and the overlapping area of ​​the unit filling unit and the circle is greater than a preset area threshold.

[0050] For example, Figure 9 As shown, the center of the circle filling unit can be used as the center, and the unit filling unit can be filled along the side length of the center filling unit to obtain the following Figure 9 The unit edit track is shown in the shaded area.

[0051] As an example, in step S203 , the area passed by the unit editing track when moving can be determined as the continuous movement track of the map editing tool.

[0052] like Figure 10 As shown, step S102 discretizes the motion trajectory into a sequence of operating point coordinates, including: S501, discretizing the motion trajectory to determine unit editing trajectories corresponding to multiple moments, and determining vertex coordinates and circle center coordinates corresponding to each unit editing trajectory; S502: Determine the vertex coordinates and the circle center coordinates as an operation point coordinate sequence.

[0053] As an example, in step S501 , the motion trajectory is discretized into unit editing trajectories corresponding to multiple moments.

[0054] For example, taking the motion trajectory as Figure 3 (a) is used as an example to illustrate. The unit editing trajectory corresponding to multiple moments obtained after discretization is as follows: Figure 11 As shown, it includes the unit editing track corresponding to the center coordinates of the circle at time t1, and the unit editing track included in the center coordinates of the circle at time t2.

[0055] As an example, in step S501, the vertex coordinates can be determined based on the coordinate position of the vertex of each unit editing track in the grid map, and the center coordinates can be determined based on the coordinate position of the center filling unit of each unit editing track in the grid map.

[0056] For example, edit the trajectory in units corresponding to multiple discrete moments. Figure 11 As shown, the coordinates of the center of the circle at time t1 are Figure 3 In (b), the vertex coordinates of A3 at time t1 are A1, A2, A4, A5, C1, C2, C3, C4, C5, C6 and C7; the center coordinates at time t2 are Figure 3 For C7 in (b), the vertex coordinates at time t2 are B1, B2, B3, B4, B5, C1, C2, C3, C4, C5, C6, and C7.

[0057] As an example, the operation point coordinate sequence includes multiple vertex coordinates and multiple circle center coordinates, then Figure 12 As shown, step S103 discretizes the motion trajectory into a sequence of operating point coordinates, including: S601, when the coordinate values ​​of two adjacent circle center coordinates on at least one coordinate axis are the same, determining an area formed by the coordinates of multiple vertices corresponding to the two adjacent circle center coordinates as a unit discretization area; S602: When the coordinate values ​​of two adjacent circle center coordinates on any coordinate axis are different, the target bridge point coordinates are determined based on the two adjacent circle center coordinates and the multiple vertex coordinates corresponding to the two adjacent circle center coordinates, so as to determine the area formed by the multiple vertex coordinates corresponding to the two adjacent circle center coordinates and the target bridge point coordinates as a unit discretization area; S603 , traversing a plurality of circle center coordinates to obtain a plurality of unit discretization regions, so as to determine the plurality of unit discretization regions as discretization editing regions.

[0058] As an example, in step S601, when the coordinate values ​​of two adjacent circle center coordinates on at least one coordinate axis are the same, it means that at the adjacent moments corresponding to the two adjacent circle center coordinates, the unit editing track may move horizontally, vertically, or not move at all. At this time, since the unit pixel grids occupied by the unit editing track are all complete unit pixel grids, the area formed by the multiple vertex coordinates corresponding to the two adjacent circle center coordinates can be directly determined as the unit discretization area. Specifically, when the coordinate values ​​of the two coordinate axes of two adjacent circle center coordinates are the same, it means that the unit editing track has not moved at the adjacent moments. At this time, the area formed by the multiple vertex coordinates corresponding to the unit editing track can be determined as the unit discretization area. For example, Figure 13 The area formed by the coordinate points shown in (a) is determined as the unit discretization area.

[0059] Specifically, when the coordinate values ​​of one coordinate axis of two adjacent circle center coordinates are the same, it means that the unit editing track moves in the horizontal direction or in the vertical direction at adjacent moments. At this time, the area formed by the multiple vertex coordinates corresponding to the two circle center coordinates can be determined as the unit discretization area. For example, Figure 13 The region shown in (b) is determined as the unit discretization region.

[0060] As an example, in step S602, when the coordinate values ​​of two adjacent circle center coordinates on any coordinate axis are different, it means that at adjacent moments, the unit editing track moves along a diagonal line, for example Figure 3 As shown in (a), at this time, if the area formed by the multiple vertex coordinates corresponding to the two circle center coordinates is directly determined as the unit discretization area, the situation of occupying incomplete unit pixel grids will appear. Therefore, it is necessary to establish the target bridge point coordinates in the area where the incomplete unit pixel grid appears to be occupied, so as to ensure that the unit discretization area formed by multiple vertex coordinates and the target bridge point coordinates does not have an incomplete unit pixel grid.

[0061] Specifically, if Figure 14 As shown, step S602 determines the target bridge point coordinates based on the coordinates of two adjacent circle centers and the coordinates of multiple vertices corresponding to the two adjacent circle center coordinates, including: S701, determining the vertex coordinates with the longest vertical distance from the first straight line among the corresponding multiple vertex coordinates as the tangent point coordinates, where the first straight line passes through the coordinates of the centers of two adjacent circles; S702, based on the tangent point coordinates, determining a plurality of candidate bridge point coordinates corresponding to each tangent point coordinate, wherein the candidate bridge point coordinates are coordinates of the tangent point coordinates shifted by one unit pixel along the coordinate axis direction close to the adjacent tangent point coordinates; S703, determining a plurality of second straight lines based on the tangent point coordinates and the coordinates of the plurality of candidate bridge points, where the second straight lines are straight lines passing through the tangent point coordinates and the coordinates of the candidate bridge points; S704: Determine the target bridge point coordinates from the candidate bridge point coordinates based on the angle between the first straight line and multiple second straight lines, wherein the angle between the second straight line corresponding to the target bridge point coordinates and the first straight line is the smallest among the multiple angles.

[0062] As an example, in step S701, the unit editing trajectory moves along a diagonal line. At this time, when the vertex coordinates move along the diagonal line, there will be a situation where they cross a unit pixel grid diagonally. Specifically, the vertex coordinates on the outermost side of the unit editing trajectory (i.e., the tangent coordinates) will be the farthest away from the motion trajectory of the center coordinates (i.e., the first straight line), resulting in an area of ​​incomplete unit pixel grids appearing in the motion trajectory (the area of ​​incomplete unit pixel grids will be composed of two adjacent tangent coordinates and a vertex coordinate between the two tangent coordinates). Therefore, in order to eliminate the area of ​​incomplete unit pixel grids in the motion trajectory, it is necessary to determine the vertex coordinates that are the farthest vertical distance from the first straight line.

[0063] For example, Figure 3 As shown in (a), the area occupying the incomplete unit pixel grid includes the triangular area formed by the tangent point A2, the tangent point C2 and the vertex C1, the triangular area formed by the tangent point B1, the tangent point C2 and the vertex C3, the triangular area formed by the tangent point A4, the tangent point C5 and the vertex C6, and the triangular area formed by the tangent point B5, the tangent point C5 and the vertex C4.

[0064] As an example, in order to determine the vertex coordinates that cause the motion trajectory to occupy an incomplete unit pixel grid, the vertical distance between the vertex coordinates on the first straight line can be calculated, and the vertex coordinates with the farthest vertical distance from the first straight line can be determined as the vertex coordinates that cause the motion trajectory to occupy an incomplete unit pixel grid (i.e., the tangent point coordinates).

[0065] For example, Figure 3 Taking the coordinates of each vertex and the center of the circle shown in (b) as an example, the coordinates of the first straight line and the tangent point are as follows: Figure 15 As shown, the first straight line passes through the coordinates of the centers of two adjacent circles A3 and C7, and the coordinates of the tangent points can be determined to be A2, C2, B1, A4, C5 and B5.

[0066] As an example, in step S702, the candidate bridge point coordinates are the coordinates of the tangent point coordinates after being translated by one unit pixel along the coordinate axis direction close to the adjacent tangent point coordinates. In other words, each tangent point coordinate has two candidate bridge point coordinates.

[0067] For example Figure 15 As shown, the candidate bridge point coordinates of the tangent point A2 may include: the coordinates of the tangent point A2 moved by one unit along the positive direction of the X axis; and the coordinates of the tangent point A2 moved by one unit along the negative direction of the Y axis.

[0068] As an example, in step S703, each tangent point coordinate may be connected to the candidate bridge point coordinate corresponding to the tangent point coordinate via a straight line, and the straight line connecting the tangent point coordinate and the candidate bridge point coordinate is determined as the second straight line.

[0069] It should be understood that there can be at most two second straight lines for each tangent point coordinate.

[0070] As an example, in step S704, since the first straight line is inclined and the second straight line is vertical or horizontal, there must be an angle between the first straight line and the second straight line. Therefore, the smaller the angle between the first straight line and the second straight line, the closer the candidate bridge point coordinates corresponding to the second straight line are to the tangent point coordinates. Therefore, in order to improve the accuracy of the map trajectory, the candidate bridge point coordinates closest to the tangent point coordinates can be determined as the target bridge point coordinates.

[0071] It should be understood that if the angles between the second straight line and the first straight line corresponding to multiple candidate bridge point coordinates are the same, any one of the multiple candidate bridge point coordinates can be selected as the target bridge point coordinate.

[0072] It should be understood that two adjacent tangent point coordinates can be bridged by one target bridging point coordinate or multiple target bridging point coordinates. In other words, when two adjacent tangent points cannot be connected to a target bridging point coordinate by a horizontal or vertical line segment, it is necessary to repeat the method described between steps S701 and S704 above to determine another target bridging point coordinate between the target bridging point coordinate and the tangent point coordinate that cannot be connected to the target bridging point coordinate by a horizontal or vertical line segment until the tangent point coordinate can be connected to the target bridging point coordinate by a horizontal or vertical line segment.

[0073] As an example, in step S603 , multiple circle center coordinates may be traversed, and two adjacent circle center coordinates may be grouped together to calculate and obtain multiple unit discretization regions, and the multiple unit discretization regions may be determined as discretization editing regions.

[0074] In the present invention, the motion trajectory is discretized into a sequence of operating point coordinates, so that a discretized editing area that only occupies a portion of the pixel grid is generated according to the operating point coordinate sequence. Thus, a map trajectory without intermediate grayscale and fuzzy boundaries is generated through regional binary editing operations, thereby improving the clarity and recognizability of the map trajectory.

[0075] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0076] In one embodiment, a grid map editing device is provided, which corresponds to the grid map editing method in the above embodiment. Figure 16 As shown, the grid map editing device includes an acquisition unit 801, a discretization unit 802, a first generation unit 803 and a second generation unit 804. The functional modules are described in detail as follows: An acquisition unit 801 is used to acquire a continuous motion trajectory of a map editing tool in a grid map; The discretization unit 802 is used to discretize the motion trajectory into a sequence of operation point coordinates; A first generating unit 803 is configured to generate a corresponding discretized editing area based on the operation point coordinate sequence; The second generating unit 804 is configured to perform a regionalized binary editing operation based on the discretized editing area to generate a map track without intermediate grayscale.

[0077] In one embodiment, the acquisition unit 801 is specifically configured to: Determine the center fill cell of the map editing tool based on the current coordinates of the map editing tool on the grid map; Determine the unit editing trajectory of the continuous motion trajectory based on the circle center filling unit and the preset pixel value of the map editing tool; Determines the continuous movement trajectory of map editing tools based on unit editing tracks.

[0078] In one embodiment, the acquisition unit 801 is further configured to: Based on the current coordinates, determine the center coordinates of the map editing tool; Based on the circle center coordinates and the preset side length, the circle center filling unit of the map editing tool is determined. The circle center filling unit is a square unit with the circle center coordinates as the vertex, and the square unit contains the current coordinates.

[0079] In one embodiment, the acquisition unit 801 is further configured to: Determine the radius of the unit editing track based on the preset pixel value of the map editing tool; Take the center-filled cell as the center and make a circle based on the radius; Based on the circle center fill unit, the unit fill unit of the map editing tool is determined. The unit fill unit has the same shape as the circle center fill unit. Based on the circle, with the center filling unit as the center, use the unit filling unit to fill around the center filling unit to obtain the unit editing trajectory. The side length of the unit filling unit coincides with the side length of the center filling unit, or the side length of the unit filling unit coincides with the side length of the unit filling unit, and the overlapping area between the unit filling unit and the circle is greater than the preset area threshold.

[0080] In one embodiment, the discrete unit 802 is specifically configured to: Discretize the motion trajectory to determine the unit editing trajectory corresponding to multiple moments, and determine the vertex coordinates and circle center coordinates corresponding to each unit editing trajectory, where the vertex coordinates are the coordinates of the vertex of the unit editing trajectory; The vertex coordinates and the circle center coordinates are determined as the operation point coordinate sequence.

[0081] In one embodiment, the first generating unit 803 is specifically configured to: Based on the operation point coordinate sequence, the corresponding discretized editing area is generated, including: When the coordinate values ​​of two adjacent circle center coordinates on at least one coordinate axis are the same, an area formed by the coordinates of multiple vertices corresponding to the two adjacent circle center coordinates is determined as a unit discretization area; When the coordinate values ​​of two adjacent circle center coordinates on any coordinate axis are different, the target bridge point coordinates are determined based on the two adjacent circle center coordinates and the multiple vertex coordinates corresponding to the two adjacent circle center coordinates, so that the area formed by the multiple vertex coordinates corresponding to the two adjacent circle center coordinates and the target bridge point coordinates is determined as a unit discretization area; A plurality of circle center coordinates are traversed to obtain a plurality of unit discretization regions, so as to determine the plurality of unit discretization regions as discretization editing regions.

[0082] In one embodiment, the first generating unit 803 is further configured to: The vertex coordinates with the longest vertical distance from the first straight line among the corresponding multiple vertex coordinates are determined as the tangent point coordinates, and the first straight line passes through the coordinates of the centers of two adjacent circles; Based on the tangent point coordinates, multiple candidate bridge point coordinates corresponding to each tangent point coordinate are determined, where the candidate bridge point coordinates are the coordinates of the tangent point coordinates after being translated by one unit pixel along the coordinate axis direction close to the adjacent tangent point coordinates; Determine a plurality of second straight lines based on the tangent point coordinates and the plurality of candidate bridge point coordinates, where the second straight lines are straight lines passing through the tangent point coordinates and the candidate bridge point coordinates; The target bridge point coordinates are determined from the candidate bridge point coordinates based on the angles between the first straight line and multiple second straight lines, wherein the angle between the second straight line corresponding to the target bridge point coordinates and the first straight line is the smallest among the multiple angles.

[0083] The present invention provides a raster map editing device, comprising: an acquisition unit for acquiring the continuous motion trajectory of a map editing tool within a raster map; a discretization unit for discretizing the motion trajectory into a sequence of operating point coordinates; a first generation unit for generating a corresponding discretized editing region based on the sequence of operating point coordinates; and a second generation unit for performing a regionalized binary editing operation based on the discretized editing region to generate a map trajectory free of intermediate grayscale. In the present invention, by discretizing the motion trajectory into a sequence of operating point coordinates, a discretized editing region free of partially occupied pixel grids is generated based on the sequence of operating point coordinates. Thus, through the regionalized binary editing operation, a map trajectory free of intermediate grayscale and fuzzy boundaries is generated, thereby improving the clarity and recognizability of the map trajectory.

[0084] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 17 As shown. The computer device includes a processor, memory, network interface and database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used for data used in the raster map editing method. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a raster map editing method is implemented.

[0085] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned resource data processing method based on a micro-isolation network when executing the computer program.

[0086] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned resource data processing method based on a micro-isolation network.

[0087] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0088] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0089] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A grid map editing method, characterized in that: include: Get the continuous movement trajectory of the map editing tool in the raster map; discretizing the motion trajectory into a sequence of operating point coordinates; Based on the operation point coordinate sequence, generating a corresponding discretized editing area; Based on the discretized editing area, a regionalized binary editing operation is performed to generate a map trajectory without intermediate grayscale.

2. The method according to claim 1, characterized in that The obtaining of the continuous motion trajectory of the map editing tool in the grid map includes: Determining a center fill cell of the map editing tool based on the current coordinates of the map editing tool on the grid map; determining a unit editing trajectory of the continuous motion trajectory based on the circle center filling unit and a preset pixel value of the map editing tool; Based on the unit editing trajectory, a continuous movement trajectory of the map editing tool is determined.

3. The method according to claim 2, characterized in that The determining of the center filling unit of the map editing tool based on the current coordinates of the map editing tool on the grid map includes: Determining the center coordinates of the map editing tool based on the current coordinates; Based on the circle center coordinates and the preset side length, a circle center filling unit of the map editing tool is determined, where the circle center filling unit is a square unit with the circle center coordinates as vertices, and the square unit contains the current coordinates.

4. The method according to claim 2, characterized in that The determining of the unit editing trajectory of the continuous motion trajectory based on the circle center filling unit and the preset pixel value of the map editing tool includes: determining a radius of the unit editing track based on a preset pixel value of the map editing tool; Taking the center filling unit as the center, draw a circle based on the radius; Determining a unit filling unit of the map editing tool based on the circle center filling unit, wherein the unit filling unit has the same shape as the circle center filling unit; Based on the circle, with the center filling unit as the center, the unit filling unit is used to fill around the center filling unit to obtain the unit editing trajectory, the side length of the unit filling unit coincides with the side length of the center filling unit, or the side length of the unit filling unit coincides with the side length of the unit filling unit, and the overlapping area between the unit filling unit and the circle is greater than a preset area threshold.

5. The method according to claim 1, wherein Discretizing the motion trajectory into an operating point coordinate sequence includes: Discretize the motion trajectory to determine unit editing trajectories corresponding to a plurality of moments, and determine vertex coordinates and circle center coordinates corresponding to each unit editing trajectory, where the vertex coordinates are the coordinates of the vertex of the unit editing trajectory; The vertex coordinates and the circle center coordinates are determined as the operation point coordinate sequence.

6. The method according to claim 1, characterized in that The operation point coordinate sequence includes a plurality of vertex coordinates and a plurality of circle center coordinates; The step of generating a corresponding discretized editing area based on the operation point coordinate sequence includes: When the coordinate values ​​of two adjacent circle center coordinates on at least one coordinate axis are the same, an area formed by the coordinates of multiple vertices corresponding to the two adjacent circle center coordinates is determined as a unit discretization area; When the coordinate values ​​of the two adjacent circle center coordinates on any coordinate axis are different, determining the target bridge point coordinates based on the two adjacent circle center coordinates and the multiple vertex coordinates corresponding to the two adjacent circle center coordinates, so as to determine the area formed by the multiple vertex coordinates corresponding to the two adjacent circle center coordinates and the target bridge point coordinates as a unit discretization area; The plurality of circle center coordinates are traversed to obtain a plurality of the unit discretization regions, so as to determine the plurality of the unit discretization regions as the discretization editing regions.

7. The method according to claim 6, characterized in that The determining the target bridge point coordinates based on the two adjacent circle center coordinates and the multiple vertex coordinates corresponding to the two adjacent circle center coordinates includes: Determine the coordinates of the vertex with the longest vertical distance from the first straight line among the corresponding multiple vertex coordinates as the tangent point coordinates, where the first straight line passes through the coordinates of the two adjacent circle centers; Based on the tangent point coordinates, determining a plurality of candidate bridge point coordinates corresponding to each of the tangent point coordinates, the candidate bridge point coordinates being coordinates of the tangent point coordinates shifted by one unit pixel along a coordinate axis direction close to an adjacent tangent point coordinate; determining a plurality of second straight lines based on the tangent point coordinates and the plurality of candidate bridge point coordinates, wherein the second straight lines are straight lines passing through the tangent point coordinates and the candidate bridge point coordinates; Based on the angle between the first straight line and multiple second straight lines, the target bridge point coordinates are determined from the candidate bridge point coordinates, wherein the angle between the second straight line corresponding to the target bridge point coordinates and the first straight line is the smallest among the multiple angles.

8. A grid map editing device, characterized in that: include: An acquisition unit, used for acquiring a continuous motion trajectory of a map editing tool in a grid map; A discrete unit, configured to discretize the motion trajectory into a sequence of operating point coordinates; A first generating unit, configured to generate a corresponding discretized editing area based on the operation point coordinate sequence; The second generating unit is configured to perform a regionalized binary editing operation based on the discretized editing area to generate a map trajectory without intermediate grayscale.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the grid map editing method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the grid map editing method according to any one of claims 1 to 7 is implemented.