Image segmentation method and computer device

By segmenting remote sensing images into blocks and grouping them by reflectance, the problem of inaccurate image segmentation in existing technologies has been solved, achieving more efficient and accurate image segmentation and meeting the analysis needs of environmental and water conservation information.

CN115861838BActive Publication Date: 2026-03-03STATE GRID HEBEI ELECTRIC POWER CO LTD CONSTR CO +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211542883.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2026-03-03
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

Existing image segmentation techniques cannot fully reflect the differences in spectral reflectance between ground features in multi-band images, resulting in inaccurate image segmentation and failing to meet the requirements for accurate analysis of environmental and water conservation information.

Method used

By dividing the remote sensing image to be segmented into blocks and determining the reflectance grouping method of multiple bands based on the reflectance of ground objects in each block, and combining the reflectance differences of multiple bands to determine the segmentation line, the segmentation lines of the block images are merged to generate a segmentation map, thus fully exploring the natural differences in the spectral reflectance of ground objects.

Benefits of technology

It improves the accuracy and efficiency of image segmentation, and the data classification effect is good, enabling more accurate analysis of environmental and water conservation information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861838B_ABST
    Figure CN115861838B_ABST
Patent Text Reader

Abstract

The application provides an image segmentation method and a computer device, wherein the image segmentation method comprises the following steps: acquiring a to-be-segmented remote sensing image of a to-be-analyzed region; determining a block image size, and blocking the to-be-segmented remote sensing image according to the block image size to obtain a plurality of block images; respectively determining a reflection rate grouping mode of a plurality of bands according to the ground object reflection rate of a block grid in each block image; determining a segmentation line of the block image according to the reflection rate grouping mode of the plurality of bands; and combining the segmentation lines of the plurality of block images to obtain a segmentation graph of the to-be-segmented remote sensing image. The scheme of the application can fully utilize the natural difference rule of the ground object information of the multispectral image, and realizes accurate and efficient image segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and in particular to an image segmentation method and computer device. Background Technology

[0002] During the environmental protection and water conservation work supervision process in the construction period of power transmission lines, it is necessary to obtain the area of ​​disturbance, covering, and other environmental protection and water conservation information in a timely manner. With the launch of my country's "Gaofen" series of remote sensing satellites, more and more multispectral data have provided a solid data foundation for the timely acquisition of environmental protection and water conservation information.

[0003] In the field of image information extraction, object-oriented remote sensing information extraction is a commonly used technique. Image segmentation is the foundation of object-oriented remote sensing information extraction technology, and the accuracy and processing efficiency of segmentation are key to the practicality of the technology.

[0004] Existing image segmentation techniques, such as multi-scale segmentation algorithms, are not widely used because they fail to fully reflect the natural differences in spectral reflectance between ground features in multi-band images, resulting in poor performance. Therefore, existing image segmentation techniques cannot meet the requirements for accurate analysis of environmental and water conservation information. Summary of the Invention

[0005] One object of the present invention is to provide an accurate image segmentation method and computer device.

[0006] Specifically, the present invention provides an image segmentation method, comprising:

[0007] Acquire the remote sensing image of the region to be analyzed to be segmented;

[0008] Determine the size of the segmented image, and divide the remote sensing image to be segmented into segments according to the segmented image size to obtain multiple segmented images;

[0009] The reflectance grouping method for multiple bands is determined based on the reflectance of ground features in each block of image.

[0010] The segmentation lines of the image blocks are determined based on the reflectance grouping method of multiple bands; and

[0011] By merging the dividing lines of multiple image blocks, a segmentation map of the remote sensing image to be segmented is obtained.

[0012] Optionally, the steps for acquiring the remote sensing image of the region to be analyzed to be segmented include:

[0013] Obtain the location information of the area to be analyzed;

[0014] Obtain the original image corresponding to the location information;

[0015] Preprocess the original image;

[0016] The preprocessed image is cropped using a polygon with a set vector to obtain a remote sensing image of the desired shape.

[0017] Optionally, the steps for determining the size of the segmented image include:

[0018] Identify and extract the size of the target category in the remote sensing image to be segmented;

[0019] The size of the segmented image is obtained by expanding the size of the target category in the remote sensing image to be segmented by a set number of pixels.

[0020] Optionally, after the step of dividing the remote sensing image to be segmented into blocks according to the block image size, the method further includes:

[0021] The undivided portions of the remote sensing image to be segmented are merged into adjacent segmented images.

[0022] Optionally, the step of determining the reflectance grouping method for multiple bands based on the reflectance of ground features in each block of image includes:

[0023] Obtain the multi-band reflectance of ground features in each raster block within each image block;

[0024] The reflectance of ground objects in each grid block of each band is sorted to obtain a single-band reflectance sequence;

[0025] By naturally grouping the single-band reflectivity sequence, a variety of alternative grouping methods can be obtained;

[0026] Select the grouping method with the smallest intra-group deviation among multiple alternative grouping methods as the reflectance grouping method for this band;

[0027] Grouping methods for reflectance across multiple spectral bands.

[0028] Optionally, the step of selecting the grouping method with the smallest within-group bias among multiple alternative grouping methods includes:

[0029] Calculate the sum of squared deviations of the category means for multiple alternative grouping methods;

[0030] Determine the alternative grouping method that minimizes the sum of squared deviations of the category means.

[0031] Optionally, the method further includes the following steps before the step of naturally grouping the single-band reflectance sequences:

[0032] Estimate the number of natural land cover types contained in the remote sensing image to be segmented;

[0033] Set the estimated number of natural land types as the number of groups in the natural grouping.

[0034] Optionally, the step of determining the segmentation lines of the image based on the reflectance grouping method of multiple bands includes:

[0035] Calculate the difference in reflectance on both sides of the grouping interval in the reflectance grouping method for multiple bands;

[0036] Sort the differences in reflectivity from largest to smallest;

[0037] Determine the grid blocks corresponding to the difference in reflectivity between the first and a set number of grid blocks;

[0038] Use the segmented grid as the breakpoint location;

[0039] Connect the breakpoints to obtain the segmentation lines of the segmented image.

[0040] According to another aspect of the present invention, a computer device is also provided, including a memory, a processor, and a machine-executable program stored in the memory and running on the processor, wherein the processor, when executing the machine-executable program, implements a method for segmenting images according to any of the preceding claims.

[0041] The image segmentation method of this invention divides the remote sensing image of the area to be analyzed into a predetermined number of image blocks according to the size of the image blocks; determines the grid breakpoint position of each band based on the ground reflectance of each image block; determines the segmentation lines of the image blocks based on the grid breakpoint positions of multiple bands; and merges the segmentation lines of multiple image blocks to obtain a segmented image of the remote sensing image to be segmented. The number and size of the image blocks are determined according to the segmentation requirements. Based on the determined image block size and segmentation, the segmentation lines are determined by the ground reflectance of multiple bands, making the segmentation more accurate and efficient.

[0042] Furthermore, the image segmentation method of the present invention naturally groups the reflectance of ground objects in each grid cell of the segmented image, selects the group with the smallest deviation within the group as the reflectance group for the corresponding band, and calculates the deviation using the sum of squared deviations of the mean of the categories. This fully exploits the natural differences in the spectral reflectance of ground objects, resulting in good data classification and high computational efficiency. By comprehensively considering the reflectance of ground objects in multiple bands, the accuracy of segmentation is further improved.

[0043] The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description

[0044] The following sections will describe some specific embodiments of the invention in detail by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or portions. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:

[0045] Figure 1 This is a schematic flowchart of an image segmentation method according to an embodiment of the present invention;

[0046] Figure 2 This is a schematic diagram illustrating the determination of a band grid breakpoint position in a segmented image according to an embodiment of the present invention.

[0047] Figure 3 This is a schematic diagram illustrating the determination of segmentation lines for segmented images in an image segmentation method according to an embodiment of the present invention; and

[0048] Figure 4 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0049] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.

[0050] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0051] Figure 1 This is a schematic flowchart of an image segmentation method according to an embodiment of the present invention. The image segmentation method of this embodiment generally includes the following steps:

[0052] Step S102: Obtain the remote sensing image to be segmented for the area to be analyzed. The remote sensing image to be segmented can be obtained from raw images taken by remote sensing satellites. The raw image can be a satellite image reflecting the reflectivity of ground features. Ground feature reflectivity is the percentage of reflected energy of a ground feature to the total incident energy. Ground features have different reflectivities at different wavelengths, and different ground features also have different reflectivities at the same wavelength. Ground feature reflectivity mainly depends on geographical location, lighting conditions, the properties of the ground feature itself (such as dryness and wetness, surface condition), and environmental influencing factors. Therefore, the analysis of ground feature reflectivity can determine the required ground feature type (e.g., environmental protection and water conservation feature information).

[0053] Step S102, a specific acquisition process, can be as follows: acquire the location information of the area to be analyzed; acquire the original image corresponding to the location information; preprocess the original image; and crop the preprocessed image using a polygon with a set vector to obtain a remote sensing image of the desired shape. For example, when the method of this embodiment is applied to an ultra-high voltage power transmission and transformation project, the original remote sensing image is first acquired based on the project location information, and then cropped using a buffer zone (1 km) around the project location. The specific cropping shape and buffer zone size can be determined according to the terrain of the area to be processed.

[0054] Preprocessing of the original image can include radiometric correction, atmospheric correction, geometric correction, and cropping. Preprocessing the original image can improve the accuracy of subsequent image processing. The aforementioned radiometric, atmospheric, and geometric correction techniques are well-known to those skilled in the art and will not be elaborated upon here. The reflectance of ground features at various locations in multiple bands can be determined from the remote sensing image to be segmented.

[0055] Step S104: Determine the image block size, and divide the remote sensing image to be segmented into blocks according to the image block size to obtain multiple image blocks. In this embodiment, the image block size must be sufficient to include the land cover type to be analyzed.

[0056] The process of determining the segmented image size in step S104 may include: identifying the size of the target category in the remote sensing image to be segmented; and expanding the size of the target category in the remote sensing image to be segmented by a set number of pixels to obtain the segmented image size. The target category can be determined through preliminary analysis of the image, or it can be manually defined or selected. For example, the segmented image size can be set by expanding the area of ​​the extracted category in the remote sensing image to be segmented by a certain number (e.g., 100) pixels (where a and b are the number of rows and columns of the segmented image, and the reference size can be 800*800 for the segmentation of underground cable coverings). Based on the situation of the remote sensing image to be segmented, the number of natural land cover types contained in the remote sensing image to be segmented at this size can be estimated and denoted as e.

[0057] Step S104, following the step of dividing the remote sensing image to be segmented into blocks according to the block image size, further includes: merging the undivided portions of the remote sensing image to be segmented into adjacent block images. That is, based on the block image size, the remote sensing image to be segmented can be divided into m rows and n columns of block images, resulting in m*n block images. The remaining image regions (images at corner positions with sizes smaller than the block image size) are merged into their respective adjacent block images. Those skilled in the art can adjust the segmentation method and the number of segments of the remote sensing image according to the requirements of image segmentation.

[0058] Step S106: Determine the reflectance grouping method for multiple bands based on the reflectance of ground objects in the raster blocks of each image block. Specifically, the process of determining the grouping method may include: acquiring the multi-band reflectance of ground objects in each raster block within each image block; sorting the reflectance of ground objects in each raster block of each band to obtain a single-band reflectance sequence; naturally grouping the single-band reflectance sequence to obtain multiple candidate grouping methods; selecting the grouping method with the smallest intra-group deviation from the multiple candidate grouping methods as the reflectance grouping method for this band; and statistically analyzing the reflectance grouping methods for multiple bands. A raster block can be a single pixel in the image or a set of multiple adjacent pixels.

[0059] For example, if a patch image has i rows and j columns of raster blocks and S bands of ground reflectance, then firstly, the ground reflectance of the first band of the i rows and j columns of raster blocks is sorted. By performing natural grouping and deviation calculation on the reflectance sequence of the first band, the reflectance grouping method of the first band is obtained. If the S bands are processed one by one, then S reflectance grouping methods are obtained.

[0060] The calculation method for selecting a reflectance grouping method from multiple alternative grouping methods based on deviation can be as follows: calculate the sum of squared deviations of the class means of multiple alternative grouping methods; determine the alternative grouping method with the smallest sum of squared deviations of the class means.

[0061] The number of groups for natural grouping can be set based on the number of natural land cover types contained in the remote sensing image to be segmented or a manually set number. For example, before the step of natural grouping the reflectance of land cover in the segmented image, the method may include: estimating the number of natural land cover types contained in the remote sensing image to be segmented; and setting the estimated number of natural land cover types as the number of groups for natural grouping.

[0062] Step S108: Determine the segmentation line of the block image based on the reflectance grouping method of multiple bands. One method for determining the segmentation line is as follows: calculate the reflectance difference on both sides of the grouping interval in the reflectance grouping method of multiple bands; sort the reflectance differences from largest to smallest; determine the block grid corresponding to the reflectance differences of the first set number of sorted values; use the block grid as the breakpoint position; connect the breakpoint positions to obtain the segmentation line of the block image. The reflectance difference on both sides of the grouping interval in the above reflectance grouping method refers to the difference between the last reflectance of the first group and the first reflectance of the second group, the difference between the last reflectance of the second group and the first reflectance of the third group, ..., and the difference between the last reflectance of the penultimate group and the first reflectance of the penultimate group.

[0063] Step S110: Merge the dividing lines of multiple segmented images to obtain a segmentation map of the remote sensing image to be segmented.

[0064] The image segmentation method described above fully exploits the natural differences in the spectral reflectance of ground features, resulting in good data classification and high computational efficiency. By comprehensively considering the reflectance of ground features across multiple bands, the accuracy of segmentation is further improved.

[0065] Figure 2 This is a schematic diagram illustrating the method of grouping image blocks by reflectance for a specific band in an image segmentation method according to an embodiment of the present invention. Figure 2 As shown, the process of determining the reflectance grouping method for a band may include:

[0066] Step S202: Sort the reflectance of each raster block within the segmented image in ascending order to obtain the band reflectance sequence. , where i represents the row of the image block and j represents the column of the image block.

[0067] Step S204: Determine the number of groups. For example, the number of natural land types, e, can be selected as the number of groups, f.

[0068] Step S206 involves naturally grouping the band reflectivity sequence to obtain multiple alternative grouping methods. In other words, natural grouping yields various grouping methods; for example, the number of groups can be denoted as d.

[0069] Step S208: Calculate the sum of squared deviations of the category means for the alternative grouping methods. The calculation algorithm may include:

[0070] Calculate the mean reflectance within the group according to formula (1). :

[0071] Formula (1)

[0072] x represents the total number of raster rows in the block image within the group, and y represents the total number of raster columns in the block image within the group, that is, the group includes x*y raster cells.

[0073] Calculate the squared deviation of the category mean within each group using formula (2):

[0074] Formula (2)

[0075] Calculate the sum of squared deviations of the category means for the alternative grouping method, SDCM_ALL, according to formula (3):

[0076] Formula (3)

[0077] In formula (3), i is the group number and f is the total number of groups.

[0078] Step S210: Find the minimum value SDCM_ALL from the multiple alternative grouping methods. min .

[0079] Step S212, set SDCM_ALL min The corresponding reflectivity grouping method for this band. That is, finding SDCM_ALL from the d grouping methods. min One corresponding to it.

[0080] The aforementioned bands are set based on the band data of remote sensing imagery. Different bands exhibit varying reflectance due to differences in ground feature characteristics. Processing the data for each band improves data accuracy. The method in this embodiment determines the reflectance grouping method for each of the multiple bands, resulting in a reflectance grouping scheme for multiple bands.

[0081] Figure 3 This is a schematic diagram illustrating the determination of segmentation lines for segmented images in an image segmentation method according to an embodiment of the present invention. Figure 3 As shown, the steps for determining the segmentation lines of a block image based on the reflectance grouping method of multiple bands may include:

[0082] Step S302: Calculate the difference in reflectance on both sides of the grouping interval in the reflectance grouping method for multiple bands, that is, calculate the SDCM_ALL values ​​for each band. min In the corresponding grouping method, this refers to the difference between the reflectance of the last grid cell in the previous group and the reflectance of the first grid cell in the next group. In other words, it's the difference in grid reflectance between groups of multiple defined bands. For example, to calculate the reflectance difference in the first band... In the defined f groups (using 5 groups as an example, the specific values ​​can be adjusted flexibly), the difference between the maximum value of the first group and the minimum value of the second group is denoted as Z11; the maximum value of the second group and the minimum value of the third group are denoted as Z12; the maximum value of the third group and the minimum value of the fourth group are denoted as Z13; and the maximum value of the fourth group and the minimum value of the fifth group are denoted as Z14. The corresponding values ​​for the second band are Z21, Z22, Z23, Z24, ..., the corresponding values ​​for the Sth band are ZS1, ZS2, ZS3, ZS4, where S is the total number of bands. Each band is naturally grouped into 4 subgroups, which is only an example; those skilled in the art can set the number of subgroups as needed.

[0083] Step S304: Sort the above reflectivity differences to obtain a difference sequence. For example, sort Z11, Z12, Z13, Z14, Z21, Z22, Z23, Z24, ..., ZS1, ZS2, ZS3, ZS4 from largest to smallest.

[0084] Step S306: The raster blocks corresponding to the top-ranked differences in the difference sequence are used as breakpoint positions. This means selecting the largest f-1 values ​​as the f-1 breakpoint positions for the block image, which are the final f-class segmentation positions, and further merging them to obtain the segmentation lines of the block image.

[0085] The image segmentation method described in the above embodiments divides the image into blocks based on the size of the environmental and water conservation information features to be extracted (those skilled in the art should understand that this method is also applicable to image segmentation of other feature types besides environmental and water conservation information). Based on the single-band image segmentation scheme of the segmented image, segmentation lines for the multi-band image are obtained. This method can fully utilize the natural differences in multispectral image feature information to achieve accurate and efficient image segmentation.

[0086] Figure 4 This is a schematic diagram of a computer device according to an embodiment of the present invention. The computer device 400 may include a memory 420, a processor 410, and a machine-executable program 421 stored in the memory 420 and running on the processor 410, wherein the processor 410 executes the machine-executable program 421 to implement the image segmentation method of any of the above embodiments.

[0087] Computer device 400 can be, for example, a server, desktop computer, laptop computer, tablet computer, or smartphone. In some examples, computer device 400 can be a cloud computing node. Computer device 400 can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. Computer device 400 can be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can reside on local or remote computing system storage media, including storage devices.

[0088] Processor 410 may be a single-core processor, a multi-core processor, a computing cluster, or any other configuration. Memory 420 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.

[0089] Therefore, those skilled in the art should recognize that although numerous exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications conforming to the principles of the present invention can be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Thus, the scope of the present invention should be understood and construed as covering all such other variations or modifications.

Claims

1.A method for image segmentation, comprising: obtaining a remote sensing image to be segmented in a region to be analyzed; determining a size of a segmented image, and segmenting the remote sensing image to be segmented according to the size of the segmented image to obtain a plurality of segmented images; determining a grouping mode of reflectivity of a plurality of bands respectively according to the reflectivity of a ground object of a segmented grid in each of the segmented images; determining a segmentation line of the segmented image according to the grouping mode of reflectivity of the plurality of bands; and merging the segmentation lines of the plurality of segmented images to obtain a segmentation map of the remote sensing image to be segmented, wherein the step of determining the grouping mode of reflectivity of the plurality of bands respectively according to the reflectivity of the ground object of the segmented grid in each of the segmented images comprises: obtaining the multi-band reflectivity of the ground object of each segmented grid in each of the segmented images; sorting the reflectivity of the ground object of each segmented grid of each band to obtain a single-band reflectivity sequence; naturally grouping the single-band reflectivity sequence to obtain a plurality of alternative grouping modes; selecting one of the alternative grouping modes with the smallest group deviation as the grouping mode of reflectivity of the band; and counting the grouping mode of reflectivity of the plurality of bands, the step of determining the segmentation line of the segmented image according to the grouping mode of reflectivity of the plurality of bands comprises: calculating the difference of reflectivity on both sides of a grouping interval in the grouping mode of reflectivity of the plurality of bands respectively; sorting the difference of reflectivity from large to small; determining the segmented grids corresponding to the set number of the difference of reflectivity at the top of the sorting; taking the segmented grids as breakpoint positions; and connecting the breakpoint positions to obtain the segmentation line of the segmented image, the step of obtaining the remote sensing image to be segmented in the region to be analyzed comprises: obtaining position information of the region to be analyzed; obtaining an original image corresponding to the position information; preprocessing the original image; and using a polygon of a set vector to crop the preprocessed image to obtain the remote sensing image of a required shape, the step of determining the size of the segmented image comprises: identifying the size of an extraction target category in the remote sensing image to be segmented; and expanding the size of the extraction target category in the remote sensing image to be segmented by a set number of pixels to obtain the size of the segmented image, the step of segmenting the remote sensing image to be segmented according to the size of the segmented image further comprises: merging the part of the remote sensing image to be segmented that is not divided into an adjacent segmented image, the step of selecting one of the alternative grouping modes with the smallest group deviation comprises: calculating the sum of squares of deviations of category means of the plurality of alternative grouping modes; and determining the alternative grouping mode with the smallest sum of squares of deviations of category means, the method further comprises, before the step of naturally grouping the single-band reflectivity sequence: estimating the number of natural ground categories contained in the remote sensing image to be segmented; and setting the estimated number of natural ground categories as the number of groups of the natural grouping. ​ ​ ​ ​ ​ ​ ​ ​ 2. The method of claim 1, wherein, ​ ​ ​ ​ ​ 3. The method of claim 1, wherein, ​ ​ ​ 4. The method of claim 1, wherein, ​ ​ 5. The method of claim 1, wherein, ​ ​ ​ 6. The method of segmenting an image according to claim 5, wherein, ​ ​ ​ 7. A computer device, comprising: The computer program product comprises a memory, a processor, and a machine executable program stored on the memory and run on the processor, and the processor implements the image segmentation method according to any one of claims 1 to 6 when executing the machine executable program.

Citation Information

Patent Citations

  • Fragmented remote sensing image synthesis method and device for cloudy and rainy region

    CN106327452A

  • Automatic building information extraction method and system based on high-scene satellite image

    CN111178175A