Method, device, electronic device, and readable storage medium for constructing a topographical map
By converting images to vector data and integrating terrain categories using a preset pattern, the method and apparatus enhance the accuracy and automation of topographic map construction, addressing the limitations of current map applications.
Patent Information
- Application Number
- JP2023514789
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-06-22
- Filing Date
- 2021-11-17
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2041-11-17
AI Technical Summary
Current map applications lack the ability to represent map information on a proportional scale of 25 km to 1000 km, resulting in a lack of topographical information, and conventional methods for constructing topographic maps are costly and have low accuracy.
A method and apparatus that convert images to vector data, integrating vector shapes corresponding to different terrain categories using a preset topographic pattern to construct topographic maps, enhancing automation and accuracy.
The method and apparatus improve the accuracy and status quo of constructed topographic maps by automating the conversion from grid data to vector data, ensuring precise representation of topographical features.
Smart Images

Figure 0007568183000001 
Figure 0007568183000002 
Figure 0007568183000003
Abstract
Description
[Technical field]
[0001] This application claims priority to a Chinese patent application having a filing date of June 22, 2021, application number 202110694174.2, and invention title "Method, apparatus, electronic device, and readable storage medium for constructing a topographical map." FIELD OF THE DISCLOSURE The present disclosure relates to the field of computer technology, and in particular to the field of image processing technology. A method, an apparatus, an electronic device, and a readable storage medium for constructing a topographical map are provided. [Background technology]
[0002] Current map applications lack representation of map information at a proportional scale of 25km-1000km, and lack of topographical information. In the past, when constructing maps containing topographical information, there were problems with the high cost of artificial drawing and the low accuracy of topographical features. Summary of the Invention [Means for solving the problem]
[0003] According to a first aspect of the present disclosure, a method for constructing a topographical map is provided, comprising the steps of: acquiring an image to be processed, and acquiring a gradation image of the image to be processed; classifying each pixel in the gradation image based on a gradation value, and acquiring a binary image corresponding to different terrain categories; extracting a land patch contour of a land patch in the binary image, and acquiring a vector graphic set using the extracted land patch contour as a vector graphic; integrating vector graphics corresponding to the same terrain category in the vector graphic set based on position information, and acquiring a first topographical map based on the integration result corresponding to different terrain categories; and using a preset terrain pattern, mapping vector graphics corresponding to different terrain categories in the first topographical map, and using the mapping result as a second topographical map.
[0004] According to a second aspect of the present disclosure, an apparatus for constructing a topographical map is provided, comprising: an acquisition unit for acquiring an image to be processed and acquiring a gradation image of the image to be processed; a first processing unit for classifying each pixel in the gradation image based on a gradation value and acquiring a binary image corresponding to different terrain categories; an extraction unit for extracting a land patch contour of a land patch in the binary image and acquiring a vector graphic set using the extracted land patch contour as a vector graphic; an integration unit for integrating vector graphics corresponding to the same terrain category in the vector graphic set based on position information and acquiring a first topographical map based on the integration result corresponding to different terrain categories; and a mapping unit for using a predetermined terrain pattern to map vector graphics corresponding to different terrain categories in the first topographical map and making the mapping result a second topographical map.
[0005] According to a third aspect of the present disclosure, there is provided an electronic device comprising at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor causes the at least one processor to perform the above-mentioned method.
[0006] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer instructions stored thereon, the computer instructions causing the computer to perform the method set forth above.
[0007] According to a fifth aspect of the present disclosure, there is provided a computer program product, comprising a computer program which, when executed by a processor, realises the above method.
[0008] As can be seen from the above technical solution, in this embodiment, the image to be processed is first converted into vector data, and then the vector data is converted into a topographical map, thereby realizing automation in constructing the topographical map and improving the accuracy and currentness of the constructed topographical map.
[0009] It should be understood that the contents described herein are not intended to identify key or important features of the embodiments of the present disclosure, nor should they be used to limit the scope of the present disclosure. Other features of the present disclosure can be readily understood through the following specification. [Brief description of the drawings]
[0010] The drawings are for a better understanding of the present application and are not intended to limit the present application. [Figure 1] FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure. [Figure 3a] FIG. 11 is a schematic diagram according to a third embodiment of the present disclosure. [Figure 3b] FIG. 13 is a schematic diagram of a fourth embodiment of the present disclosure. [Figure 4] FIG. 13 is a schematic diagram according to a fifth embodiment of the present disclosure. [Diagram 5] FIG. 1 is a block diagram of an electronic device for implementing a method for constructing a terrain map according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, exemplary embodiments of the present application will be described based on the drawings. For ease of understanding, various details of the embodiments of the present application are included, and they should be regarded as merely examples. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of simplicity, the following description omits the description of well-known functions and structures.
[0012] FIG 1 is a schematic diagram according to a first embodiment of the present disclosure. As shown in FIG 1, the method for constructing a terrain map of the present embodiment can specifically include the following steps: S101, acquiring an image to be processed, acquiring a gradation image of the image to be processed; S102, classifying each pixel in the grayscale image according to the grayscale value to obtain a binary image corresponding to different terrain categories; S103, extracting land patch contours of the land patches in the binary image, and obtaining a vector graphic set by using the extracted land patch contours as vector graphics; S104, integrating the vector figures corresponding to the same terrain category in the vector figure collection based on the position information, and obtaining a first terrain map based on the integration results corresponding to different terrain categories; S105, using a preset terrain pattern, mapping vector shapes corresponding to different terrain categories in the first terrain map, and making the mapping result a second terrain map.
[0013] The method for constructing a topographical map in this embodiment includes obtaining binary images corresponding to different topographical categories based on the image to be processed, extracting the land patch contours of the land patches in each binary image to obtain a vector graphic set, completing the conversion from grid data to vector data, and then integrating each vector graphic in the vector graphic set to obtain a first topographical map. Finally, using a preset topographical pattern, each vector graphic in the first topographical map is mapped, and the obtained second topographical map is used as the construction result of the topographical map of the image to be processed, completing the conversion from vector data to a topographical map, thereby realizing automation when constructing a topographical map, and improving the accuracy and currentness of the constructed topographical map.
[0014] In this embodiment, when executing S101 to obtain the image to be processed, a remote sensing image can be obtained as the image to be processed, and the data type of the obtained image to be processed is grid data. In addition, in this embodiment, the number of images to be processed obtained by executing S101 may be one or more.
[0015] In this embodiment, when S101 is performed to obtain a gradation image of the image to be processed, downsampling and remapping processes are performed on the image to be processed to convert the color image to a gradation image, and in the obtained gradation image, each pixel can have a different gradation value.
[0016] In this embodiment, after executing S101 to obtain a gradation image of the image to be processed, S102 is executed to classify each pixel in the obtained gradation image based on the gradation value, and obtain a binary image corresponding to different terrain categories.
[0017] In this embodiment, the correspondence between the grayscale value and the terrain category is preset, and the terrain category corresponding to a pixel can be determined based on the grayscale value of the pixel.
[0018] Therefore, in this embodiment, when performing S102 to classify each pixel in the acquired gray scale image based on the gray scale value to obtain binary images corresponding to different terrain categories, an optional implementation method that can be used is to determine the gray scale value of each pixel in the gray scale image, and for each gray scale value, set the gray scale value of the pixel having that gray scale value in the gray scale image to 1, and set the gray scale value of the other pixels to 0, to obtain a binary image corresponding to that gray scale value, and the terrain category corresponding to that gray scale value is the terrain category of the binary image.
[0019] In other words, in this embodiment, after classifying each pixel in the gradation image based on the gradation value, multiple binary images corresponding to different terrain categories can be obtained based on the classification results, thereby achieving the purpose of distinguishing between different terrains and performing individual processing on data belonging to different terrain categories.
[0020] In this embodiment, after performing S102 to obtain binary images corresponding to different terrain categories, the method may further include a step of determining a binary image corresponding to a preset terrain category, and a step of processing the determined binary image using a processing scheme corresponding to the preset terrain category.
[0021] For example, in this embodiment, if the preset terrain category is "water body" and the processing method corresponding to "water body" is expansion / dilation, in this embodiment, first, a binary image having a terrain category of "water body" is determined, and then an expansion / dilation process is performed on the determined binary image.
[0022] In other words, in this embodiment, specific processing of specific terrain can be realized using a method of a preset terrain category, and the terrain of the preset terrain category can be emphasized in the constructed topographical map.
[0023] In this embodiment, S102 is performed to obtain binary images corresponding to different terrain categories, and then S103 is performed to extract land patch contours of land patches in the obtained binary images, and the extracted land patch contours are used as vector shapes to obtain a vector shape set, where a land patch in this embodiment is an area composed of pixels with a grayscale value of 1 in the binary image.
[0024] In this embodiment, before executing S103 to extract the land patch contours of the land patches in the binary image, preprocessing such as open operation and median filtering can be performed on the binary image. By performing the open operation on the binary image, the separate land patches in the binary image can be connected into one, and by performing median filtering on the binary image, tiny pixels in the binary image can be removed and the edges of the land patches can be smoothed.
[0025] In addition, in this embodiment, after performing S103 to extract and obtain the land patch contour, the following content can be further included: based on the coordinates of each pixel in the land patch contour, calculate a first coordinate of the contour, for example, calculate the wgs84 coordinate of the contour, and convert the calculated first coordinate into a second coordinate, for example, convert the wgs84 coordinate into Baidu09 coordinate, so as to realize contour coordinate conversion and coordinate encryption.
[0026] In this embodiment, after executing S103 to obtain a vector graphic set, S104 is executed to integrate vector graphics corresponding to the same terrain category in the vector graphic set based on location information, and a first topographical map is obtained based on the integration results corresponding to different terrain categories.
[0027] That is, in this embodiment, each vector graphic in the vector graphic collection obtained based on location information is restored, each vector graphic is restored to its actual location, and the obtained first topographical map includes vector graphics corresponding to different topographical categories.
[0028] In this embodiment, after performing S103 to obtain a first terrain map based on the integration results corresponding to different terrain categories, the method may further include a step of changing the terrain category of a vector graphic in the first terrain map whose area is smaller than a first preset threshold to the terrain category of an adjacent vector graphic whose area is larger than a second preset threshold.
[0029] In other words, in this embodiment, the terrain category of a small-area vector figure in the first topographical map is changed so that the terrain category of the small-area vector image is the same as the terrain category of the large-area vector figure adjacent to it, thereby further improving the accuracy and consistency of the constructed first topographical map.
[0030] In this embodiment, after executing S104 to obtain a first topographical map, execute S105 to use a pre-set topographical pattern to map vector figures corresponding to different topographical categories in the first topographical map, and the mapping result becomes a second topographical map.
[0031] The preset terrain patterns used in this embodiment correspond to different terrain categories, i.e., different terrain categories have different terrain patterns, and the preset terrain patterns can include patterns of terrain color, terrain shape, etc.
[0032] In this embodiment, after executing S105 to obtain the mapping result as a second topographical map, the method may further include a step of displaying the vector diagram with a smaller area on top of the vector diagram with a larger area for two vector diagrams in the second topographical map where an intersecting situation exists.
[0033] That is, in this embodiment, in the case of an intersection situation of vector figures, the small-area vector figure is displayed on top of the large-area vector figure to ensure that the small-area vector figure is not blocked and ensure the integrity of the second topographical map.
[0034] In this embodiment, in the second topographical map obtained by executing S105, the vector figures of different topographical categories correspond to different topographical patterns, so that different topographical categories can be displayed on the second topographical map. Using the above method provided in this embodiment, the automatic construction of a topographical map can be realized, and the accuracy and currentness of the constructed topographical map can be improved.
[0035] 2 is a schematic diagram according to a second embodiment of the present disclosure. As shown in FIG. 2, after performing S105 to obtain a second topographical map, the method for constructing a topographical map in this embodiment can further include the following steps: S201, obtaining a map base map as a template and the second topographical map as a mask; S202, the map base map and the second topographical map are superimposed, and the superimposition result is regarded as a third topographical map.
[0036] Since the second topographical map acquired in this embodiment only displays terrain of a different category and lacks information such as roads, a known map base map is acquired and superimposed on the second topographical map, and the topographical information contained in the second topographical map is superimposed on the map base map so that the acquired third topographical map includes map information such as topographical information and road information, thereby realizing the construction of a precise topographical map.
[0037] In this embodiment, when S201 is executed to obtain the map base map, it is obtained from a known map database, and further, the obtained map base map can be superimposed as a template.
[0038] In this embodiment, when S202 is executed to superimpose the map base map and the second topographical map and the superimposition result is a third topographical map, an optional implementation method that can be used is to set different proportional scales, respectively superimpose the map base map and the second topographical map corresponding to the same proportional scale, and the superimposition result corresponding to the different proportional scale is a third topographical map, so that the third topographical map can display all the topographical information at different proportional scales.
[0039] In this embodiment, when S202 is performed to respectively superimpose a map base map and a second topographical map corresponding to the same proportional scale, an available selectable implementation method is to determine an overlay method corresponding to the current proportional scale, use the determined overlay method to obtain vector graphics in the overlay result, and set a topographical category for each vector graphic in the overlay result.
[0040] In this embodiment, superposition methods corresponding to different proportional scales can be pre-established. For example, when the proportional scale is 1:500 km, the superposition method corresponding to the proportional scale can take the intersection set between the map base map and the second topographical map. For example, when the proportional scale is 1:1000 km or more, the superposition method corresponding to the proportional scale can take the intersection set between the map base map and the second topographical map.
[0041] In addition, in this embodiment, when S202 is performed to set the terrain category of each vector graphic in the superimposition result, a processing method corresponding to the superimposition method can be used to set the terrain category of each vector graphic in the superimposition result.
[0042] For example, in this embodiment, the terrain category of the vector figure of the intersection can be set as the terrain category of that vector figure in the second topographical map, in this embodiment, the terrain category of the vector figure of the difference can be set as the terrain category of the vector figure with the largest area adjacent to it in the overlay result, and in this embodiment, the terrain category of the vector figure without the intersection can be set as the terrain category of the closest vector figure in the overlay result.
[0043] Fig. 3a is a schematic diagram according to a third embodiment of the present disclosure. The image in Fig. 3a is a grayscale image of the image to be processed, and Fig. 3b is a schematic diagram according to a fourth embodiment of the present disclosure. The image in Fig. 3b is a binary image corresponding to different terrain categories, and the white areas in each binary image are land patches.
[0044] 4 is a schematic diagram according to a fifth embodiment of the present disclosure. As shown in FIG. 4, the apparatus 400 for constructing a terrain map in this embodiment includes: an acquisition unit 401, a first processing unit 402, an extraction unit 403, a synthesis unit 404, and a mapping unit 405; The acquisition unit 401 is used for acquiring an image to be processed and acquiring a grayscale image of the image to be processed; a first processing unit 402 is used for classifying each pixel in the grayscale image according to a grayscale value to obtain a binary image corresponding to different terrain categories; an extraction unit 403 is used for extracting land patch contours of the land patches in the binary image, and obtaining a vector graphic set using the extracted land patch contours as vector graphics; The merging unit 404 is used for merging the vector figures corresponding to the same terrain category in the vector figure collection according to the position information, and obtaining a first terrain map according to the merging results corresponding to different terrain categories; The mapping unit 405 is used to map vector shapes corresponding to different terrain categories in the first terrain map using a preset terrain pattern, and make the mapping result into a second terrain map.
[0045] When the acquisition unit 401 acquires the image to be processed, it can acquire a remote sensing image as the image to be processed, the data type of the acquired image to be processed is grid data, and the number of images to be processed acquired by the acquisition unit 401 may be one or more.
[0046] When the acquisition unit 401 acquires a grayscale image of the target image, it performs downsampling and remapping operations on the target image to convert the color target image into a grayscale image, in which each pixel can have a different grayscale value.
[0047] In this embodiment, after the acquisition unit 401 acquires a grayscale image of the image to be processed, the first processing unit 402 classifies each pixel in the acquired grayscale image based on the grayscale value to acquire binary images corresponding to different terrain categories.
[0048] In this embodiment, the correspondence between the grayscale value and the terrain category is preset, and the terrain category corresponding to a pixel can be determined based on the grayscale value of the pixel.
[0049] Therefore, when the first processing unit 402 classifies each pixel in the acquired gray scale image based on the gray scale value to acquire binary images corresponding to different terrain categories, an optional implementation manner that can be used is to determine the gray scale value of each pixel in the gray scale image, and for each gray scale value, set the gray scale value of the pixel having that gray scale value in the gray scale image to 1, and set the gray scale values of the other pixels to 0, to acquire a binary image corresponding to that gray scale value, and the terrain category corresponding to that gray scale value is the terrain category of the binary image.
[0050] In other words, after the first processing unit 402 classifies each pixel in the gradation image based on the gradation value, multiple binary images corresponding to different terrain categories can be obtained based on the classification results, thereby achieving the purpose of distinguishing between different terrains and performing individual processing on data belonging to different terrain categories.
[0051] The apparatus 400 for constructing a terrain map in this embodiment further includes a second processing unit 406, which is used to perform the following contents after the first processing unit 402 obtains binary images corresponding to different terrain categories: determine a binary image corresponding to a preset terrain category, and process the determined binary image using a processing manner corresponding to the preset terrain category.
[0052] That is, the second processing unit 406 can realize specific processing of a specific terrain according to the manner of a preset terrain category, and can highlight the terrain of the preset terrain category in the constructed terrain map.
[0053] In this embodiment, after the first processing unit 402 obtains binary images corresponding to different terrain categories, the extraction unit 403 extracts land patch contours of land patches in the obtained binary images, and obtains a vector graphic set using the extracted land patch contours as vector graphics, where the land patch in this embodiment is an area composed of pixels with a grayscale value of 1 in the binary image.
[0054] Before the extraction unit 403 extracts the land patch contours of the land patches in the binary image, it can also perform pre-processing such as open operation, median filtering, etc. on the binary image. By performing the open operation on the binary image, the separate land patches in the binary image can be connected into one, and by performing the median filtering on the binary image, the tiny pixels in the binary image can be removed and the edges of the land patches can be smoothed.
[0055] In addition, after the extraction unit 403 extracts and obtains the land patch contour, the method can further include the following content: according to the coordinates of each pixel in the land patch contour, calculate a first coordinate of the contour, for example, calculate the wgs84 coordinate of the contour, and convert the calculated first coordinate into a second coordinate, for example, convert the wgs84 coordinate into Baidu 09 coordinate, so as to realize contour coordinate conversion and coordinate encryption.
[0056] In this embodiment, after the extraction unit 403 obtains the vector graphic collection, the integration unit 404 integrates the vector graphics corresponding to the same terrain category in the vector graphic collection based on the location information, and obtains a first terrain map based on the integration results corresponding to different terrain categories.
[0057] That is, the integration unit 404 restores each vector graphic in the acquired vector graphic collection based on the location information, and restores each vector graphic to its actual location, and the acquired first terrain map includes vector graphics corresponding to different terrain categories.
[0058] The apparatus 400 for constructing a topographical map in this embodiment further includes a first adjustment unit 407, which is used to perform the following content after the integration unit 404 obtains a first topographical map based on the integration results corresponding to different topographical categories: change the topographical category of a vector graphic image in the first topographical map whose area is smaller than a first preset threshold to a topographical category of an adjacent vector graphic image whose area is larger than a second preset threshold.
[0059] In other words, the first adjustment unit 407 can change the terrain category of a small-area vector figure in the first topographical map so that the terrain category of the small-area vector image is the same as the terrain category of the large-area vector figure adjacent to it, thereby further improving the accuracy and consistency of the constructed first topographical map.
[0060] In this embodiment, after the integration unit 404 obtains the first terrain map, the mapping unit 405 uses a preset terrain pattern to map vector figures corresponding to different terrain categories in the first terrain map, and the mapping result becomes the second terrain map.
[0061] The pre-defined terrain patterns used by the mapping unit 405 correspond to different terrain categories, i.e. different terrain categories have different terrain patterns, and the pre-defined terrain patterns may include patterns of terrain color, terrain shape, etc.
[0062] The apparatus 400 for constructing a topographical map in this embodiment further includes a second adjustment unit 408, which is used to perform the following content after the mapping unit 405 converts the mapping result into a second topographical map: for two vector figures having an intersecting situation in the second topographical map, the vector figure with a smaller area is displayed on top of the vector figure with a larger area.
[0063] That is, in the case of a vector graphic intersection situation, the second adjustment unit 408 displays the small-area vector graphic on top of the large-area vector graphic to ensure that the small-area vector graphic is not blocked and ensure the integrity of the second topographical map.
[0064] The apparatus 400 for constructing a topographical map in this embodiment further includes a superposition unit 409, which is used to perform the following content after the mapping unit 405 makes the mapping result into a second topographical map: take the map base map as a template, take the second topographical map as a mask, superpose the map base map and the second topographical map, and make the superposition result into a third topographical map.
[0065] When the overlay unit 409 obtains the map base map, it can obtain it from a known map database, and further overlay the obtained map base map as a template.
[0066] When the overlay unit 409 overlays the map base map and the second topographical map and the overlay result becomes a third topographical map, an optional implementation method that can be used is to set different proportional scales, respectively overlay the map base map and the second topographical map corresponding to the same proportional scale, and the overlay result corresponding to the different proportional scale becomes a third topographical map, so that the third topographical map can display all the topographical information at different proportional scales.
[0067] When the overlay unit 409 respectively overlays a map base map and a second terrain map corresponding to the same proportional scale, an available selectable implementation method is to determine an overlay method corresponding to the current proportional scale, obtain vector graphics in the overlay result using the determined overlay method, and set a terrain category for each vector graphic in the overlay result.
[0068] In addition, when the superimposition unit 409 sets the terrain category of each vector graphic in the superimposition result, it can use a processing manner corresponding to the superimposition manner to set the terrain category of each vector graphic in the superimposition result.
[0069] In the technical solution disclosed herein, the acquisition, storage, application, etc. of user personal information all comply with relevant laws and regulations and do not violate public order and morals.
[0070] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.
[0071] As shown in FIG. 5, a block diagram of an electronic device of the method of constructing a topographical map according to an embodiment of the present disclosure. The electronic device is intended to represent various types of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various types of mobile devices, such as personal digital assistants, mobile phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the practice of the present disclosure as described herein and / or claimed.
[0072] 5, the device 500 includes a computing unit 501, which can perform various appropriate operations and processes based on a computer program stored in a read-only memory (ROM) 502 or loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 can also store various programs and data required for the device 500 to operate. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0073] Several components in device 500 are connected to I / O interface 505, including input units 506 such as a keyboard, mouse, etc., output units 507 such as various types of displays, speakers, etc., storage units 508 such as a disk, optical disk, etc., and communication units 509 such as a network card, modem, wireless communication transceiver, etc. The communication units 509 enable device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0074] The computing unit 501 is a general-purpose and / or special-purpose processing component that includes various processing and computation capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, computing units that execute various machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes the various methods and processes described above, such as the method of constructing a terrain map. For example, in some embodiments, the method of constructing a terrain map can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508.
[0075] In some embodiments, a part or all of the computer program is loaded and / or installed in the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, it can perform one or more steps of the method for constructing a terrain map described above. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the method for constructing a terrain map via any other suitable manner (e.g., by firmware).
[0076] Various implementations of the systems and techniques described herein may be realized in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip systems (SOCs), programming programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include being implemented in one or more computer programs that may be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be an application specific or general purpose programmable processor, and that may receive data and instructions from and transmit data and instructions to a storage system, at least one input device, and at least one output device.
[0077] The program codes for implementing the methods of the present disclosure can be created using any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatus such that the functions / operations specified in the flowcharts and / or block diagrams are implemented when the program codes are executed by the processor or controller. The program codes can be executed entirely on the machine, partially on the machine, partially on the machine as a separate software package and partially on a remote machine, or entirely on a remote machine or server.
[0078] In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use with or in combination with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
[0079] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other types of devices can also be used to provide interaction with a user, for example, feedback provided to the user can be any form of sensing feedback (e.g., visual feedback, auditory feedback, or haptic feedback) and can receive input from the user in any form (including acoustic input, speech input, and haptic input).
[0080] The systems and techniques described herein may be implemented in a computing system including a back-end component (e.g., a data server), or a middleware component (e.g., an application server), or a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user interacts with the implementation of the systems and techniques described herein), or any combination of such back-end, middleware, and front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0081] The computer system may include a client and a server. The client and the server are generally remote from each other and usually interact with each other via a communication network. The relationship between the client and the server is generated by a computer program that runs on a corresponding computer and has a client-server relationship with each other. The server may be a cloud server, also called cloud computing or cloud host, which is a host product in a cloud computing service system and solves the defects of high management difficulty and low business scalability that exist in traditional physical hosts and virtual private server (abbreviated as VPS) services. The server may be a server of a distributed system or a server that combines blockchain.
[0082] It should be understood that steps can be rearranged, added, or deleted using various types of flows shown above. For example, each step described in the present disclosure can be performed in parallel, sequentially, or in a different order, but is not limited herein as long as the technical solution disclosed in the present disclosure can achieve the desired results.
[0083] The above specific implementation methods do not constitute a limitation of the protection scope of the present disclosure. Those skilled in the art can make various modifications, combinations, subcombinations, and substitutions based on design requirements and other factors. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. acquiring an image to be processed and acquiring a gradation image of the image to be processed; classifying each pixel in the greyscale image based on its greyscale value to obtain binary images corresponding to different terrain categories; extracting land patch contours of the land patches in the binary image, and obtaining a vector graphic set by using the extracted land patch contours as vector graphics; integrating vector figures corresponding to the same terrain category in the vector figure collection based on location information, and obtaining a first terrain map based on the integration results corresponding to different terrain categories; using a preset terrain pattern to map vector shapes corresponding to different terrain categories in the first terrain map, and forming a mapping result as a second terrain map. How to build a topographical map.
2. classifying each pixel in the grayscale image based on the grayscale value to obtain binary images corresponding to different terrain categories, determining a greyscale value for each pixel in the greyscale image; for each gradation value, setting the gradation value of a pixel having the gradation value in the gradation image to 1 and setting the gradation values of other pixels to 0 to obtain a binary image corresponding to the gradation value; and determining a terrain category corresponding to the gradation value as the terrain category of the binary image.
2. A method for constructing a topographical map according to claim 1.
3. After obtaining the binary images corresponding to the different terrain categories, determining a binary image corresponding to a pre-defined terrain category; and processing the determined binary image using a processing scheme corresponding to the predefined terrain category. A method for constructing a topographical map according to claim 1 or 2.
4. and after obtaining a first topographical map based on the integration results corresponding to different topographical categories, changing the topographical category of a vector graphic having an area smaller than a first preset threshold in the first topographical map to a topographical category of a vector graphic having an area larger than a second preset threshold adjacent thereto. A method for constructing a topographical map according to any one of claims 1 to 3.
5. and after the mapping result is a second topographical map, the method further includes a step of displaying, for two vector figures in the second topographical map in which an intersecting situation exists, a vector figure having a smaller area on top of a vector figure having a larger area. A method for constructing a topographical map according to any one of claims 1 to 4.
6. After the mapping result is a second topographical map, a map base map is taken as a template, and the second topographical map is taken as a mask; and superimposing the map base map and the second topographical map to obtain a third topographical map as a result of the superposition. A method for constructing a topographical map according to any one of claims 1 to 5.
7. an acquisition unit for acquiring an image to be processed and acquiring a grayscale image of the image to be processed; a first processing unit for classifying each pixel in the greyscale image based on its greyscale value to obtain binary images corresponding to different terrain categories; an extraction unit for extracting land patch contours of the land patches in the binary image and obtaining a vector graphic set with the extracted land patch contours as vector graphics; an integration unit for integrating vector figures corresponding to the same terrain category in the vector figure collection based on location information, and obtaining a first terrain map based on integration results corresponding to different terrain categories; a mapping unit for mapping vector shapes corresponding to different terrain categories in the first terrain map using a preset terrain pattern, and forming a mapping result into a second terrain map. A device for constructing topographical maps.
8. When the first processing unit classifies each pixel in the gray scale image according to the gray scale value to obtain binary images corresponding to different terrain categories, specifically, determining a greyscale value for each pixel in the greyscale image; For each gradation value, set the gradation value of a pixel having the gradation value in the gradation image to 1, and set the gradation values of other pixels to 0 to obtain a binary image corresponding to the gradation value; The terrain category corresponding to the gradation value is set as the terrain category of the binary image.
8. An apparatus for constructing a topographical map according to claim 7.
9. The apparatus further includes a second processing unit, the second processing unit comprising: After the first processing unit obtains the binary images corresponding to different terrain categories, a binary image corresponding to a preset terrain category is determined; processing the determined binary image using a processing scheme corresponding to said predefined terrain category; 9. An apparatus for constructing a topographical map according to claim 7 or 8.
10. The apparatus further includes a first adjustment unit, the first adjustment unit being: After the integration unit obtains a first terrain map based on the integration results corresponding to different terrain categories, the integration unit is used to change the terrain category of the vector graphic in the first terrain map whose area is smaller than a first preset threshold to the terrain category of the vector graphic adjacent thereto whose area is larger than a second preset threshold. An apparatus for constructing a topographical map according to any one of claims 7 to 9.
11. The apparatus further includes a second adjustment unit, the second adjustment unit being: After the mapping unit converts the mapping result into a second topographical map, the second topographical map is used to display a vector figure having a smaller area on top of a vector figure having a larger area for two vector figures having an intersecting situation in the second topographical map. An apparatus for constructing a topographical map according to any one of claims 7 to 10.
12. The apparatus further includes a superposition unit, the superposition unit comprising: After the mapping unit takes the mapping result as a second topographical map, it takes a map base map as a template, and takes the second topographical map as a mask; used to superimpose the map base map and the second topographical map and obtain a third topographical map as a result of the superposition; An apparatus for constructing a topographical map according to any one of claims 7 to 11.
13. An electronic device, At least one processor; a memory communicatively coupled to the at least one processor; storing instructions executable by the at least one processor in the memory, the instructions, when executed by the at least one processor, causing the at least one processor to perform a method for constructing a topographical map according to any one of claims 1 to 6; electronic equipment.
14. A non-transitory computer-readable storage medium having computer instructions stored thereon, comprising: The computer instructions cause a computer to carry out a method for constructing a topographical map according to any one of claims 1 to 6. A non-transitory computer-readable storage medium on which computer instructions are stored.
15. A computer program which, when executed by a processor, implements the method for constructing a topographical map according to any one of claims 1 to 6. Computer program.
Citation Information
Patent Citations
Water system data processing method and device, electronic equipment and readable storage medium
CN112258539A
