CN117115647A - Method, device, equipment and storage medium for identifying ground object of large remote sensing image - Google Patents

Method, device, equipment and storage medium for identifying ground object of large remote sensing image Download PDF

Info

Publication number
CN117115647A
CN117115647A CN202311048947.5A CN202311048947A CN117115647A CN 117115647 A CN117115647 A CN 117115647A CN 202311048947 A CN202311048947 A CN 202311048947A CN 117115647 A CN117115647 A CN 117115647A
Authority
CN
China
Prior art keywords
building
instance
mask
overlapping
index
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.)
Pending
Application number
CN202311048947.5A
Other languages
Chinese (zh)
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.)
Sannong Data Guangzhou Co ltd
Original Assignee
Sannong Data Guangzhou 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 Sannong Data Guangzhou Co ltd filed Critical Sannong Data Guangzhou Co ltd
Priority to CN202311048947.5A priority Critical patent/CN117115647A/en
Publication of CN117115647A publication Critical patent/CN117115647A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a ground object identification method of a large-scale remote sensing image. The method comprises the steps of performing overlapped cutting on a large-scale remote sensing image to obtain a picture slice, dividing the picture slice instance to obtain overlapped building instances, determining an affiliated picture slice according to the overlapped building instance, determining an overlapped set and an independent target in a neighborhood range according to an index of the affiliated picture slice, screening the overlapped set to obtain an overlapped set list, and calculating mask overlapping rate of each building instance in each set and other building instances in the set according to the screened overlapped set list; and adding the instance with the mask coincidence rate higher than the threshold value to an instance object set, taking the instance with the mask coincidence rate lower than the threshold value as an independent target, generating building mask information according to the instance object set, and obtaining all building instance mask information according to the building mask information and the mask information of the independent target. The problem that an object is cut into a plurality of parts after overlapped cutting is solved.

Description

Method, device, equipment and storage medium for identifying ground object of large remote sensing image
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for identifying a ground object of a large remote sensing image.
Background
The extraction of specific features from large-area remote sensing images is a major task in remote sensing image analysis. In order to solve the problem that in the existing scheme, a large-scale remote sensing image is directly input into a network model to cause overflow of a display memory, the currently adopted technical scheme is that the large-scale remote sensing image is cut into a series of smaller images and then input into the network for prediction, and then prediction results are spliced into a final result image according to the cutting sequence, but the processing can enable objects at the cutting edge to be easily cut. Or the method adopts an overlapping mode to cut and predict, then calculates the overlapping rate between every two circumscribed rectangles of the global pair-instance division mask, and merges the circumscribed rectangles into one object after exceeding a certain threshold value, but the scheme is only applicable to the objects arranged in the horizontal direction, and has poor processing effect on the objects arranged in the non-horizontal direction.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for identifying ground objects of a large-scale remote sensing image, and aims to solve the technical problem that the remote sensing image of a non-horizontally arranged object cannot be predicted in the prior art.
In order to achieve the above purpose, the present invention provides a method for identifying ground features of a large-scale remote sensing image, which comprises the following steps:
overlapping and cutting the large-scale remote sensing image to obtain a picture slice;
performing instance segmentation on the picture slices to obtain overlapping building instances;
determining an affiliated picture slice according to the overlapped building example, and determining an overlapped set and an independent target in a neighborhood range according to the index of the affiliated picture slice;
screening the overlapping sets to obtain an overlapping set list, and calculating the mask overlapping rate of each building instance in each set and other building instances in the sets according to the screened overlapping set list; adding the instance with the mask coincidence rate higher than a threshold value to an instance object set, and taking the instance with the mask coincidence rate lower than the threshold value as an independent target;
building mask information is generated according to the instance object set, and all building instance mask information is obtained according to the building mask information and the mask information of the independent target.
Optionally, the performing instance segmentation on the picture slice to obtain an overlapping building instance includes:
obtaining a mask and rectangular frame coordinates of a building example according to the picture slice;
creating a first mask for the building instance, wherein the first mask comprises coordinate offset, rectangular frame coordinates and index information of a current picture slice relative to the large remote sensing image, and the storage size of the first mask is the same as the size of the picture slice;
and creating a second mask based on the large-scale remote sensing image, overlapping the first mask with the second mask to obtain a third mask, and obtaining an overlapped building example according to the third mask, wherein the sizes of the second mask and the third mask are the same as the size of the large-scale remote sensing image.
Optionally, the determining the image slice according to the overlapping building example, determining the overlapping set and the independent target in the neighborhood range according to the index of the image slice comprises:
determining index values of other picture slices in a neighborhood range of the index of the picture slice according to the index of the picture slice;
determining other building examples in the neighborhood range according to the index values of the other picture slices;
Traversing the building instance to obtain a rectangular frame of the building instance;
detecting rectangular frames of the building instance, and adding an index of the building instance to an overlapping set when the rectangular frames of the building instance overlap;
the building instance is determined to be an independent target when the rectangular boxes of the building instance do not overlap.
Optionally, after adding the index of the building instance to the overlapping set when there is an overlap in the rectangular boxes of the building instance, the method further includes:
traversing the overlapped set to obtain a merging zone bit of the building instance in the overlapped set;
the method comprises the steps that an intersection exists between a building instance in the overlapping set and other building instances in the overlapping set, and a marking bit of the building instance in the overlapping set is updated to True;
combining the building examples with the mark bit being True, and detecting the combined building examples;
updating the marking bit of the combined building instance to True when the intersection exists between the combined building instance and other building instances in the overlapping set, combining the building instances with the marking bit of True, and detecting the combined building instance;
And adding the building instances in the overlapping set to a result list when no intersection exists between the building instances in the overlapping set and other building instances in the overlapping set.
Optionally, before determining the index value of the other picture slice in the neighborhood range of the index of the belonging picture slice according to the index of the belonging picture slice, the method further includes:
obtaining the number of slices in the horizontal direction and the number of slices in the vertical direction according to the large-scale remote sensing image size and the overlapped cutting size;
and creating a matrix according to the number of the slices in the horizontal direction and the number of the slices in the vertical direction, wherein the number of rows and the number of columns of the matrix are consistent with the number of the slices in the horizontal direction and the number of the slices in the vertical direction.
Optionally, the determining, according to the index of the belonging picture slice, index values of other picture slices within a neighborhood range of the index of the belonging picture slice includes:
storing an index of the belonging picture slice in an index list;
judging the validity of index values in the four directions of up, down, left and right of the index of the picture slice, and adding an effective index into the index list;
Judging the validity of index values of four corners of the index of the picture slice, and adding the valid index into the index list;
and obtaining index values of other picture slices in the neighborhood range according to the index values recorded in the index list.
Optionally, the generating building mask information according to the set of instance objects, and obtaining all building instance mask information according to the building mask information and the mask information of the independent target, includes:
obtaining coordinate offset of the large-scale remote sensing image according to the construction mask information and the mask information of the independent target;
and adding the building mask information and the mask information of the independent target to the large-scale remote sensing image according to the coordinate offset to obtain all building instance mask information.
In addition, in order to achieve the above object, the present invention further provides a device for identifying a feature of a large-scale remote sensing image, where the device for identifying a feature of a large-scale remote sensing image includes:
the image slicing module is used for carrying out overlapped cutting on the large-scale remote sensing images to obtain image slices;
the example segmentation module is used for carrying out example segmentation on the picture slices to obtain overlapping building examples;
The slice overlapping module is used for determining the image slices according to the overlapping building examples, and determining overlapping sets and independent targets in a neighborhood range according to indexes of the image slices;
the instance screening module is used for screening the overlapping sets to obtain an overlapping set list, and calculating the mask overlapping rate of each building instance in each set and other building instances in the sets according to the screened overlapping set list; adding the instance with the mask coincidence rate higher than a threshold value to an instance object set, and taking the instance with the mask coincidence rate lower than the threshold value as an independent target;
and the mask fusion module is used for generating building mask information according to the instance object set and obtaining all building instance mask information according to the building mask information and the mask information of the independent target.
In addition, in order to achieve the above object, the present invention further provides a device for identifying a feature of a large-scale remote sensing image, where the device for identifying a feature of a large-scale remote sensing image includes: the system comprises a memory, a processor and a ground object recognition program of a large-scale remote sensing image, wherein the ground object recognition program of the large-scale remote sensing image is stored on the memory and can run on the processor and is configured to realize the steps of the ground object recognition method of the large-scale remote sensing image.
In addition, in order to achieve the above object, the present invention further provides a storage medium, where a feature recognition program of a large-scale remote sensing image is stored, and the feature recognition program of the large-scale remote sensing image, when executed by a processor, implements the steps of the feature recognition method of the large-scale remote sensing image as described above.
According to the method, a picture slice is obtained by overlapping and cutting a large-scale remote sensing image, an overlapping building example is obtained by dividing the picture slice example, the picture slice is determined according to the overlapping building example, an overlapping set and an independent target in a neighborhood range are determined according to indexes of the picture slice, an example with the overlapping rate higher than a threshold value is added to an example object set according to the overlapping rate of each building example in the overlapping set and other building examples in the overlapping set, an example with the overlapping rate lower than the threshold value is taken as the independent target, building mask information is generated according to the example object set, and mask information of all building examples is obtained according to the building mask information and mask information of the independent target. The original masks of which the cutting edges are cut into more than 2 parts are combined, the real masks of the objects at the cutting edges are restored, and the problem that the objects are cut into a plurality of parts after overlapped cutting is solved.
Drawings
FIG. 1 is a schematic structural diagram of a device for identifying ground objects of a large-scale remote sensing image of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for identifying features of a large-scale remote sensing image according to a first embodiment of the present invention;
FIG. 3 is a flowchart showing a method for identifying a feature of a large-scale remote sensing image according to an embodiment of the present invention;
FIG. 4 is a schematic view of image cropping overlap in an embodiment of a method for identifying features of a large-scale remote sensing image according to the present invention;
FIG. 5 is an example segmentation algorithm original mask image of an embodiment of a feature recognition method for large-scale remote sensing images according to the present invention;
FIG. 6 is a schematic view of a neighborhood of a picture slice 8 according to an embodiment of a feature recognition method for a large-scale remote sensing image of the present invention;
FIG. 7 is a diagram showing a comparison of the original mask before and after fusion according to an embodiment of the method for identifying features of a large-scale remote sensing image of the present invention;
FIG. 8 is a flowchart of a method for identifying features of a large-scale remote sensing image according to a second embodiment of the present invention;
FIG. 9 is a schematic diagram of overlapping rectangular frames of an embodiment of a method for identifying features of a large-scale remote sensing image according to the present invention;
fig. 10 is a block diagram of a first embodiment of a device for identifying features of a large-scale remote sensing image according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a ground object recognition device for a large-scale remote sensing image of a hardware operation environment according to an embodiment of the present invention.
As shown in fig. 1, the ground object recognition device for a large remote sensing image may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is not limiting of a feature recognition device for large remote sensing images and may include more or fewer components than shown, or may be combined with certain components, or may be arranged with different components.
As shown in fig. 1, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a feature recognition program for a large-scale remote sensing image.
In the ground object recognition device of the large-scale remote sensing image shown in fig. 1, the network interface 1004 is mainly used for performing data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the device for identifying the ground object of the large-scale remote sensing image can be arranged in the device for identifying the ground object of the large-scale remote sensing image, and the device for identifying the ground object of the large-scale remote sensing image calls the program for identifying the ground object of the large-scale remote sensing image stored in the memory 1005 through the processor 1001 and executes the method for identifying the ground object of the large-scale remote sensing image provided by the embodiment of the invention.
The embodiment of the invention provides a method for identifying a ground object of a large-scale remote sensing image, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method for identifying a ground object of a large-scale remote sensing image.
In this embodiment, the method for identifying features of a large-scale remote sensing image includes the following steps:
step S10: and overlapping and cutting the large-scale remote sensing image to obtain a picture slice.
It should be noted that, the execution subject of the embodiment is a ground object recognition device for a large-scale remote sensing image, where the ground object recognition device for a large-scale remote sensing image has functions of data processing, data communication, program running, etc., and the ground object recognition device for a large-scale remote sensing image may be an integrated controller, a control computer, etc., or may be other devices with similar functions, which is not limited in this embodiment.
It should be understood that the image slice is a partial image of the large-scale remote sensing image, and the image slice is obtained by overlapping and cutting the large-scale remote sensing image.
In a specific implementation, referring to fig. 3, fig. 3 is a flowchart of merging ground object recognition results of a large-scale remote sensing image. Firstly, a large-scale remote sensing image is read, then the large-scale remote sensing image is cut into 640 x 640-sized pictures, the size of an overlapping area is 32, the resolution of a slice picture and the size of the overlapping area are set according to practical situations, the embodiment is not limited to this, and the coordinate offset of the left upper corner of each picture slice relative to the left upper corner of the large-scale remote sensing image is recorded, wherein the coordinate offset can be expressed as (star_x, star_y). Referring to fig. 4, fig. 4 is a schematic diagram of image overlapping cropping. For the part which does not meet 640 x 640 size at the right edge and the bottom edge of the image in the cutting process, the image can be expanded from the rightmost edge and the bottommost edge to the inside of the image, namely, the image is expanded to the top and the left side to the 640 x 640 size area, and the overlapping area of the obtained picture slices is larger than 32.
Step S20: and carrying out instance segmentation on the picture slices to obtain overlapping building instances.
The building example refers to a remote sensing image obtained by remote sensing a building, and the overlapping building example refers to a building example of an overlapping region when subjected to overlapping clipping.
In a specific implementation, referring to fig. 5, fig. 5 is an example segmentation algorithm original mask image. Predicting the cut 640 x 640 picture slice by using YOLOv8 to obtain a mask of each building example and coordinates of a rectangular frame, and creating a 640 x 640 mask for each building example, wherein the position value of the building is 1, and the other positions are 0; storing the coordinate offset of the image relative to the large-scale remote sensing image, the coordinate of the rectangular frame, the index of the current slice picture and other information; then a mask of all 0 size is created as with the original large remote sensing image, then the mask for each building instance is superimposed on top of the mask, where there is overlap in the superimposed building, the pixel value will increase, and where there is still 1 pixel value for the non-overlapping but building. After the result of the whole remote sensing image is obtained, traversing each building instance mask of the whole remote sensing image, calculating the maximum value of pixels, and obtaining an overlapped building instance according to the building instance with the maximum value larger than 1.
Further, the performing instance segmentation on the picture slice to obtain an overlapping building instance includes:
obtaining a mask and rectangular frame coordinates of a building example according to the picture slice;
creating a first mask for the building instance, wherein the first mask comprises coordinate offset, rectangular frame coordinates and index information of a current picture slice relative to the large remote sensing image, and the storage size of the first mask is the same as the size of the picture slice;
and creating a second mask based on the large-scale remote sensing image, overlapping the first mask with the second mask to obtain a third mask, and obtaining an overlapped building example according to the third mask, wherein the sizes of the second mask and the third mask are the same as the size of the large-scale remote sensing image.
It should be noted that, the first mask refers to a mask created for each building instance, the size of the first mask is consistent with the size of the picture slice, the second mask refers to a mask created based on the read large-scale remote sensing image, the size of the mask is all 0 consistent with the large-scale remote sensing image, and the third mask refers to a fused mask obtained after the first mask and the second mask are overlapped.
In a specific implementation, YOLOv8 is used to predict the cut 640 x 640 picture slice to obtain the mask and the coordinates x of the rectangular frame of each building instance 0 ,y 0 ,x 1 ,y 1 ]Wherein x is 0 ,y 0 Representing the coordinates of the upper left corner of the rectangular frame, x 1 ,y 1 Representing the coordinates of the lower right corner of the rectangular box. A 640 x 640 mask is created for each building instance in the picture slice, where there is a building location value of 1 and other locations of 0. And stores the coordinate offset (start_x, start_y) of the rectangular frame relative to the large remote sensing image 0 ,y 0 ,x 1 ,y 1 ]And index idx of the current slice picture. Then, a mask of the same size as the large remote sensing image is created, and then, the mask of each building example is superimposed on the mask, and after the mask is superimposed, the pixel value of the building is increased to 2,3.
Step S30: and determining the image slices according to the overlapping building examples, and determining a building rectangular frame overlapping set and an independent target in a neighborhood range according to indexes of the image slices.
The neighborhood range refers to a region around a certain range centered on the index of the current picture slice, for example, the index of 8 picture slices around the index of the current picture slice.
It should be noted that an overlapping set of building rectangular frames is a set for recording overlapping building rectangular frames, and an independent object refers to a building instance that does not overlap with other building rectangular frames.
In a specific implementation, according to the index of the picture slice to which the current building example belongs, the indexes of all other picture slices in the 8 neighborhood range are calculated, and referring to fig. 6, fig. 6 is a schematic diagram of the 8 neighborhood of the picture slice. And finding all other building examples in the range according to the indexes, traversing the rectangular frame of each building example, calculating whether the rectangular frame of each building example is overlapped with the rectangular frames of other building examples in the range, and adding the indexes of the building examples into the same set. And (3) obtaining a set list after traversing, merging sets with intersections until all the sets after merging have no intersections. The building instance corresponding to the rectangular frame where no overlap occurs is taken as an independent target.
Step S40: screening the overlapping sets to obtain an overlapping set list, and calculating the mask overlapping rate of each building instance in each set and other building instances in the sets according to the screened overlapping set list; and adding the instance with the mask coincidence rate higher than a threshold value to an instance object set, and taking the instance with the mask coincidence rate lower than the threshold value as an independent target.
In a specific implementation, in the process of judging whether the building examples are overlapped according to the pixel values, if the judging result is that the overlapping building examples exist, when the overlapping building examples are obtained, the set list of all the overlapped target frames can be traversed, the whole set list is combined, and the sets with the intersections inside are combined until any two sets have no intersections. After the rectangular frames are combined, after an obtained set list is obtained, the overlapping rate between masks of building examples in the set and masks of other building examples is calculated, when the overlapping rate of the masks of two buildings is higher than a set overlapping threshold value, a list set consisting of building examples with high overlapping rate of the masks in the set can be obtained, and masks of all building examples in the set are combined to generate a new building example mask. Generating a new building instance mask includes calculating a rectangular size of each building instance in the collection, creating a full 0 mask based on the rectangular size, projecting the building instance mask in the collection onto the created mask, generating a new building instance mask, and calculating a coordinate offset of the new building instance mask based on the original large building remote sensing image. And when the mask overlapping rate of the two buildings is lower than the set overlapping threshold value, taking the current building example mask as an independent building target mask.
Step S50: building mask information is generated according to the instance object set, and all building instance mask information is obtained according to the building mask information and the mask information of the independent target.
In a specific implementation, referring to fig. 7, fig. 7 is a comparison diagram of the original mask before and after fusion. And merging the obtained building mask information of the independent target and the newly generated building mask information to obtain the final mask information of all building examples.
According to the embodiment, a picture slice is obtained by carrying out overlapping cutting on a large-scale remote sensing image, an overlapping building example is obtained by dividing the picture slice example, the picture slice is determined according to the overlapping building example, an overlapping set and an independent target in a neighborhood range are determined according to indexes of the picture slice, an example with the overlapping rate higher than a threshold value is added to an example object set according to the overlapping rate of each building example in the overlapping set and other building examples in the overlapping set, an example with the overlapping rate lower than the threshold value is taken as the independent target, building mask information is generated according to the example object set, and all building example mask information is obtained according to the building mask information and mask information of the independent target. The original masks of which the cutting edges are cut into more than 2 parts are combined, the real masks of the objects at the cutting edges are restored, and the problem that the objects are cut into a plurality of parts after overlapped cutting is solved.
Referring to fig. 8, fig. 8 is a flowchart of a second embodiment of a method for identifying features of a large-scale remote sensing image according to the present invention.
Based on the above-mentioned first embodiment, the feature recognition method of the large-scale remote sensing image in this embodiment further includes:
step S301: and determining index values of other picture slices in a neighborhood range of the index of the affiliated picture slice according to the index of the affiliated picture slice.
Step S302: determining other building examples in the neighborhood range according to the index values of the other picture slices;
step S303: traversing the building example to obtain a rectangular frame of the building example.
Step S304: detecting rectangular frames of the building instance, and adding an index of the building instance to an overlapping set when the rectangular frames of the building instance overlap.
Step S305: the building instance is determined to be an independent target when the rectangular boxes of the building instance do not overlap.
In a specific implementation, each picture slice has a corresponding index value, and a plurality of building examples can be contained in each picture slice. It is thus possible to determine the picture slice to which the current instance determination belongs and to determine the corresponding index value from the picture slice to which it belongs. After obtaining the corresponding index value of the picture slice, obtaining the index values of other picture slices in the neighborhood range according to the 8 neighborhood shown in fig. 6. After the 8-neighborhood picture is obtained and sliced and indexed, all other building examples in the range are found, the rectangular frame of each building example is traversed, and referring to fig. 9, fig. 9 is a schematic diagram of overlapping rectangular frames. Calculating if it overlaps with the rectangular boxes of other building instances in the range, and if so, adding the index of the building instance to one and the same set. Assume that the current rectangular frame coordinates are [ x ] 0 ,y 0 ,x 1 ,y 1 ]The other rectangular frame has the coordinates of x 2 ,y 2 ,x 3 ,y 3 ]If max (x 0 ,x 2 )≤min(x 1 ,x 3 )&&max(y 0 ,y 2 )≤min(y 1 ,y 3 ) If the above relationship is not satisfied, 2 rectangular frames are described as overlapping, and if the 2 rectangular frames are described as not overlapping, the building instance is determined as an independent object.
Further, after adding the index of the building instance to the overlapping set when there is an overlap in the rectangular boxes of the building instance, the method further includes:
traversing the overlapped set to obtain a merging zone bit of the building instance in the overlapped set;
the method comprises the steps that an intersection exists between a building instance in the overlapping set and other building instances in the overlapping set, and a marking bit of the building instance in the overlapping set is updated to True;
combining the building examples with the mark bit being True, and detecting the combined building examples;
updating the marking bit of the combined building instance to True when the intersection exists between the combined building instance and other building instances in the overlapping set, combining the building instances with the marking bit of True, and detecting the combined building instance;
and adding the building instances in the overlapping set to a result list when no intersection exists between the building instances in the overlapping set and other building instances in the overlapping set.
In a specific implementation, an empty list result can be created to store a final result, a variable merge represents whether to combine, a flag bit is initialized to False after creation, an overlapping set is traversed, whether an intersection exists between a building instance in the set and other building instances in the set can be judged in the traversing process, if the intersection exists, a corresponding building instance is marked as True, and the building instances marked as True are combined to obtain a combined building instance. After the merging is completed, the same detection is carried out on the merged building instance, the situation that intersection exists between the merged building instance and other building instances is judged, and the process is continuously circulated until the merged building instance and the other building instances are not intersected, at the moment, the mark position of the merged building instance is changed into False, the merged building instance is added into result, if the current building instance and the other building instances in the set are directly obtained without intersection in the judging process, the current building instance can be directly added into result.
Further, before determining the index value of the other picture slice in the neighborhood range of the index of the belonging picture slice according to the index of the belonging picture slice, the method further includes:
Obtaining the number of slices in the horizontal direction and the number of slices in the vertical direction according to the large-scale remote sensing image size and the overlapped cutting size;
and creating a matrix according to the number of the slices in the horizontal direction and the number of the slices in the vertical direction, wherein the number of rows and the number of columns of the matrix are consistent with the number of the slices in the horizontal direction and the number of the slices in the vertical direction.
In a specific implementation, the number of slices in the horizontal direction and the vertical direction after cutting is calculated, and the formula is as follows:
wherein m, n respectively represent the number of slices in the horizontal direction and the vertical direction, W, H respectively represent the width and the height of the original remote sensing image, W, H respectively represent the width and the height of the slice image, in this embodiment, w=h=640, overlap_w, overlap_h respectively represent the overlapped pixel values in the horizontal direction and the vertical direction, in this embodiment, overlap_w=overlap_h=32, and math_ceil represents the upper rounding.
After obtaining the number of slices in the horizontal direction and the vertical direction, creating a matrix Z E [0, m x n-1] of m rows and n columns according to the number m and n of slices in the horizontal direction and the vertical direction, and assuming that the index of the current building example mask is cur_indx, finding the index (i, j) of the current building example mask in Z according to the cur_indx value. Creating an 8-neighborhood index stored in an empty list neighbor, firstly checking whether indexes in the upper, lower, left and right 4 directions are valid or not, and adding the indexes into the neighbor if the indexes are valid; and then checking whether the 4 corner indexes are valid, if so, adding the indexes into neighbors, and finally finding out the corresponding value in Z according to all indexes in the neighbors, wherein the value is the 8 neighborhood value corresponding to cur_indx.
According to the embodiment, the building masks are classified according to whether overlapping is carried out or not, the overlapping building examples and the independent building examples are overlapped, and as the independent building examples have no image transformation, the overlapping building examples are affected when the overlapping building examples are combined, the position where the overlapping area is possibly appeared is determined to be reduced within the 8 neighborhood range of the picture slice where the overlapping area is located, so that not only are all the overlapping building examples found, but also the calculated amount can be greatly reduced, the original masks which are cut into more than 2 parts at the cutting edge are combined, the real masks of the objects at the cutting edge are restored, and the problem that the objects are cut into a plurality of parts after the overlapping cutting is well solved.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores a ground object recognition program of a large-scale remote sensing image, and the ground object recognition program of the large-scale remote sensing image realizes the steps of the ground object recognition method of the large-scale remote sensing image when being executed by a processor.
Referring to fig. 10, fig. 10 is a block diagram illustrating a first embodiment of a ground object recognition device for large-scale remote sensing images according to the present invention.
As shown in fig. 10, the ground object recognition device for a large-scale remote sensing image according to the embodiment of the present invention includes:
the image slicing module 10 is used for performing overlapped cutting on a large-scale remote sensing image to obtain a picture slice;
an instance segmentation module 20, configured to segment the image slice to obtain an overlapping building instance;
a slice overlapping module 30, configured to determine an affiliated picture slice according to the overlapping building instance, and determine an overlapping set and an independent target in a neighborhood range according to an index of the affiliated picture slice;
an instance screening module 40, configured to screen the overlapping sets to obtain an overlapping set list, and calculate a mask overlapping rate of each building instance in each set and other building instances in the set according to the screened overlapping set list; adding the instance with the mask coincidence rate higher than a threshold value to an instance object set, and taking the instance with the mask coincidence rate lower than the threshold value as an independent target;
and the mask fusion module 50 is used for generating building mask information according to the instance object set and obtaining all building instance mask information according to the building mask information and the mask information of the independent target.
According to the embodiment, a picture slice is obtained by carrying out overlapping cutting on a large-scale remote sensing image, an overlapping building example is obtained by dividing the picture slice example, the picture slice is determined according to the overlapping building example, an overlapping set and an independent target in a neighborhood range are determined according to indexes of the picture slice, an example with the overlapping rate higher than a threshold value is added to an example object set according to the overlapping rate of each building example in the overlapping set and other building examples in the overlapping set, an example with the overlapping rate lower than the threshold value is taken as the independent target, building mask information is generated according to the example object set, and all building example mask information is obtained according to the building mask information and mask information of the independent target. The original masks of which the cutting edges are cut into more than 2 parts are combined, the real masks of the objects at the cutting edges are restored, and the problem that the objects are cut into a plurality of parts after overlapped cutting is solved.
In an embodiment, the instance segmentation module 20 is further configured to obtain mask and rectangular frame coordinates of a building instance according to the picture slice;
creating a first mask for the building instance, wherein the first mask comprises coordinate offset, rectangular frame coordinates and index information of a current picture slice relative to the large remote sensing image, and the storage size of the first mask is the same as the size of the picture slice;
And creating a second mask based on the large-scale remote sensing image, overlapping the first mask with the second mask to obtain a third mask, and obtaining an overlapped building example according to the third mask, wherein the sizes of the second mask and the third mask are the same as the size of the large-scale remote sensing image.
In an embodiment, the slice overlapping module 30 is further configured to determine, according to the index of the belonging picture slice, index values of other picture slices within a neighborhood range of the index of the belonging picture slice; determining other building examples in the neighborhood range according to the index values of the other picture slices; traversing the building instance to obtain a rectangular frame of the building instance; detecting rectangular frames of the building instance, and adding an index of the building instance to an overlapping set when the rectangular frames of the building instance overlap; the building instance is determined to be an independent target when the rectangular boxes of the building instance do not overlap.
In an embodiment, the slice overlapping module 30 is further configured to traverse the overlapping set to obtain a merging flag bit of the building instance in the overlapping set; the method comprises the steps that an intersection exists between a building instance in the overlapping set and other building instances in the overlapping set, and a marking bit of the building instance in the overlapping set is updated to True; combining the building examples with the mark bit being True, and detecting the combined building examples; updating the marking bit of the combined building instance to True when the intersection exists between the combined building instance and other building instances in the overlapping set, combining the building instances with the marking bit of True, and detecting the combined building instance; and adding the building instances in the overlapping set to a result list when no intersection exists between the building instances in the overlapping set and other building instances in the overlapping set.
In an embodiment, the slice overlapping module 30 is further configured to obtain the number of slices in the horizontal direction and the number of slices in the vertical direction according to the large-scale remote sensing image size and the overlapping clipping size; and creating a matrix according to the number of the slices in the horizontal direction and the number of the slices in the vertical direction, wherein the number of rows and the number of columns of the matrix are consistent with the number of the slices in the horizontal direction and the number of the slices in the vertical direction.
In an embodiment, the slice overlap module 30 is further configured to store an index of the belonging picture slice in an index list; judging the validity of index values in the four directions of up, down, left and right of the index of the picture slice, and adding an effective index into the index list; judging the validity of index values of four corners of the index of the picture slice, and adding the valid index into the index list; and obtaining index values of other picture slices in the neighborhood range according to the index values recorded in the index list.
In an embodiment, the mask fusion module 50 is further configured to obtain a coordinate offset from the large remote sensing image according to the building mask information and the mask information of the independent object; and adding the building mask information and the mask information of the independent target to the large-scale remote sensing image according to the coordinate offset to obtain all building instance mask information.
It should be understood that the foregoing is illustrative only and is not limiting, and that in specific applications, those skilled in the art may set the application as desired, and the application is not limited thereto.
It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily occurring in sequence, but may be performed alternately or alternately with other steps or at least a portion of the other steps or stages.
It should be noted that the above-described working procedure is merely illustrative, and does not limit the scope of the present application, and in practical application, a person skilled in the art may select part or all of them according to actual needs to achieve the purpose of the embodiment, which is not limited herein.
Furthermore, it should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. Read Only Memory)/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The method for identifying the ground features of the large-scale remote sensing image is characterized by comprising the following steps of:
overlapping and cutting the large-scale remote sensing image to obtain a picture slice;
performing instance segmentation on the picture slices to obtain overlapping building instances;
determining an affiliated picture slice according to the overlapped building example, and determining an overlapped set and an independent target in a neighborhood range according to the index of the affiliated picture slice;
screening the overlapping sets to obtain an overlapping set list, and calculating the mask overlapping rate of each building instance in each set and other building instances in the sets according to the screened overlapping set list; adding the instance with the mask coincidence rate higher than a threshold value to an instance object set, and taking the instance with the mask coincidence rate lower than the threshold value as an independent target;
Building mask information is generated according to the instance object set, and all building instance mask information is obtained according to the building mask information and the mask information of the independent target.
2. The method of claim 1, wherein the performing instance segmentation on the picture slices to obtain overlapping building instances comprises:
obtaining a mask and rectangular frame coordinates of a building example according to the picture slice;
creating a first mask for the building instance, wherein the first mask comprises coordinate offset, rectangular frame coordinates and index information of a current picture slice relative to the large remote sensing image, and the storage size of the first mask is the same as the size of the picture slice;
and creating a second mask based on the large-scale remote sensing image, overlapping the first mask with the second mask to obtain a third mask, and obtaining an overlapped building example according to the third mask, wherein the sizes of the second mask and the third mask are the same as the size of the large-scale remote sensing image.
3. The method of claim 1, wherein the determining the belonging picture slice from the overlapping building instance, determining the overlapping set and independent targets within a neighborhood from the index of the belonging picture slice, comprises:
Determining index values of other picture slices in a neighborhood range of the index of the picture slice according to the index of the picture slice;
determining other building examples in the neighborhood range according to the index values of the other picture slices;
traversing the building instance to obtain a rectangular frame of the building instance;
detecting rectangular frames of the building instance, and adding an index of the building instance to an overlapping set when the rectangular frames of the building instance overlap;
the building instance is determined to be an independent target when the rectangular boxes of the building instance do not overlap.
4. The method of claim 3, wherein after adding the index of the building instance to the overlap set when there is overlap in the rectangular boxes of the building instance, further comprising:
traversing the overlapped set to obtain a merging zone bit of the building instance in the overlapped set;
the method comprises the steps that an intersection exists between a building instance in the overlapping set and other building instances in the overlapping set, and a marking bit of the building instance in the overlapping set is updated to True;
combining the building examples with the mark bit being True, and detecting the combined building examples;
Updating the marking bit of the combined building instance to True when the intersection exists between the combined building instance and other building instances in the overlapping set, combining the building instances with the marking bit of True, and detecting the combined building instance;
and adding the building instances in the overlapping set to a result list when no intersection exists between the building instances in the overlapping set and other building instances in the overlapping set.
5. The method of claim 3, wherein before determining the index value of the other picture slice within the neighborhood of the index of the belonging picture slice from the index of the belonging picture slice, further comprises:
obtaining the number of slices in the horizontal direction and the number of slices in the vertical direction according to the large-scale remote sensing image size and the overlapped cutting size;
and creating a matrix according to the number of the slices in the horizontal direction and the number of the slices in the vertical direction, wherein the number of rows and the number of columns of the matrix are consistent with the number of the slices in the horizontal direction and the number of the slices in the vertical direction.
6. The method of claim 3, wherein the determining, from the index of the belonging picture slice, index values for other picture slices within a neighborhood of the index of the belonging picture slice comprises:
Storing an index of the belonging picture slice in an index list;
judging the validity of index values in the four directions of up, down, left and right of the index of the picture slice, and adding an effective index into the index list;
judging the validity of index values of four corners of the index of the picture slice, and adding the valid index into the index list;
and obtaining index values of other picture slices in the neighborhood range according to the index values recorded in the index list.
7. The method of any one of claims 1 to 6, wherein generating building mask information from the set of instance objects and deriving all building instance mask information from the building mask information and mask information of the independent object comprises:
obtaining coordinate offset of the large-scale remote sensing image according to the construction mask information and the mask information of the independent target;
and adding the building mask information and the mask information of the independent target to the large-scale remote sensing image according to the coordinate offset to obtain all building instance mask information.
8. The utility model provides a ground object recognition device of remote sensing image by a wide margin, its characterized in that, remote sensing image by a wide margin's ground object recognition device includes:
The image slicing module is used for carrying out overlapped cutting on the large-scale remote sensing images to obtain image slices;
the example segmentation module is used for carrying out example segmentation on the picture slices to obtain overlapping building examples;
the slice overlapping module is used for determining the image slices according to the overlapping building examples, and determining overlapping sets and independent targets in a neighborhood range according to indexes of the image slices;
the instance screening module is used for screening the overlapping sets to obtain an overlapping set list, and calculating the mask overlapping rate of each building instance in each set and other building instances in the sets according to the screened overlapping set list; adding the instance with the mask coincidence rate higher than a threshold value to an instance object set, and taking the instance with the mask coincidence rate lower than the threshold value as an independent target;
and the mask fusion module is used for generating building mask information according to the instance object set and obtaining all building instance mask information according to the building mask information and the mask information of the independent target.
9. A ground object recognition device for a large remote sensing image, the device comprising: a memory, a processor and a feature recognition program of a large-scale remote sensing image stored on the memory and operable on the processor, the feature recognition program of the large-scale remote sensing image being configured to implement the steps of the feature recognition method of the large-scale remote sensing image as claimed in any one of claims 1 to 7.
10. A storage medium, wherein a feature recognition program of a large-scale remote sensing image is stored on the storage medium, and the feature recognition program of the large-scale remote sensing image, when executed by a processor, implements the steps of the feature recognition method of the large-scale remote sensing image according to any one of claims 1 to 7.
CN202311048947.5A 2023-08-18 2023-08-18 Method, device, equipment and storage medium for identifying ground object of large remote sensing image Pending CN117115647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311048947.5A CN117115647A (en) 2023-08-18 2023-08-18 Method, device, equipment and storage medium for identifying ground object of large remote sensing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311048947.5A CN117115647A (en) 2023-08-18 2023-08-18 Method, device, equipment and storage medium for identifying ground object of large remote sensing image

Publications (1)

Publication Number Publication Date
CN117115647A true CN117115647A (en) 2023-11-24

Family

ID=88803261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311048947.5A Pending CN117115647A (en) 2023-08-18 2023-08-18 Method, device, equipment and storage medium for identifying ground object of large remote sensing image

Country Status (1)

Country Link
CN (1) CN117115647A (en)

Similar Documents

Publication Publication Date Title
CN108960229B (en) Multidirectional character detection method and device
US8363984B1 (en) Method and system for automatically cropping images
CN101453575B (en) Video subtitle information extracting method
US8184928B2 (en) Combining seam carving an image resizing
CN112734641A (en) Training method and device of target detection model, computer equipment and medium
JPWO2008129643A1 (en) SHOT SIZE IDENTIFICATION DEVICE AND METHOD, ELECTRONIC DEVICE, AND COMPUTER PROGRAM
Kiess et al. Seam carving with improved edge preservation
CN113516666A (en) Image cropping method and device, computer equipment and storage medium
US8395824B2 (en) Method for determining ground line
CN115861609A (en) Segmentation labeling method of remote sensing image, electronic device and storage medium
Ozdemir et al. A novel algorithm for regularization of building footprints using raw LiDAR point clouds
CN115116083A (en) Method, system and storage medium for automatically identifying and correcting electric power graphics primitives of monitoring picture
CN113870196A (en) Image processing method, device, equipment and medium based on anchor point cutting graph
US20230281350A1 (en) A Computer Implemented Method of Generating a Parametric Structural Design Model
CN115880362B (en) Code region positioning method, device, computer equipment and computer readable storage medium
JPH0256707B2 (en)
CN114494323A (en) Obstacle detection method, device, equipment and storage medium
CN117115647A (en) Method, device, equipment and storage medium for identifying ground object of large remote sensing image
CN116363319A (en) Modeling method, modeling device, equipment and medium for building roof
RU2488881C2 (en) Method of identifying lines on earth's surface
CN116862920A (en) Portrait segmentation method, device, equipment and medium
CN113810626A (en) Video fusion method, device and equipment based on three-dimensional map and storage medium
CN113516609A (en) Split screen video detection method and device, computer equipment and storage medium
CN112418218B (en) Target area detection method, device, equipment and storage medium
CN118096805B (en) Full-scenic spot layout method and device, electronic equipment and 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