CN115457281A - Roof image set generation method and device, computer equipment and storage medium - Google Patents

Roof image set generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115457281A
CN115457281A CN202211404885.2A CN202211404885A CN115457281A CN 115457281 A CN115457281 A CN 115457281A CN 202211404885 A CN202211404885 A CN 202211404885A CN 115457281 A CN115457281 A CN 115457281A
Authority
CN
China
Prior art keywords
roof
sub
rooftop
map
street
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211404885.2A
Other languages
Chinese (zh)
Other versions
CN115457281B (en
Inventor
邓星
温展欧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chuanshen Hongan Intelligent Shenzhen Co ltd
Original Assignee
Zhugao Intelligent Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhugao Intelligent Technology Shenzhen Co ltd filed Critical Zhugao Intelligent Technology Shenzhen Co ltd
Priority to CN202211404885.2A priority Critical patent/CN115457281B/en
Publication of CN115457281A publication Critical patent/CN115457281A/en
Application granted granted Critical
Publication of CN115457281B publication Critical patent/CN115457281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/176Urban or other man-made structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Astronomy & Astrophysics (AREA)
  • Remote Sensing (AREA)
  • Image Processing (AREA)

Abstract

The application provides a method, a device, a computer device and a storage medium for generating a roof image set, wherein the method comprises the following steps: acquiring a street map and a satellite map corresponding to the same area; generating a first rooftop location tag of the satellite map from the street map; inputting the satellite map into a preset roof segmentation model to obtain a second roof position label of the satellite map output by the preset roof segmentation model; and comparing the first roof position label with the second roof position label, and adjusting the satellite map and/or the first roof position label according to a comparison result to obtain roof image data and a roof image label. According to the method and the device, the roof image set is prevented from being manually marked, and the efficiency of automatically obtaining the roof image set with the mark meeting the roof segmentation task is improved.

Description

Roof image set generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for generating a roof image set, a computer device, and a storage medium.
Background
A photovoltaic device is a power generation system capable of converting solar radiation energy into electric energy, and is generally installed on the roof of a building in order to collect sunlight more efficiently. In order to rapidly popularize photovoltaic equipment, the distribution conditions of roofs, such as the position and the size of the roof, in an area are generally determined in advance so as to formulate popularization and installation strategies of the photovoltaic equipment.
The roof segmentation model based on the image segmentation algorithm is favored by industry technicians because the position area of the roof can be quickly located for subsequent analysis processing. However, training a rooftop segmentation model typically requires a large number of labeled rooftop image datasets. The existing open source roof image data set is poor in mobility and cannot be suitable for other specific segmentation tasks, and in order to guarantee the segmentation effect of a roof segmentation model, the roof image data set required by the segmentation task is prepared by self. However, it is very easy to obtain the roof image required for meeting the task, but the tag picture of the roof image needs to be manually marked, which is very time-consuming and labor-consuming.
Disclosure of Invention
The embodiment of the application provides a method and a device for generating a roof image set, computer equipment and a storage medium, and aims to solve the technical problems that manual labeling is needed to automatically acquire a roof image data set required by a roof segmentation task in the prior art, and the efficiency is low.
In order to explain the technical solutions of the present application, the following description is made by referring to the accompanying drawings and specific examples.
In a first aspect, an embodiment of the present application provides a method for generating a rooftop image set, including:
acquiring a street map and a satellite map corresponding to the same area;
generating a first rooftop location tag of the satellite map from the street map;
inputting the satellite map into a preset roof segmentation model to obtain a second roof position label of the satellite map output by the preset roof segmentation model;
and comparing the first roof position label with the second roof position label, and adjusting the satellite map and/or the first roof position label according to a comparison result to obtain roof image data and a roof image label.
In a second aspect, an embodiment of the present application provides an apparatus for generating a rooftop image set, including:
the acquisition unit is used for acquiring a street map and a satellite map corresponding to the same area;
the tag generation unit is used for generating a first roof position tag of the satellite map according to the street map;
the prediction unit is used for inputting the satellite map into a preset roof segmentation model to obtain a second roof position label of the satellite map output by the preset roof segmentation model;
and the determining unit is used for comparing the first roof position label with the second roof position label and adjusting the satellite map and/or the first roof position label according to a comparison result to obtain roof image data and a roof image label.
In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor, when executing the computer program, implements the method for generating a set of roof images according to the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the method for generating a set of roof images according to the first aspect.
The embodiment of the application provides a method and a device for generating a roof image set, computer equipment and a storage medium, wherein a street map and a satellite map corresponding to the same region are firstly obtained, a first roof position label of the satellite map is generated according to the street map, the satellite map is then input into a preset roof segmentation model, a second roof position label of the satellite map output by the preset roof segmentation model is obtained, the first roof position label and the second roof position label are compared, and the satellite map and/or the first roof position label are/is adjusted according to a comparison result to obtain roof image data and a roof image label.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first flowchart of a method for generating a rooftop image set according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a street map and a satellite map of a method for generating a set of rooftop images according to an embodiment of the present disclosure;
fig. 3 is a second flowchart of a method for generating a rooftop image set according to an embodiment of the present disclosure;
fig. 4 is a third flowchart of a method for generating a rooftop image set according to an embodiment of the present disclosure;
fig. 5 is a schematic block diagram of a roof image set generation apparatus provided in an embodiment of the present application;
fig. 6 is a schematic block diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
A photovoltaic device is a power generation system capable of converting solar radiation energy into electric energy, and is generally installed on the roof of a building in order to collect sunlight more efficiently. In order to rapidly popularize photovoltaic equipment, the roof distribution conditions such as the position and the size of a roof in an area are generally determined in advance so as to formulate popularization and installation strategies of the photovoltaic equipment.
The roof segmentation model based on the image segmentation algorithm is favored by industry technicians because the position area of the roof can be quickly located for subsequent analysis processing. However, training a rooftop segmentation model typically requires a large number of labeled rooftop image datasets. The existing open source roof image data set is poor in mobility and cannot be suitable for other specific segmentation tasks, and in order to guarantee the segmentation effect of a roof segmentation model, the roof image data set required by the segmentation task is prepared by self. However, it is very easy to obtain the roof image required for meeting the task, but the label picture of the roof image needs to be manually labeled, which is time-consuming and labor-consuming.
Based on this, the application provides a method and an apparatus for generating a roof image set, a computer device and a storage medium, which can avoid the need of manually labeling the roof image data set, and improve the efficiency of automatically obtaining the labeled roof image data set satisfying the roof segmentation task.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for generating a roof image set according to an embodiment of the present application, which specifically includes the following steps S101 to S104.
S101, obtaining a street map and a satellite map corresponding to the same area.
In this embodiment, the street map and the satellite map corresponding to the same area have the same scale and size, and the content of each sub-area in the street map and the satellite map corresponds to each other. In the specific implementation process, a street map and a satellite map of a certain area can be downloaded on map software, then the street map and the satellite map are aligned in the center according to longitude and latitude coordinate information of the street map and the satellite map, the street map and the satellite map are amplified and reduced to the same scale according to the current scales of the street map and the satellite map, and the street map and the satellite map corresponding to the same area can be obtained by further cutting and aligning.
In a specific application, since the distribution characteristics of buildings in different location areas are different (and thus, the distribution characteristics of roofs are also different), in the process of acquiring the street map and the satellite map corresponding to the same area, a large area related to a roof segmentation task can be selected according to requirements, and then the street map and the satellite map corresponding to each small area can be acquired in the large area.
To better illustrate the features of the street map and the satellite map, please refer to fig. 2, in which the left diagram of fig. 2 is the street map of a certain area, and the right diagram is the satellite map of the area. The satellite map is obtained by extracting the information of objects on the earth surface through the reflection of the satellites on the electromagnetic waves and the electromagnetic waves emitted by the objects in the space, and compared with the street map, the satellite map clearly reflects the information of buildings, roads, bridges, green areas and the like on the ground, and is more three-dimensional and real.
However, the difference between the street map and the satellite map corresponding to the same area is usually small from the view point of the roof, and based on this, in the embodiment of the present application, the street map is used for generating the roof image label, and the satellite map is used for generating the roof image data.
And S102, generating a first roof position label of the satellite map according to the street map.
In the embodiment of the application, because the difference between the street map and the satellite map in the same area is small, the roof position label can be generated according to the street map and used as the first roof position label of the satellite map. The first roof location tag may be a binary map, the width and height of the binary map are the same as those of the street map, and the number of channels is 1. In the first rooftop location tag, the tag value is a first value corresponding to a rooftop area in the street map, and the tag value is a second value for a non-rooftop area in the street map.
In an embodiment, step S102 may be implemented by removing the remaining contents of the street map except the roof area based on the pixel color of the roof area in the street map to obtain a street roof image, and further converting the street roof image into a binary map to obtain a first roof position tag of the satellite map.
Specifically, since the pixel color of the roof area in the street map is usually different from the pixel color of the rest of things such as the road, in a specific implementation, the pixel values of the rest of contents that do not satisfy the pixel color value (or the pixel value range) of the roof may be set to the pixel values different from the pixel value (or the pixel value range) of the roof area based on the pixel value (or the pixel value range) of the roof area in the street map, so as to eliminate the rest of contents except the roof in the street map, thereby obtaining the street roof image. Further, a first roof position label of the satellite map is obtained by converting the street roof image into a binary map.
In some embodiments, the rejection of the rest of the street map except the roof area may be realized by directly deleting the rest of the street map except the roof area, so that only the roof area is displayed in the obtained street roof image. Further, the vacant portion may be filled with a background pixel value (e.g., pixel value 0) different from the pixel value of the rooftop area, and then the first rooftop location label of the satellite map may be obtained by converting the street rooftop image into a binary image.
In another embodiment, as shown in fig. 3, to improve the accuracy of the first roof position tag, the above step S102 may also be implemented based on the following steps S201 to S204.
S201, based on the pixel color of the roof area in the street map, eliminating the other contents except the roof area in the street map to obtain a first street roof image.
S202, edge contour detection, expansion and corrosion treatment are sequentially carried out on the first street roof image, and a target street roof area corresponding to the first street roof image is obtained.
In this embodiment, since there may be a certain range of variation in the pixel value of the roof area or noise in the roof area, in the process of removing the remaining contents of the street map except the roof area based on the pixel color of the roof area, there may be a pixel mutation value in the roof, and therefore, the edge contour detection of the roof may be continued by performing expansion and corrosion processing on the obtained first street roof image, so as to fill up the roof edge gap, so that the roof edge is smoother.
S203, adjusting all the pixel points in the target street roof area to preset pixel values to obtain a second street roof image.
And S204, converting the second street roof image into a binary image to obtain a first roof position label of the satellite map.
According to the embodiment of the application, the non-roof content is removed from the street map, the edge contour of the roof is detected, the roof is expanded and corroded, the pixel value within the edge contour of the roof is adjusted to the preset pixel value, and finally binaryzation operation is performed, so that the generation of the roof position label with higher precision is realized, and the accuracy of the first roof position label is improved.
S103, inputting the satellite map into a preset roof segmentation model to obtain a second roof position label of the satellite map output by the preset roof segmentation model.
The preset roof segmentation model can be obtained by training a pre-trained segmentation model in an open source community, and when the segmentation model is selected, the segmentation model which can be optimally represented in the current roof segmentation task and has the highest score can be selected so as to improve the performance of the roof segmentation model.
Specifically, the preset roof segmentation model can be obtained by training the pre-trained segmentation model in the open source roof image set, and the open source data set may not completely adapt to the current segmentation task, so that the trained model can adapt to the current segmentation task more based on a semi-supervised learning mode, and the model has higher performance capability in the scene of the current task.
The second roof position label is a binary map indicating the roof position in the satellite map, the width and the height of the binary map are the same as those of the satellite map, and the number of channels is 1.
In the second rooftop location tag, the tag value is a first value corresponding to a rooftop area in the satellite map, and the tag value is a second value for a non-rooftop area in the satellite map.
And S104, comparing the second roof position label with the first roof position label, and adjusting the satellite map and/or the first roof position label according to the comparison result to obtain roof image data and a roof image label.
In the embodiment of the application, the street map and the satellite map are usually not completely matched, so that a second roof position label reflecting the roof region position in the satellite map needs to be compared with a first roof position label reflecting the roof position of the street map, and then the satellite map and/or the first roof position label are adjusted according to the comparison result, so that the satellite map is completely matched with the first roof position label, and then the satellite map can be used as the roof image data, and the first roof position label is used as the label of the satellite map, namely the roof image label.
Specifically, in an embodiment, in the step S104, comparing the second roof position label with the first roof position label may be performed by dividing the second roof position label and the first roof position label into a plurality of sub-regions with preset sizes, determining whether each sub-region is a roof sub-region based on pixel values in the sub-regions of the second roof position label and the first roof position label, and comparing whether the corresponding sub-regions of the second roof position label and the first roof position label are the same.
In this embodiment, the first location tag and the second location tag have the same size, and the preset size of the sub-area may be determined according to the building type of the area where the street map and the satellite map are located, the building density, and other building distribution characteristics.
Specifically, the preset size of the sub-region may be determined according to an average area corresponding to the building type, that is, the preset size of the sub-region may increase with an increase in the average area corresponding to the building type in the region, for example, the preset size of the sub-region corresponding to the region where the building type is mainly a large roof building such as a factory building and a public building should be larger than the preset size of the sub-region corresponding to the region where the building type is mainly a small roof building such as a residential building and a shop.
For another example, the preset size of the sub-area may also be reduced as the density of the building increases, so that the size of the sub-area may be matched to a roof.
It should be noted that, since the first position tag and the second position tag have the same size, the dividing the second roof position tag and the first roof position tag into a plurality of sub-areas with preset sizes refers to dividing the second roof position tag and the first roof position tag into a plurality of corresponding sub-areas with preset sizes according to the same dividing manner.
In this embodiment, in the process of determining whether each sub-region is a roof sub-region based on the tag values in the sub-regions in the second roof position tag and the first roof position tag, it may be determined whether the sub-region is a roof sub-region or not based on the ratio of the tag values corresponding to the roof positions in the sub-regions.
In an embodiment, as shown in fig. 4, in the process of adjusting the satellite map and/or the first rooftop location tag according to the comparison result in S104 to obtain the rooftop image data and the rooftop image tag, the following steps S301 to S303 may be performed on each sub-area corresponding to the second rooftop location tag and the first rooftop location tag.
And S301, if the sub-area of the first roof position label is a roof sub-area and the sub-area of the second roof position label is not a roof sub-area, shielding the corresponding sub-area of the satellite map and shielding the sub-area of the first roof position label.
In this embodiment, if the sub-region of the first roof position tag is a roof sub-region, and the sub-region of the second roof position tag is not a roof sub-region, it is described that the corresponding sub-region on the street map is a roof region, and the corresponding sub-region of the satellite map may be very large and may not be a roof region, and in consideration of a situation that a preset roof segmentation model may have inference errors, both the sub-region of the satellite map corresponding to the sub-region and the sub-region of the first roof position tag may be shielded, so as to improve matching between the sub-region of the satellite map and the sub-region of the first roof position tag.
The corresponding sub-area of the shielding satellite map can be realized by setting the pixel value of the sub-area to be the other pixel values different from the pixel value of the current roof area; the shielding of the sub-region of the first rooftop location tag may refer to replacing the tag value of the corresponding sub-region with the tag value of the non-rooftop region in the first rooftop location tag (binary map), so as to match the sub-region of the satellite map with the first rooftop location tag.
And S302, if the sub-area of the first roof position label is not the roof sub-area and the sub-area of the second roof position label is the roof sub-area, shielding the corresponding sub-area of the satellite map.
In this embodiment, if the sub-region of the first roof location tag is not a roof sub-region, and the sub-region of the second roof location tag is a roof sub-region, it may be described that the corresponding sub-region on the street map is not a roof region, and the sub-region corresponding to the satellite map is most likely a roof region (of course, it is also possible that an inference error occurs, and the corresponding sub-region of the satellite map is not a roof region).
The shielding of the sub-area corresponding to the satellite map may refer to setting a pixel value of the sub-area to be a remaining pixel value different from a pixel value of the current roof area.
And step S303, determining the finally obtained satellite map as roof image data, and determining the finally obtained first roof position label as a roof image label.
In this embodiment, because the street map and the satellite map are usually not completely matched, the first roof position label generated based on the street map may not be able to accurately mark the position of the roof area in the satellite map actually, and based on this, the satellite map is further input into the preset roof segmentation model to obtain the second roof position label output by the preset roof segmentation model for reasoning the roof area in the satellite map, and then the satellite map and/or the first roof position label are adjusted according to the comparison between the second roof position label and the first roof position label, so that the satellite map and the first roof position label are matched to a greater extent.
In some embodiments, the step of adjusting the satellite map and/or the first rooftop location tag according to the comparison result to obtain the rooftop image data and the rooftop image tag may further include the following steps S31 to S32.
S31, if the sub-area of the first roof position label and the sub-area of the second roof position label are both roof sub-areas, carrying out contour recognition on the sub-areas corresponding to the satellite map to obtain the number of contours of the sub-areas corresponding to the satellite map;
and S32, judging whether the number of the outlines is greater than a preset outline value, and if the number of the outlines is greater than the preset outline value, shielding the satellite map and the sub-area of the first roof position label.
In this embodiment, when the sub-area of the first rooftop location tag and the sub-area of the second rooftop location tag are both sub-areas of a rooftop, it is possible that a plurality of small rooftops with small actual location intervals or objects with a certain height are connected together to form a large rooftop. In some roof partitioning targets, small roof, non-roof objects are not usually partitioning targets, for example, installation of photovoltaic devices usually requires a large area of roof. In order to avoid that the segmentation model takes a small roof and a non-roof object as segmentation targets, the number of the outlines of the sub-region can be judged by carrying out outline detection on the corresponding sub-region of the satellite map, and if the number of the outlines of the sub-region is larger than a preset outline value, the sub-region can be considered to be composed of a plurality of scattered small roofs and even objects with a certain height but not roofs, so that the satellite map and the sub-region of the first roof position label can be shielded, the roof segmentation model can be guided to segment a large roof, and the probability that the model segments the small roofs irrelevant to actual requirements is reduced.
In some specific areas, there may be a situation where the satellite map and the street map are nearly the same, that is, the first roof location label generated from the street map and the second roof location label inferred from the satellite map by the preset roof segmentation model may be the same, and based on this, in some embodiments, the above step S104 may be performed instead: and comparing the first roof position label with the second roof position label, if the first roof position label is determined to be the same as the second roof position label, determining the satellite map as roof image data, and determining the first roof position label as the roof image label.
In this embodiment, if the first roof position tag is the same as the second roof position tag, it is described that the first roof position tag can already match the satellite map, and therefore, the satellite map may be determined as the roof image data, and the first roof position tag may be determined as the roof image tag.
The embodiment of the application provides a method, a device and computer equipment for generating a roof image set, wherein a street map and a satellite map corresponding to the same area are obtained firstly, a first roof position label of the satellite map is generated according to the street map, the satellite map is input into a preset roof segmentation model, a second roof position label of the satellite map output by the preset roof segmentation model is obtained, the first roof position label is compared with the second roof position label, and the satellite map and/or the first roof position label are/is adjusted according to a comparison result to obtain roof image data and the roof image label.
The embodiment of the present application further provides a device for generating a rooftop image set, which is used to execute any embodiment of the method for generating a rooftop image set. Specifically, please refer to fig. 5, which illustrates a schematic structural diagram of a roof image set generating apparatus 500 provided in an embodiment of the present application, including an obtaining unit 501, a label generating unit 502, a predicting unit 503, and a determining unit 504.
An obtaining unit 501, configured to obtain a street map and a satellite map corresponding to the same area;
a tag generation unit 502, configured to generate a first roof location tag of a satellite map according to a street map;
the prediction unit 503 is configured to input the satellite map into the preset roof segmentation model to obtain a second roof position tag of the satellite map output by the preset roof segmentation model;
the determining unit 504 is configured to compare the first roof location tag with the second roof location tag, and adjust the satellite map and/or the first roof location tag according to the comparison result, so as to obtain roof image data and a roof image tag.
In some embodiments of the present application, the tag generating unit 502 may further specifically be configured to: removing the other contents except the roof area in the street map based on the pixel color of the roof area in the street map to obtain a street roof image; and converting the street roof image into a binary map to obtain a first roof position label of the satellite map.
In some embodiments of the present application, the tag generating unit 502 may be further specifically configured to remove, based on a pixel color of a roof area in a street map, other contents except the roof area in the street map, so as to obtain a first street roof image; sequentially carrying out edge contour detection, expansion and corrosion treatment on the first street roof image to obtain a target street roof area corresponding to the first street roof image; adjusting all pixel points in the target street roof area to preset pixel values to obtain a second street roof image; and converting the second street roof image into a binary image to obtain a first roof position label of the satellite map.
In some embodiments of the present application, the determining unit 504 may be further specifically configured to divide the first rooftop location label and the second rooftop location label into a plurality of sub-areas with preset sizes; determining whether each sub-region is a rooftop sub-region based on the tag values in the sub-regions of the first rooftop location tag and the second rooftop location tag; and comparing whether the corresponding sub-areas in the first roof position label and the second roof position label are the same or not.
In some embodiments of the present application, the determining unit 504 may be further specifically configured to, for each sub-area corresponding to the first rooftop location tag and the second rooftop location tag: if the sub-region of the first roof position label is a roof sub-region and the sub-region of the second roof position label is not a roof sub-region, shielding the corresponding sub-region of the satellite map and shielding the sub-region of the first roof position label; if the sub-region of the first roof position label is not the roof sub-region and the sub-region of the second roof position label is the roof sub-region, shielding the corresponding sub-region of the satellite map; and determining the finally obtained satellite map as roof image data, and determining the finally obtained first roof position label as a roof image label.
In some embodiments of the application, the determining unit 504 may be further specifically configured to, if the sub-region of the first roof position tag and the sub-region of the second roof position tag are both roof sub-regions, perform contour identification on the sub-region corresponding to the satellite map to obtain the number of contours of the sub-region corresponding to the satellite map; judging whether the number of the contours is larger than a preset contour value or not; and if the number of the outlines of the sub-areas is larger than the preset outline value, shielding the satellite map and the sub-areas of the first roof position labels.
In some embodiments of the application, the determining unit 504 may be further specifically configured to compare the first rooftop location tag with the second rooftop location tag, determine the satellite map as the rooftop image data if it is determined that the first rooftop location tag is the same as the second rooftop location tag, and determine the first rooftop location tag as the rooftop image tag.
It should be noted that, as will be clear to those skilled in the art, the specific implementation process of the roof image set generation apparatus and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
The means for generating the set of rooftop images described above may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 600 may be a smart phone, a tablet computer, a Personal Computer (PC), a learning machine, or the like.
Referring to fig. 6, the computer apparatus 600 includes a processor 602, a memory, which may include a storage medium 603 and an internal memory 604, and a network interface 605 connected by a device bus 601.
The storage medium 603 may store an operating system 6031 and computer programs 6032. The computer program 6032, when executed, may cause the processor 602 to perform a method of roof image set generation.
The processor 602 is used to provide computing and control capabilities, supporting the operation of the overall computer device 600.
The internal memory 604 provides an environment for the execution of a computer program 6032 in the storage medium 603, which computer program 6032, when executed by the processor 602, may cause the processor 602 to perform a method of roof image set generation.
The network interface 605 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the subject application and does not constitute a limitation of the computing device 600 upon which the subject application may be implemented, and that a particular computing device 600 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 602 is configured to run a computer program 6032 stored in the memory to implement the method for generating a set of roof images disclosed in the embodiment of the present application.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 6 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 6, and are not described herein again.
It should be understood that, in the embodiment of the present Application, the Processor 602 may be a Central Processing Unit (CPU), and the Processor 602 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the present application, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium or a volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the method for generating a set of rooftop images disclosed in the embodiments of the present application.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described devices, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of units is only a logical division, and there may be other divisions when the actual implementation is implemented, or units having the same function may be grouped into one unit, for example, multiple units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a backend server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention, and these modifications or substitutions are intended to be included in the scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of generating a set of rooftop images, the method comprising:
acquiring a street map and a satellite map corresponding to the same area;
generating a first rooftop location tag of the satellite map from the street map;
inputting the satellite map into a preset roof segmentation model to obtain a second roof position label of the satellite map output by the preset roof segmentation model;
and comparing the first roof position label with the second roof position label, and adjusting the satellite map and/or the first roof position label according to a comparison result to obtain roof image data and a roof image label.
2. The method of claim 1, wherein generating the first rooftop location tag for the satellite map from the street map comprises:
removing the other contents except the roof area in the street map based on the pixel color of the roof area in the street map to obtain a street roof image;
and converting the street roof image into a binary image to obtain the first roof position label of the satellite map.
3. The method of claim 1, wherein generating the first rooftop location tag for the satellite map from the street map comprises:
removing the other contents except the roof area in the street map based on the pixel color of the roof area in the street map to obtain a first street roof image;
sequentially carrying out edge contour detection, expansion and corrosion treatment on the first street roof image to obtain a target street roof area corresponding to the first street roof image;
adjusting all pixel points in the target street roof area to preset pixel values to obtain a second street roof image;
and converting the second street roof image into a binary image to obtain the first roof position label of the satellite map.
4. The method of any one of claims 1-3, wherein said comparing the first rooftop location label to the second rooftop location label comprises:
dividing the first and second rooftop location tags into a plurality of sub-regions of a preset size;
determining whether each of the sub-regions is a rooftop sub-region based on tag values in the sub-regions in the first and second rooftop location tags;
and comparing whether the corresponding sub-areas in the first roof position label and the second roof position label are the same or not.
5. The method of claim 4, wherein the adjusting the satellite map and/or the first rooftop location tag according to the comparison result to obtain rooftop image data and a rooftop image tag comprises:
for each sub-region to which the first and second rooftop location tags correspond:
if the sub-region of the first rooftop location tag is a rooftop sub-region and the sub-region of the second rooftop location tag is not a rooftop sub-region, shielding the corresponding sub-region of the satellite map and shielding the sub-region of the first rooftop location tag;
if the sub-region of the first rooftop location tag is not a rooftop sub-region and the sub-region of the second rooftop location tag is a rooftop sub-region, shielding the corresponding sub-region of the satellite map;
and determining the finally obtained satellite map as the roof image data, and determining the finally obtained first roof position label as the roof image label.
6. The method of claim 5, wherein the adjusting the satellite map and/or the first rooftop location tag according to the comparison result to obtain rooftop image data and a rooftop image tag further comprises:
if the sub-region of the first roof position label and the sub-region of the second roof position label are both roof sub-regions, performing contour identification on the sub-region corresponding to the satellite map to obtain the number of contours of the sub-region corresponding to the satellite map;
judging whether the number of the profiles is larger than a preset profile value or not;
and if the number of the outlines is greater than the preset outline value, shielding the satellite map and the sub-area of the first roof position label.
7. The method of claim 1, wherein comparing the first rooftop location label with the second rooftop location label and adjusting the satellite map and/or the first rooftop location label according to the comparison result to obtain rooftop image data and a rooftop image label is replaced by:
and comparing the first roof position label with the second roof position label, if the first roof position label is determined to be the same as the second roof position label, determining the satellite map as the roof image data, and determining the first roof position label as the roof image label.
8. An apparatus for generating a set of rooftop images, comprising:
the acquisition unit is used for acquiring a street map and a satellite map corresponding to the same area;
the tag generation unit is used for generating a first roof position tag of the satellite map according to the street map;
the prediction unit is used for inputting the satellite map into a preset roof segmentation model to obtain a second roof position label of the satellite map output by the preset roof segmentation model;
and the determining unit is used for comparing the first roof position label with the second roof position label and adjusting the satellite map and/or the first roof position label according to a comparison result to obtain roof image data and a roof image label.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the method of generating a set of rooftop images as defined in any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202211404885.2A 2022-11-10 2022-11-10 Roof image set generation method and device, computer equipment and storage medium Active CN115457281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211404885.2A CN115457281B (en) 2022-11-10 2022-11-10 Roof image set generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211404885.2A CN115457281B (en) 2022-11-10 2022-11-10 Roof image set generation method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115457281A true CN115457281A (en) 2022-12-09
CN115457281B CN115457281B (en) 2023-02-14

Family

ID=84295474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211404885.2A Active CN115457281B (en) 2022-11-10 2022-11-10 Roof image set generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115457281B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092877A (en) * 2017-04-12 2017-08-25 武汉大学 Remote sensing image roof contour extracting method based on basement bottom of the building vector
CN111291608A (en) * 2019-11-12 2020-06-16 广东融合通信股份有限公司 Remote sensing image non-building area filtering method based on deep learning
CN112989469A (en) * 2021-03-19 2021-06-18 深圳市智绘科技有限公司 Building roof model construction method and device, electronic equipment and storage medium
CN114549998A (en) * 2021-11-16 2022-05-27 国网浙江省电力有限公司经济技术研究院 Satellite image-based anti-interference evaluation method for photovoltaic potential of roof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092877A (en) * 2017-04-12 2017-08-25 武汉大学 Remote sensing image roof contour extracting method based on basement bottom of the building vector
CN111291608A (en) * 2019-11-12 2020-06-16 广东融合通信股份有限公司 Remote sensing image non-building area filtering method based on deep learning
CN112989469A (en) * 2021-03-19 2021-06-18 深圳市智绘科技有限公司 Building roof model construction method and device, electronic equipment and storage medium
CN114549998A (en) * 2021-11-16 2022-05-27 国网浙江省电力有限公司经济技术研究院 Satellite image-based anti-interference evaluation method for photovoltaic potential of roof

Also Published As

Publication number Publication date
CN115457281B (en) 2023-02-14

Similar Documents

Publication Publication Date Title
CN110307838B (en) Robot repositioning method and device, computer-readable storage medium and robot
CN106997466B (en) Method and device for detecting road
CN110781756A (en) Urban road extraction method and device based on remote sensing image
CN112800915A (en) Building change detection method, building change detection device, electronic device, and storage medium
CN112101309A (en) Ground object target identification method and device based on deep learning segmentation network
CN111797571B (en) Landslide susceptibility evaluation method, landslide susceptibility evaluation device, landslide susceptibility evaluation equipment and storage medium
CN113744144B (en) Remote sensing image building boundary optimization method, system, equipment and storage medium
Aslani et al. Automatic identification of utilizable rooftop areas in digital surface models for photovoltaics potential assessment
CN112883900B (en) Method and device for bare-ground inversion of visible images of remote sensing images
CN114882316A (en) Target detection model training method, target detection method and device
CN112991307A (en) Defect circle fitting method and device for drilling blasting and medium
CN104123310A (en) Method and device for processing road network information based on satellite image
CN107835998B (en) Hierarchical tiling method for identifying surface types in digital images
CN115019163A (en) City factor identification method based on multi-source big data
CN114596431A (en) Information determination method and device and electronic equipment
CN115457281B (en) Roof image set generation method and device, computer equipment and storage medium
CN117036457A (en) Roof area measuring method, device, equipment and storage medium
CN115049997B (en) Method and device for generating edge lane line, electronic device and storage medium
CN113658195B (en) Image segmentation method and device and electronic equipment
CN115424141A (en) Photovoltaic installed capacity calculation method and device, electronic equipment and medium
CN113835099B (en) Point cloud map updating method and device, storage medium and electronic equipment
CN114443679A (en) Map data updating method, device, equipment and storage medium
CN113486728A (en) Method and device for detecting surface three-dimensional change based on feature fusion
Guindon A framework for the development and assessment of object recognition modules from high-resolution satellite images
CN114155508B (en) Road change detection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 518000, 1005A, Tianlong Mobile Headquarters Building, Tongfa South Road, Xili Community, Xili Street, Nanshan District, Shenzhen, Guangdong Province

Patentee after: Chuanshen Hongan Intelligent (Shenzhen) Co.,Ltd.

Country or region after: China

Address before: 1301, Building F, Tongfang Information Port, No. 11, Langshan Road, Songpingshan Community, Xili Street, Nanshan District, Shenzhen, Guangdong 518000

Patentee before: Zhugao Intelligent Technology (Shenzhen) Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address