A method for updating terrain height points in irregular areas and an updating processing unit

By selecting pixel points in irregular areas in a large terrain system to form an enclosing rectangle and deleting pixel points that are not in the area, the problems of large computational complexity and poor scalability in the existing technology are solved, and the rapid update of terrain points in irregular areas is achieved.

CN113763554BActive Publication Date: 2025-09-09XIAMEN HLWYMOBI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111063891.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2025-09-09
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

When updating the height of terrain points in irregular areas in large-scale terrain systems, the existing technology has a large amount of calculation and poor scalability, and cannot achieve real-time dynamic height update.

Method used

By reading the first terrain grayscale map and the second terrain grayscale map, the outermost pixel points of the irregular area are selected to form an outline, a circumscribed rectangle is established, the pixel points within the circumscribed rectangle are traversed, the pixel points not in the irregular area are deleted, the position of the irregular area in the second terrain grayscale map is determined, and the grayscale value is updated.

Benefits of technology

It realizes the rapid selection of irregular areas, the extraction of point data in irregular areas and the update of map data, thus improving processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113763554B_ABST
    Figure CN113763554B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for updating terrain height points in an irregular area and an update processing unit. The method comprises the following steps: reading a first terrain grayscale map and a second terrain grayscale map, wherein the first terrain grayscale map is a local update map of the second terrain grayscale map; selecting point position information of the outermost pixel points of the irregular area from the first terrain grayscale map according to external input to form a set of pixel points of the irregular area outline; establishing a circumscribed rectangle of the irregular area; traversing each pixel point within the circumscribed rectangle, removing pixel points that are not within the irregular area outline, and obtaining a set of pixel points of the irregular area; determining the position of the irregular area in the second terrain grayscale map; traversing the set of pixel points of the irregular area, and updating the grayscale value of each pixel point of the irregular area to the second terrain grayscale map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of terrain data processing, and in particular to a method for updating terrain height points in irregular areas and an updating processing unit. Background Art

[0002] As mining progresses, the topographic map of the mining area needs to be updated promptly to guide production. The existing mining area topography processing method is to select the mining area, regularly photograph the mining area, and generate a digital terrain model (DTM) such as a topographic grayscale map of the mining area. This is then constructed as a virtual mining area, and the topographic map of the virtual mining area is updated according to the mining progress.

[0003] In such Figure 1 In the example, the virtual mining system uses terrain grayscale maps (i.e., terrain height values ​​are represented by the grayscale values ​​of pixels) for data storage. Previously, modifying the height of terrain points in irregular areas required inputting the grayscale values ​​of all pixels in the terrain block including the irregular area. Extracting the pixels in irregular areas is key to the solution. Modifying pixel grayscale values ​​through an exhaustive enumeration approach is computationally intensive and has poor scalability, making it unsuitable for real-time dynamic height updates in large-scale terrain systems. Summary of the Invention

[0004] In view of the above-mentioned defects of the prior art, the purpose of the present invention is to provide a method for updating terrain height points in irregular areas and an update processing unit, which can quickly select irregular areas and extract point data in irregular areas and update map data.

[0005] To achieve the above object, the present invention provides a method for updating terrain height points in an irregular area, comprising the following steps:

[0006] Step S10: reading a first terrain grayscale map and a second terrain grayscale map, wherein the first terrain grayscale map is a local update map of the second terrain grayscale map;

[0007] Step S20: selecting the pixel information of the outermost layer of the irregular area from the first terrain grayscale image according to the external input to form a set of pixel points of the irregular area outline;

[0008] Step S30: establishing a bounding rectangle of the irregular area; writing the position information of the pixel points in the first terrain grayscale image that are located within the bounding rectangle into a pixel point set of the bounding rectangle;

[0009] Step S40: traversing each pixel point within the circumscribed rectangular pixel point set, removing the pixel points that are not within the irregular region outline, and obtaining the point position information of all pixel points within the irregular region outline, i.e., the irregular region pixel point set;

[0010] Step S50: determining the position of the irregular area in the second terrain grayscale map according to the positional relationship between the first terrain grayscale map and the second terrain grayscale map;

[0011] Step S60: traverse the set of pixels in the irregular area, and update the grayscale value of each pixel in the irregular area to the second terrain grayscale map.

[0012] Furthermore, the step S30 includes: extracting the maximum and minimum values ​​Xmin, Xmax of the x coordinates and the maximum and minimum values ​​Ymin, Ymax of the y coordinates of each pixel point from the irregular area contour pixel point set; establishing the bounding rectangle of the irregular area with the coordinate point (Xmin, Ymin) and the coordinate point (Xmax, Ymax) as diagonal points; and writing the point position information of the pixel points located within the bounding rectangle in the first terrain grayscale map into the bounding rectangle pixel point set.

[0013] Furthermore, the step S40 includes: traversing each pixel point within the circumscribed rectangle, and during the traversal, executing for each pixel point: according to the coordinates (Xi, Yi) of the pixel point, retrieving the pixel point whose x coordinate value is equal to Xi in the irregular area contour pixel point set; when the number of pixel points whose y coordinate is greater than Yi is an even number, or the number of pixel points whose y coordinate is less than Yi is an even number, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the irregular area pixel point set.

[0014] Furthermore, between step S30 and step S40, step S35 is further included: dividing the bounding rectangle into a plurality of sub-bounding rectangles according to a set size, writing pixel point information within each sub-bounding rectangle into a corresponding sub-bounding rectangle pixel point set, and placing the pixels into different threads for concurrent execution: solving the intersection of each sub-bounding rectangle and the outline of the irregular area, identifying the four corner points of the sub-bounding rectangle, determining which of the four corner points belong to the irregular area, determining which of the two or more partitions of the sub-bounding rectangle belongs to the irregular area based on the position information of the four corner points and the outline of the irregular area within the sub-bounding rectangle, selecting the outline of the irregular area partition, and forming a sub-irregular area outline pixel point set;

[0015] In each sub-circumscribed rectangle, the sub-irregular region outline pixel point set is used as the irregular region outline pixel point set, and the sub-circumscribed rectangle pixel point set is used as the circumscribed rectangle pixel point set, and step S40 is executed.

[0016] Furthermore, the step S40 includes:

[0017] Each pixel point within the circumscribed rectangle is traversed, and during the traversal, the following is executed for each pixel point: according to the coordinates (Xi, Yi) of the pixel point, the pixel point whose y coordinate is equal to Yi in the set of pixel points of the irregular area outline is retrieved; when the number of pixel points whose x coordinate is greater than Xi is an even number, or the number of pixel points whose x coordinate is less than Xi is an even number, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the set of pixel points of the irregular area.

[0018] Furthermore, step S50 specifically includes: obtaining the position (X1, Y1) of the origin (0, 0) of the first terrain grayscale map in the second terrain grayscale map, and determining the position (Xmin', Ymin') of the origin (Xmin, Ymin) of the circumscribed rectangle of the irregular area in the second terrain grayscale map, where Xmin'=Xmin+X1, Ymin'=Ymin+Y1.

[0019] To achieve the above-mentioned purpose, the present invention further proposes an updating processing unit for terrain height points in irregular areas, comprising:

[0020] A data reading unit, configured to read a first terrain grayscale map and a second terrain grayscale map, wherein the first terrain grayscale map is a local update map of the second terrain grayscale map;

[0021] An irregular area contour selection unit, configured to select, based on external input, point information of the outermost pixel points of the irregular area from the first terrain grayscale image to form a set of irregular area contour pixel points;

[0022] a circumscribed rectangle establishing unit, configured to extract the maximum and minimum x-coordinate values ​​Xmin and Xmax and the maximum and minimum y-coordinate values ​​Ymin and Ymax of each pixel point from the irregular area outline pixel point set; establish a circumscribed rectangle of the irregular area using the coordinate points (Xmin, Ymin) and (Xmax, Ymax) as diagonal points; and write the position information of the pixel points within the circumscribed rectangle in the first terrain grayscale image into the circumscribed rectangle pixel point set;

[0023] an out-of-contour pixel point deletion unit, configured to traverse each pixel point within the circumscribed rectangular pixel point set, remove pixel points that are not within the irregular area contour, and obtain point position information of all pixel points within the irregular area contour, i.e., the irregular area pixel point set;

[0024] a map positioning unit, configured to determine, based on a positional relationship between the first terrain grayscale map and the second terrain grayscale map, a position of the irregular area in the second terrain grayscale map, i.e., a starting write address of a set of pixels in the irregular area;

[0025] and a data writing unit, configured to traverse the set of pixels in the irregular area and update the grayscale value of each pixel in the irregular area into the second terrain grayscale map.

[0026] Furthermore, the out-of-contour pixel deletion unit performs the following steps:

[0027] Each pixel point within the circumscribed rectangle is traversed, and during the traversal, the following is executed for each pixel point: according to the coordinates (Xi, Yi) of the pixel point, the pixel point whose x coordinate value is equal to Xi in the set of pixel points of the irregular area outline is retrieved; when the number of pixel points whose y coordinate is greater than Yi is an even number, or the number of pixel points whose y coordinate is less than Yi is an even number, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the set of pixel points of the irregular area.

[0028] Furthermore, the pixel point deletion unit outside the contour performs the following steps: traverses each pixel point within the circumscribed rectangle, and during the traversal, performs the following steps on each pixel point: according to the coordinates (Xi, Yi) of the pixel point, retrieves the pixel point whose y coordinate is equal to Yi in the irregular area contour pixel point set; when the x coordinate of the pixel point is greater than the number of pixel points Xi, which is an even number, or the x coordinate of the pixel point is less than the number of pixel points Xi, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the irregular area pixel point set.

[0029] The present invention achieves the following technical effects:

[0030] The present invention can quickly select irregular areas, extract point data in irregular areas and update map data by extracting contour data of irregular areas, establishing circumscribed rectangles and deleting pixels outside the contours. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a comparison chart of a terrain grayscale map and a terrain point grid map of an example terrain;

[0032] Figure 2 is a flowchart of updating the height points of the irregular area terrain of the present invention;

[0033] Figure 3 It is a schematic diagram of irregular terrain points, contours and circumscribed rectangles;

[0034] Figure 4 This is a schematic diagram for screening irregular terrain points;

[0035] Figure 5 It is a graphical diagram for extracting and updating irregular terrain;

[0036] Figure 6 This is a data flow diagram of the updating processing unit of the irregular area terrain height point of the present invention. DETAILED DESCRIPTION

[0037] To further illustrate various embodiments, the present invention is provided with accompanying drawings. These drawings form part of the present disclosure and are primarily used to illustrate the embodiments and, in conjunction with the relevant description in the specification, to explain the operating principles of the embodiments. By referring to these drawings, one of ordinary skill in the art will understand other possible embodiments and the advantages of the present invention. The components in the figures are not drawn to scale, and similar reference numerals are generally used to represent similar components.

[0038] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.

[0039] like Figure 2-Figure 5 As shown, the present invention provides a method for updating terrain height points in an irregular area, comprising the following steps:

[0040] Step S10: reading a first terrain grayscale map and a second terrain grayscale map, wherein the first terrain grayscale map is a local update map of the second terrain grayscale map;

[0041] Step S20: selecting the pixel information of the outermost layer of the irregular area from the first terrain grayscale image according to the external input to form a set of pixel points of the irregular area outline;

[0042] Step S30: establishing a bounding rectangle of the irregular area; writing the position information of the pixel points in the first terrain grayscale image that are located within the bounding rectangle into a pixel point set of the bounding rectangle;

[0043] Step S40: traversing each pixel point within the circumscribed rectangular pixel point set, removing the pixel points that are not within the irregular region outline, and obtaining the point position information of all pixel points within the irregular region outline, i.e., the irregular region pixel point set;

[0044] Step S50: determining the position of the irregular area in the second terrain grayscale map according to the positional relationship between the first terrain grayscale map and the second terrain grayscale map;

[0045] Step S60: traverse the set of pixels in the irregular area, and update the grayscale value of each pixel in the irregular area to the second terrain grayscale map.

[0046] In this embodiment, the specific method of step S30 is: extracting the maximum and minimum values ​​Xmin, Xmax of the x coordinates and the maximum and minimum values ​​Ymin, Ymax of the y coordinates of each pixel point from the set of pixel points of the irregular area outline; establishing the bounding rectangle of the irregular area with the coordinate point (Xmin, Ymin) and the coordinate point (Xmax, Ymax) as diagonal points; and writing the point position information of the pixel points located within the bounding rectangle in the first terrain grayscale map into the bounding rectangle pixel point set.

[0047] In this embodiment, the specific method of step S40 is:

[0048] Each pixel point within the circumscribed rectangle is traversed, and during the traversal, the following is executed for each pixel point: according to the coordinates (Xi, Yi) of the pixel point, the pixel point whose x coordinate value is equal to Xi in the pixel point set of the contour is retrieved; when the number of pixel points whose y coordinate is greater than Yi is an even number, or the number of pixel points whose y coordinate is less than Yi is an even number, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the pixel point set of the irregular area.

[0049] You can also retrieve the pixel point whose y coordinate is equal to Yi in the combination of the irregular area contour pixel points. When the x coordinate of the pixel point is greater than the number of pixel points Xi, which is an even number, or the x coordinate of the pixel point is less than the number of pixel points Xi, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the irregular area pixel point set.

[0050] like Figure 4 Point A is outside the irregular area, and point B is outside the irregular area, which can be accurately identified by the above method.

[0051] The method used in step S40 is essentially the Pnpoly algorithm. If the irregular area is particularly large, its bounding rectangle will also increase accordingly, and the processing time of deleting points that are not in the irregular area from the irregular area pixel set by traversing will increase.

[0052] To this end, between step S30 and step S40, the following steps are further included:

[0053] Divide the bounding rectangle of the irregular area into multiple sub-bounding rectangles (or equally divided into multiple rectangles) according to the set size, and perform the following operations on each sub-bounding rectangle:

[0054] (1) writing pixel point information within the sub-circumscribed rectangle into the sub-circumscribed rectangle pixel point set;

[0055] (2) Solve the intersection of each sub-circumscribed rectangle and the irregular area outline, identify the four corner points of the sub-circumscribed rectangle, determine which of the four corner points belong to the irregular area, and determine which partitions of the sub-circumscribed rectangle belong to the irregular area based on the position information of the four corner points and the irregular area outline within the sub-circumscribed rectangle. Select the outline of the irregular area partition to form a sub-irregular area outline pixel point set within the sub-circumscribed rectangle.

[0056] In each sub-circumscribed rectangle, the sub-irregular region outline pixel point set is used as the irregular region outline pixel point set, and the sub-circumscribed rectangle pixel point set is used as the circumscribed rectangle pixel point set, and step S40 is executed.

[0057] Through concurrent processing, the speed of deleting points outside irregular areas can be greatly accelerated.

[0058] like Figure 5 As shown, step S50 specifically includes: obtaining the position (X1, Y1) of the origin (0, 0) of the first terrain grayscale map P1 in the second terrain grayscale map P2, and determining the position (Xmin', Ymin') of the origin (Xmin, Ymin) of the circumscribed rectangle of the irregular area in the second terrain grayscale map, where Xmin'=Xmin+X1, Ymin'=Ymin+Y1.

[0059] like Figure 6 As shown, in this embodiment, the present invention further proposes an updating processing unit for irregular area terrain height points, comprising:

[0060] A data reading unit, configured to read a first terrain grayscale map and a second terrain grayscale map, wherein the first terrain grayscale map is a local update map of the second terrain grayscale map;

[0061] An irregular area contour selection unit, configured to select, based on external input, point information of the outermost pixel points of the irregular area from the first terrain grayscale image to form a set of irregular area contour pixel points;

[0062] A bounding rectangle establishing unit is configured to establish a bounding rectangle of the irregular area; write the position information of the pixel points in the first terrain grayscale image that are located within the bounding rectangle into a pixel point set of the bounding rectangle;

[0063] an out-of-contour pixel point deletion unit, configured to traverse each pixel point within the circumscribed rectangular pixel point set, remove pixel points that are not within the irregular area contour, and obtain point position information of all pixel points within the irregular area contour, i.e., the irregular area pixel point set;

[0064] a map positioning unit, configured to determine, based on a positional relationship between the first terrain grayscale map and the second terrain grayscale map, a position of the irregular area in the second terrain grayscale map, i.e., a starting write address of a set of pixels in the irregular area;

[0065] and a data writing unit, configured to traverse the set of pixels in the irregular area and update the grayscale value of each pixel in the irregular area into the second terrain grayscale map.

[0066] In this embodiment, the circumscribed rectangle establishing unit executes the method of step S30 above.

[0067] In this embodiment, the out-of-contour pixel deletion unit executes the method of step S40 above.

[0068] The present invention can quickly select irregular areas, extract point data in irregular areas and update map data by extracting contour data of irregular areas, establishing circumscribed rectangles and deleting pixels outside the contours.

[0069] Although the present invention has been particularly shown and described in conjunction with preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made to the present invention without departing from the spirit and scope of the invention as defined in the appended claims, and all such changes are within the scope of protection of the present invention.

Claims

1. A method for updating terrain height points in irregular areas, characterized in that: The following steps are involved: Step S10: reading a first terrain grayscale map and a second terrain grayscale map, wherein the first terrain grayscale map is a local update map of the second terrain grayscale map; Step S20: selecting the pixel information of the outermost layer of the irregular area from the first terrain grayscale image according to the external input to form a set of pixel points of the irregular area outline; Step S30: establishing a bounding rectangle of the irregular area; writing the position information of the pixel points in the first terrain grayscale image that are located within the bounding rectangle into a pixel point set of the bounding rectangle; Step S40: traversing each pixel point within the circumscribed rectangular pixel point set, removing the pixel points that are not within the irregular region outline, and obtaining the point position information of all pixel points within the irregular region outline, i.e., the irregular region pixel point set; Step S50: determining the position of the irregular area in the second terrain grayscale map according to the positional relationship between the first terrain grayscale map and the second terrain grayscale map; Step S60: traversing the set of pixels in the irregular area, and updating the grayscale value of each pixel in the irregular area to the second terrain grayscale map; The step S30 includes: extracting the maximum and minimum values ​​Xmin and Xmax of the x coordinates and the maximum and minimum values ​​Ymin and Ymax of the y coordinates of each pixel point from the irregular area outline pixel point set; establishing a bounding rectangle of the irregular area with the coordinate point (Xmin, Ymin) and the coordinate point (Xmax, Ymax) as diagonal points; and writing the point position information of the pixel points located within the bounding rectangle in the first terrain grayscale image into the bounding rectangle pixel point set; Between step S30 and step S40, step S35 is further included: dividing the bounding rectangle into a plurality of sub-bounding rectangles according to a set size, writing pixel point information within each sub-bounding rectangle into a corresponding sub-bounding rectangle pixel point set, and placing the pixels into different threads for concurrent execution: solving the intersection of each sub-bounding rectangle and the outline of the irregular area, identifying the four corner points of the sub-bounding rectangle, determining which of the four corner points belong to the irregular area, determining which of the two or more partitions of the sub-bounding rectangle belongs to the irregular area based on the position information of the four corner points and the outline of the irregular area within the sub-bounding rectangle, selecting the outline of the irregular area partition, and forming a sub-irregular area outline pixel point set; In each sub-circumscribed rectangle, the sub-irregular region outline pixel point set is used as the irregular region outline pixel point set, and the sub-circumscribed rectangle pixel point set is used as the circumscribed rectangle pixel point set, and step S40 is executed; The step S40 includes: Each pixel point within the circumscribed rectangle is traversed, and during the traversal, the following is performed on each pixel point: according to the coordinates (Xi, Yi) of the pixel point, the pixel point whose x coordinate value is equal to Xi in the set of pixel points of the irregular area outline is retrieved; when the number of pixel points whose y coordinate is greater than Yi is an even number, or the number of pixel points whose y coordinate is less than Yi is an even number, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the set of pixel points of the irregular area.

2. The method for updating the height points of the irregular area terrain according to claim 1, characterized in that: The step S40 includes: Each pixel point within the circumscribed rectangle is traversed, and during the traversal, the following is performed on each pixel point: according to the coordinates (Xi, Yi) of the pixel point, the pixel point whose y coordinate is equal to Yi in the set of pixel points of the irregular area outline is retrieved; when the number of pixel points whose x coordinate is greater than Xi is an even number, or the number of pixel points whose x coordinate is less than Xi is an even number, it is determined that the pixel point (Xi, Yi) is not in the irregular area, and the pixel point is removed from the set of pixel points of the irregular area.

3. The method for updating the height points of the irregular area terrain according to claim 1, characterized in that: Step S50 specifically includes: obtaining the position (X1, Y1) of the origin (0, 0) of the first terrain grayscale image in the second terrain grayscale image, and determining the position (Xmin', Ymin') of the origin (Xmin, Ymin) of the circumscribed rectangle of the irregular area in the second terrain grayscale image, where Xmin'=Xmin+X1, Ymin'=Ymin+Y1.

Citation Information

Patent Citations

  • Updating method and device of topographic map of mining area

    CN109686226A

  • Method and device for determining interest points in irregular region and electric equipment

    CN109994038A

  • Change detection based map interface updating system

    CN110325981A