Method, device and electronic device for determining area contour
Through image semantic segmentation and clustering processing, combined with interest point distance analysis, the problem of difficulty and high cost in village data collection is solved, the precise determination of village outlines is achieved, and the accuracy of logistics distribution and the efficiency of road construction are improved.
Patent Information
- Application Number
- CN202111017023.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-08-31
AI Technical Summary
In the existing technology, village data collection is difficult and costly, and the outline of the village cannot be obtained, which affects the accuracy of road construction, livability analysis, and logistics distribution.
The geographical information of the village is obtained through image semantic segmentation processing. The clustering process identifies the residential points and determines the village outline. The distance between the interest points and the clusters is used to determine the village outline.
Effectively determine the outline of the village, improve the accuracy of village data acquisition and automated distribution capabilities, and reduce the cost of collection.
Smart Images

Figure CN113723405B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a method, device and electronic device for determining a region outline, and specifically to the field of map technology. Background Art
[0002] Defining the geographical location and outline of the village is of great significance for road construction, livability analysis, logistics distribution, etc.
[0003] In the prior art, the collected village data all use one location point to refer to one village, and it is impossible to obtain the outline of the village. Therefore, how to determine the outline of the village is crucial. Summary of the invention
[0004] The present disclosure provides a method, device and electronic device for determining a region outline, which can effectively determine the region outline.
[0005] According to a first aspect of the present disclosure, a method for determining a region outline is provided. The method for determining a region outline may include:
[0006] A semantic image corresponding to the area to be processed is obtained; wherein the semantic image includes a plurality of rectangular areas, each of which represents an object.
[0007] The multiple objects are clustered according to the positions of the multiple rectangular areas to obtain multiple clusters.
[0008] According to the position of the interest point in the area to be processed and the distance between each cluster in the plurality of clusters, the outline of the area to which the interest point belongs is determined.
[0009] According to a second aspect of the present disclosure, a device for determining a region outline is provided. The device for determining a region outline may include:
[0010] The acquisition unit is used to acquire a semantic image corresponding to the area to be processed; wherein the semantic image includes a plurality of rectangular areas, each of which represents an object.
[0011] A processing unit is used to perform clustering processing on the multiple objects according to the positions of the multiple rectangular areas to obtain multiple clusters.
[0012] The first determining unit is used to determine the outline of the area to which the interest point belongs according to the position of the interest point in the area to be processed and the distance between each cluster in the multiple clusters.
[0013] According to a third aspect of the present disclosure, an electronic device is provided, which may include:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for determining the area contour described in the first aspect above.
[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method for determining the area contour described in the first aspect above.
[0018] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, wherein the computer program is stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the method for determining the area contour described in the first aspect.
[0019] According to the technical solution of the present disclosure, the outline of the area to which the interest point in the area to be processed belongs can be effectively determined.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0022] Figure 1 is a flowchart of a method for determining a region contour provided according to a first embodiment of the present disclosure;
[0023] Figure 2 is a schematic diagram of an expanded image provided by an embodiment of the present disclosure;
[0024] Figure 3 is a schematic diagram of a semantic image provided by an embodiment of the present disclosure;
[0025] Figure 4 is a flow chart of a method for determining a region contour according to a second embodiment of the present disclosure;
[0026] Figure 5 is a boundary diagram of a XX village provided in an embodiment of the present disclosure;
[0027] Figure 6 is a schematic structural diagram of a device for determining a region contour according to a third embodiment of the present disclosure;
[0028] Figure 7 It is a schematic block diagram of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0030] In the embodiments of the present disclosure, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B may be singular or plural. In the text description of the present disclosure, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship. In addition, in the embodiments of the present disclosure, "first", "second", "third", "fourth", "fifth" and "sixth" are only used to distinguish the contents of different objects and have no other special meanings.
[0031] The technical solution provided by the disclosed embodiment can be applied to map technology scenarios. Delineating the geographical location and outline of the village is of great significance for road construction, livability analysis, logistics distribution, etc. In the prior art, when collecting village data, on the one hand, due to the poor road conditions in many villages, it is difficult to collect village data; on the other hand, due to the scattered release of villages, the cost of collecting village data is high. Therefore, the village data collected by existing map vendors all use one location point to refer to a village, and the outline of the village cannot be obtained.
[0032] Take the logistics distribution scenario as an example. During logistics distribution, if the outline of the village is not obtained, even if the distribution system obtains the location of the consignee, it cannot accurately describe in semantic terms which village the consignee is in. The delivery personnel need to be very familiar with the local environment, and the address filled in by the consignee must be accurate to the village, so that accurate delivery can be achieved. However, this places extremely high demands on the delivery personnel, and it is impossible to achieve automated delivery to the village. Therefore, how to determine the outline of the village is crucial.
[0033] In order to effectively identify the village, we can consider performing image semantic segmentation on the map information of the area to which the village belongs. Through image semantic segmentation, we can identify the residential areas in the area one by one and perform clustering on the identified residential areas. A cluster represents a village, and the residential areas belonging to the same cluster usually belong to the same village. In this way, we can identify the residential areas belonging to the same village, and then determine the outline of the village indicated by the cluster based on the residential areas in the same village.
[0034] Based on the above technical concept, the embodiment of the present disclosure provides a method for determining a region contour. The method for determining a region contour provided by the present disclosure will be described in detail below through specific embodiments. It is understandable that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0035] Embodiment 1
[0036] Figure 1 is a flow chart of a method for determining a region outline according to the first embodiment of the present disclosure. The method for determining a region outline may be executed by software and / or hardware devices. For example, the hardware device may be a terminal or a server. For example, see Figure 1 As shown, the method for determining the area contour may include:
[0037] S101, obtaining a semantic image corresponding to the area to be processed; wherein the semantic image includes a plurality of rectangular areas, each of which represents an object.
[0038] For example, the area to be processed can be a provincial area, a county area, a town area, etc., which can be set according to actual needs. Here, the scope of the area to be processed is not further limited in the embodiment of the present disclosure. Taking the determination of a village outline as an example, an object can represent a residential point, and a semantic image can include multiple residential points.
[0039] It can be understood that in the embodiments of the present disclosure, when obtaining the semantic image corresponding to the area to be processed, the semantic image corresponding to the area to be processed can be obtained in advance, and the obtained semantic image corresponding to the area to be processed can be stored locally. In this way, when the technical solution of the present disclosure is executed, the semantic image corresponding to the area to be processed can be directly obtained locally, thereby improving the efficiency of obtaining the semantic image; it is also possible to obtain the semantic image corresponding to the area to be processed again when executing the technical solution of the present disclosure, and the specific setting can be made according to actual needs.
[0040] For example, when obtaining the semantic image corresponding to the area to be processed, a satellite image of the area to be processed may be obtained first, and the method for obtaining the satellite image is not limited; after obtaining the satellite image of the area to be processed, the satellite image of the area to be processed may be expanded according to the Mercator projection. For example, see Figure 2 As shown, Figure 2 is a schematic diagram of an expanded image provided by an embodiment of the present disclosure. After obtaining the expanded image, the expanded image can be input into an image semantic segmentation model, and the expanded image is processed by the image semantic segmentation model. The output of the image semantic segmentation model is the semantic image corresponding to the area to be processed. For example, see Figure 3 As shown, Figure 3 It is a schematic diagram of a semantic image provided by an embodiment of the present disclosure. In this way, a semantic image is obtained through an image semantic segmentation model, thereby improving the accuracy of the obtained semantic image.
[0041] It can be seen that when the semantic image corresponding to the area to be processed is obtained through the image semantic segmentation model, it is necessary to obtain the image semantic segmentation model. For example, when obtaining the image speech segmentation model, the trained image semantic segmentation model can be directly obtained, or the initial image semantic segmentation model can be trained through multiple training samples to obtain the trained image semantic segmentation model. The specific setting can be made according to actual needs. Here, the embodiment of the present disclosure does not further limit the method of obtaining the image semantic segmentation model. It should be noted that in the embodiment of the present disclosure, how to train the initial image semantic segmentation model through multiple training samples to obtain the image semantic segmentation model can be referred to the existing training method of the neural network model. Here, the embodiment of the present disclosure will not be repeated.
[0042] It can be understood that in addition to inputting the expanded image into the image semantic segmentation model and obtaining the semantic image corresponding to the area to be processed through the image semantic segmentation model, the semantic image corresponding to the area to be processed can also be obtained through other technologies, for example, other image semantic segmentation technologies. Here, the embodiment of the present disclosure only takes the example of inputting the expanded image into the image semantic segmentation model and obtaining the semantic image corresponding to the area to be processed through the image semantic segmentation model, but it does not mean that the embodiment of the present disclosure is limited to this.
[0043] After acquiring the semantic image including the multiple rectangular areas, the multiple objects may be clustered, that is, the following S102 is executed:
[0044] S102: performing clustering processing on multiple objects according to the positions of multiple rectangular areas to obtain multiple clusters.
[0045] Taking residential areas as an example, a cluster represents a village. Usually, multiple residential areas belonging to the same cluster are residential areas in the same village. In this way, through clustering processing, residential areas belonging to the same village can be clustered into the same cluster.
[0046] For example, when clustering multiple objects, a clustering algorithm can be used to cluster multiple objects represented by multiple rectangular areas according to density, so as to obtain multiple clusters after division. For example, the clustering algorithm can be a dbscan clustering algorithm, a DBSCAN clustering algorithm, an OPTICS clustering algorithm, or a Kmeans clustering algorithm, etc., which can be set according to actual needs.
[0047] After clustering multiple objects to obtain multiple clusters, one cluster represents one village. Next, it is necessary to determine which village each cluster specifically corresponds to, that is, it is necessary to associate each cluster with the identifier of the village to which it corresponds. For example, in the disclosed embodiment, based on the multiple clusters obtained by division, the location of the interest points of the village collected by the current map provider can be combined to determine the outline of the village, that is, perform the following S103. Among them, the interest points of the village are used to represent the village, that is, one location point refers to one village.
[0048] S103: Determine the outline of the area to which the interest point belongs according to the position of the interest point in the area to be processed and the distances between the plurality of clusters.
[0049] For example, the area to be processed may include one or more points of interest, which can be set according to actual needs. Here, the embodiment of the present disclosure does not further limit the number of points of interest included in the area to be processed.
[0050] Taking the object as a residential point and determining the village area as an example, each point of interest refers to a village, and the point of interest can be any point in the village to which it belongs, and the area to which the point of interest belongs is recorded as the village referred to by the point of interest. For example, if the area of the village is a regular area, the point of interest can be the center point of the village.
[0051] When determining the outline of the village based on the location of the point of interest representing the village and the distance between each cluster, usually, the village represented by the cluster closest to the location of the point of interest can be understood as the village to which the point of interest belongs. In this way, the cluster can be associated with the identification of the corresponding village to determine the cluster corresponding to the village, thereby determining the outline of the village.
[0052] It can be seen that in the embodiment of the present disclosure, when determining the outline of the area to which the point of interest in the area to be processed belongs, the semantic image corresponding to the area to be processed can be obtained first; wherein the semantic image includes multiple rectangular areas, each rectangular area represents an object; and according to the positions of the multiple rectangular areas, the multiple objects are clustered to obtain multiple clusters; then, according to the position of the point of interest in the area to be processed and the distance between each cluster in the multiple clusters, the outline of the area to which the point of interest belongs is determined, thereby effectively determining the outline of the area to which the point of interest belongs.
[0053] In order to facilitate understanding of how to determine the outline of the area to which the interest point belongs according to the position of the interest point in the area to be processed and the distance between each of the multiple clusters in the above S103, the following will be described. Figure 4 The second embodiment shown describes in detail how to determine the outline of the area to which the interest point belongs based on the position of the interest point in the area to be processed and the distances between each cluster in a plurality of clusters.
[0054] Embodiment 2
[0055] Figure 4 is a flow chart of a method for determining a region outline according to a second embodiment of the present disclosure. The method for determining a region outline can also be executed by software and / or hardware devices. For example, the hardware device can also be a terminal or a server. For example, see Figure 4 As shown, the method for determining the area contour may include:
[0056] S401 , according to the location of the interest point in the area to be processed and the distances between each of the multiple clusters, determine a target cluster from the multiple clusters that is closest to the location of the interest point.
[0057] Continuing with the example of determining the outline of a village, given that under normal circumstances, the village represented by the cluster closest to the location of the point of interest can be understood as the village to which the point of interest belongs, in the prior art, a point of interest is used to represent the village to which the point of interest belongs, so that the cluster can be associated with the identifier of the corresponding village to determine the cluster corresponding to the village. Therefore, the cluster closest to the location of the point of interest in the area to be processed can be determined from the multiple clusters based on the distance between the location of the point of interest and each of the multiple clusters. In the disclosed embodiment, for ease of description, the cluster closest to the location of the point of interest can be recorded as the target cluster.
[0058] It is not difficult to see that before determining the target cluster with the closest distance to the position of the point of interest from multiple clusters based on the position of the point of interest in the area to be processed and the distance between each cluster in the multiple clusters, it is necessary to first calculate the position of the point of interest in the area to be processed and the distance between each cluster in the multiple clusters respectively. Only then can the target cluster with the closest distance to the position of the point of interest be determined from the multiple clusters.
[0059] In the embodiments of the present disclosure, when respectively calculating the position of the point of interest in the area to be processed and the distance between each cluster in the multiple clusters, given that the calculation method of the position of the point of interest in the area to be processed and the distance between each cluster is similar, in order to avoid redundancy, below, taking the calculation of the distance between the position of the point of interest and any one of the multiple clusters as an example, how to calculate the position of the point of interest in the area to be processed and the distance between each cluster in the multiple clusters is described.
[0060] For example, when calculating the distance between the location of the point of interest and the cluster, given that the cluster usually includes multiple objects, the distance between the location of the point of interest and each of the multiple objects can be calculated separately to obtain multiple corresponding distance values; and the average of the multiple distance values is further calculated, and then the distance between the location of the point of interest and the cluster is determined based on the average of the multiple distance values. In this way, the distance between the location of the point of interest and the cluster can be determined while fully considering each object in the cluster, thereby improving the accuracy of the distance between the location of the point of interest and the cluster. By analogy, the distance between the location of the point of interest and each of the multiple clusters can be calculated, and then the target cluster with the closest distance to the location of the point of interest can be determined from the multiple clusters. The target cluster can be understood as the area to which the point of interest belongs.
[0061] For example, when determining the distance between the location of the point of interest and the cluster based on the average value of multiple distance values, the average value of the multiple distance values can be directly determined as the distance between the location of the point of interest and the cluster; or the average value of the multiple distance values can be processed in a certain way, such as rounding or integer processing, and the processing result can be determined as the distance between the location of the point of interest and the cluster. The specific settings can be made according to actual needs. Here, the embodiments of the present disclosure only take these two methods as examples for illustration, but it does not mean that the embodiments of the present disclosure are limited to this.
[0062] In the embodiment of the present disclosure, when respectively calculating the distance between the position of the point of interest and each of the multiple objects, given that the calculation method of the distance between the position of the point of interest and each object is similar, in order to avoid redundancy, the following will take the calculation of the distance between the position of the point of interest and any one of the multiple objects as an example to describe how to calculate the distance between the position of the point of interest and each of the multiple objects.
[0063] For example, when calculating the distance between the position of the interest point and the object, since the object is represented by a rectangular area, the distance between the position of the interest point and the object can be calculated by the rectangular area corresponding to the object, which may include at least the following four possible implementation methods:
[0064] In one possible implementation, the center point of the rectangular area can be first determined based on the positions of the four vertices of the rectangular area corresponding to the object; and the distance between the position of the point of interest and the center point is calculated, and the distance between the position of the point of interest and the center point is determined as the distance between the position of the point of interest and the object, thereby determining the distance between the position of the point of interest and the object.
[0065] In another possible implementation, four distance values can be obtained by calculating the distances between the four vertices of the rectangular area corresponding to the object respectively; and the minimum distance value among the four distance values is determined as the distance between the position of the point of interest and the object, thereby determining the distance between the position of the point of interest and the object.
[0066] In another possible implementation, four distance values can be obtained by respectively calculating the distances between the four vertices of the rectangular area corresponding to the object; and any one of the four distance values can be determined as the distance between the position of the point of interest and the object, thereby determining the distance between the position of the point of interest and the object.
[0067] In another possible implementation, the distance between the position of the point of interest and any of the four vertices of the rectangular area corresponding to the object can be first determined; and the distance can be determined as the distance between the position of the point of interest and the object, thereby determining the distance between the position of the point of interest and the object.
[0068] It should be noted that when calculating the distance between the position of the point of interest and the object, specific settings can be made according to actual needs. The embodiments of the present disclosure only use the above four possible implementation methods as examples for illustration, but do not mean that the embodiments of the present disclosure are limited to these.
[0069] After the target cluster is determined, the boundary of the target cluster can be fitted according to the positions of the objects included in the target cluster, that is, the following S402 is performed:
[0070] S402: Fit the boundary of the target cluster according to the position of each object in the target cluster.
[0071] For example, when fitting the boundary of the target cluster according to the positions of each object included in the target cluster, the existing convex hull algorithm can be used to fit the coordinates of each object in the target cluster to obtain the shape and boundary of the target cluster, and the boundary can be represented by the latitude and longitude coordinates of multiple boundary points.
[0072] For examples, see Figure 5 As shown, Figure 5 is a boundary diagram of a XX village provided by an embodiment of the present disclosure, Figure 5 The village indicated by the point of interest shown in the figure is "XX village", and the target cluster closest to it is the village "XX village" to which the point of interest belongs. In this way, according to the locations of multiple residential points included in the target cluster, the boundary of the target cluster is fitted, thereby further determining the outline of "XX village".
[0073] After fitting the boundary of the target cluster, the outline of the area to which the interest point belongs can be determined according to the boundary of the target cluster, that is, the following S403 is executed:
[0074] S403: Determine the outline of the area to which the interest point belongs according to the boundary of the target cluster.
[0075] For example, when determining the outline of the area to which the interest point belongs based on the boundary of the target cluster, the boundary of the target cluster can be directly determined as the outline of the area to which the interest point belongs, or the boundary of the target cluster can be processed in a certain way, such as smoothing, and the processed boundary can be determined as the outline of the area to which the interest point belongs. The specific settings can be made according to actual needs.
[0076] It can be seen that when determining the outline of the area to which the point of interest belongs, we can first determine the target cluster that is closest to the position of the point of interest from multiple clusters based on the position of the point of interest in the area to be processed and the distance between each cluster in the multiple clusters; and fit the boundary of the target cluster based on the position of each object in the target cluster; and then determine the outline of the area to which the point of interest belongs based on the boundary of the target cluster, so that the outline of the area to which the point of interest belongs can be effectively determined.
[0077] Embodiment 3
[0078] Figure 6 is a schematic diagram of the structure of a device 60 for determining a region contour according to a third embodiment of the present disclosure, for example, see Figure 6 As shown, the region contour determining device 60 may include:
[0079] The acquisition unit 601 is used to acquire a semantic image corresponding to the area to be processed; wherein the semantic image includes a plurality of rectangular areas, each of which represents an object.
[0080] The processing unit 602 is used to perform clustering processing on the multiple objects according to the positions of the multiple rectangular areas to obtain multiple clusters.
[0081] The first determining unit 603 is used to determine the outline of the area to which the interest point belongs according to the position of the interest point in the area to be processed and the distances between each cluster in the plurality of clusters.
[0082] Optionally, the determining unit includes a first determining module, a second determining module and a third determining module.
[0083] The first determination module is used to determine a target cluster that is closest to the location of the interest point from among the multiple clusters according to the location of the interest point in the area to be processed and the distances between each cluster in the multiple clusters.
[0084] The second determination module is used to fit the boundary of the target cluster according to the position of each object in the target cluster.
[0085] The third determination module is used to determine the outline of the area to which the interest point belongs according to the boundary of the target cluster.
[0086] Optionally, the region contour determining device 60 may further include a second determining unit and a third determining unit.
[0087] The second determining unit is used to determine, for each cluster in the plurality of clusters, the distance between the position of the point of interest and each object in the cluster to obtain a plurality of distance values.
[0088] The third determining unit is used to determine the distance between the location of the interest point and the cluster according to the average value of the multiple distance values.
[0089] Optionally, the second determining unit includes a fourth determining module and a fifth determining module.
[0090] The fourth determination module is used to determine the center point of the rectangular area corresponding to each object according to the positions of the four vertices of the rectangular area.
[0091] The fifth determining module is used to determine the distance between the position of the interest point and the center point as the distance between the position of the interest point and the object.
[0092] Optionally, the second determination unit further includes a sixth determination module and a seventh determination module.
[0093] The sixth determination module is used to determine the position of the interest point for each object, and the distance between each vertex in the four vertices of the rectangular area corresponding to the object to obtain four distance values.
[0094] The seventh determination module is used to determine the distance between the position of the interest point and the object according to the four distance values.
[0095] Optionally, the seventh determination module includes a first determination submodule and a second determination submodule.
[0096] The first determination submodule is used to determine the minimum distance value among the four distance values as the distance between the position of the interest point and the object.
[0097] or,
[0098] The second determining submodule is used to determine any one of the four distance values as the distance between the position of the point of interest and the object.
[0099] Optionally, the second determining unit further includes an eighth determining module and a ninth determining module.
[0100] The eighth determination module is used to determine, for each object, the distance between the position of the interest point and any vertex of the four vertices of the rectangular area corresponding to the object.
[0101] The ninth determination module is used to determine the distance as the distance between the position of the point of interest and the object.
[0102] Optionally, the acquisition unit 601 includes a first acquisition module and a second acquisition module.
[0103] The first acquisition module is used to acquire a satellite image of the area to be processed.
[0104] The second acquisition module is used to process the satellite image according to the Mercator projection and input the processed image into the image semantic segmentation model to obtain a semantic image.
[0105] The device 60 for determining the area contour provided in the embodiment of the present disclosure can execute the technical solution of the method for determining the area contour shown in any of the above embodiments, and its implementation principle and beneficial effects are similar to the implementation principle and beneficial effects of the method for determining the area contour. Please refer to the implementation principle and beneficial effects of the method for determining the area contour, and no further details will be given here.
[0106] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0107] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0108] Figure 7is a schematic block diagram of an electronic device 70 provided according to an embodiment of the present disclosure. The electronic device is intended to represent various forms 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 forms of mobile devices, such as personal digital processing, cellular 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 implementation of the present disclosure described and / or claimed herein.
[0109] like Figure 7 As shown, the electronic device 70 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 70 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0110] A number of components in the device 70 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 70 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0111] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the determination method of the regional contour. For example, in some embodiments, the determination method of the regional contour may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 70 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the determination method of the regional contour described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the determination method of the regional contour by any other appropriate means (e.g., by means of firmware).
[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0114] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0115] 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 the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0116] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or 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), and the Internet.
[0117] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and this document is not limited here.
[0119] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for determining a region contour, comprising: Acquire a semantic image corresponding to the area to be processed; wherein the semantic image includes a plurality of rectangular areas, each rectangular area represents an object, and one object represents a residential point; Using a clustering algorithm, clustering the multiple objects represented by the multiple rectangular areas according to density to obtain multiple clusters, and the multiple residential points belonging to the same cluster are residential points in the same village; Determine the outline of the area to which the interest point belongs according to the position of the interest point in the area to be processed and the distance between each of the multiple clusters, wherein one interest point represents one village; The obtaining of the semantic image corresponding to the area to be processed includes: Obtaining a satellite image of the area to be processed; Processing the satellite image according to the Mercator projection, and inputting the processed image into an image semantic segmentation model to obtain the semantic image; For each of the plurality of clusters, respectively determine the distance between the location of the point of interest and each object in the cluster to obtain a plurality of distance values; Determining the distance between the location of the point of interest and the cluster according to an average value of the multiple distance values; The determining the distance between the position of the point of interest and each object in the cluster comprises: For each object, determine the position of the interest point, and the distance between each of the four vertices of the rectangular area corresponding to the object, to obtain four distance values; The distance between the position of the point of interest and the object is determined according to the four distance values.
2. The method according to claim 1, wherein: The step of determining the outline of the area to which the interest point belongs according to the position of the interest point in the area to be processed and the distance between each of the plurality of clusters, comprises: According to the position of the interest point in the to-be-processed area and the distances between each of the multiple clusters, determine a target cluster from the multiple clusters that is closest to the position of the interest point; Fitting the boundary of the target cluster according to the position of each object in the target cluster; The outline of the area to which the point of interest belongs is determined according to the boundary of the target cluster.
3. The method according to claim 1, wherein: Determining the distance between the position of the point of interest and the object according to the four distance values includes: Determine the minimum distance value among the four distance values as the distance between the position of the point of interest and the object; or, Any one of the four distance values is determined as the distance between the position of the point of interest and the object.
4. The method according to claim 1, wherein: Determining the distance between the position of the point of interest and the object according to the four distance values includes: For each object, determining the distance between the position of the interest point and any vertex of the four vertices of the rectangular area corresponding to the object; The distance is determined as the distance between the location of the point of interest and the object.
5. A device for determining a region contour, comprising: An acquisition unit, used for acquiring a semantic image corresponding to the area to be processed; wherein the semantic image includes a plurality of rectangular areas, each rectangular area represents an object, and one object represents a residential point; A processing unit, configured to perform clustering processing on the multiple objects represented by the multiple rectangular areas according to density using a clustering algorithm to obtain multiple clusters, wherein the multiple residential points belonging to the same cluster are residential points in the same village; A first determining unit, configured to determine the outline of the area to which the interest point belongs according to the position of the interest point in the area to be processed and the distance between each of the plurality of clusters, wherein one interest point represents one village; The acquisition unit includes a first acquisition module and a second acquisition module; The first acquisition module is used to acquire a satellite image of the area to be processed; The second acquisition module is used to process the satellite image according to the Mercator projection, and input the processed image into the image semantic segmentation model to obtain the semantic image; a second determining unit, configured to determine, for each of the plurality of clusters, a distance between the position of the point of interest and each object in the cluster, to obtain a plurality of distance values; a third determining unit, configured to determine the distance between the location of the point of interest and the cluster according to an average value of the plurality of distance values; The second determining unit includes a sixth determining module and a seventh determining module; The sixth determination module is used to determine the position of the interest point for each object, and the distance between each vertex in four vertices of the rectangular area corresponding to the object, to obtain four distance values; The seventh determination module is used to determine the distance between the position of the point of interest and the object according to the four distance values.
6. The device according to claim 5, wherein: The first determining unit includes a first determining module, a second determining module and a third determining module; The first determination module is used to determine a target cluster closest to the location of the interest point from the multiple clusters according to the location of the interest point in the to-be-processed area and the distances between each cluster in the multiple clusters; The second determination module is used to fit the boundary of the target cluster according to the position of each object in the target cluster; The third determination module is used to determine the outline of the area to which the interest point belongs according to the boundary of the target cluster.
7. The device according to claim 5, wherein: The seventh determination module includes a first determination submodule and a second determination submodule; The first determining submodule is used to determine the minimum distance value among the four distance values as the distance between the position of the point of interest and the object; or, The second determining submodule is used to determine any one of the four distance values as the distance between the position of the point of interest and the object.
8. The device according to claim 5, wherein: The second determining unit further includes an eighth determining module and a ninth determining module; The eighth determination module is used to determine, for each object, a distance between the position of the interest point and any vertex of four vertices of a rectangular area corresponding to the object; The ninth determination module is used to determine the distance as the distance between the position of the point of interest and the object.
9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for determining the area contour according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method for determining the area contour according to any one of claims 1-4.
11. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method for determining a region contour according to any one of claims 1 to 4.
