CN118172374A - Image segmentation method and device, electronic equipment and storage medium - Google Patents

Image segmentation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118172374A
CN118172374A CN202410220723.6A CN202410220723A CN118172374A CN 118172374 A CN118172374 A CN 118172374A CN 202410220723 A CN202410220723 A CN 202410220723A CN 118172374 A CN118172374 A CN 118172374A
Authority
CN
China
Prior art keywords
natural
pellet
data object
pellets
image
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
CN202410220723.6A
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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202410220723.6A priority Critical patent/CN118172374A/en
Publication of CN118172374A publication Critical patent/CN118172374A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • 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/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks

Landscapes

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

Abstract

The invention relates to an image segmentation method, an image segmentation device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a target image, and taking each pixel of the target image as a data object; performing natural neighbor searching to obtain natural neighbors of each data object; forming natural pellets by natural neighbors to obtain an initial natural pellet group of the target image; calculating to obtain a splitting threshold value; natural pellets with the radius larger than a splitting threshold value are selected for splitting, and a final stable natural pellet group is obtained through iteration; and arbitrarily selecting two natural pellets from the final stable natural pellet group to perform merging and clustering, and performing iteration to obtain a clustering result, and obtaining an image segmentation result of the target image according to the clustering result. According to the invention, the pellet calculation and the natural neighbor are combined to form the natural pellet, the natural pellet is used for covering the image, natural pellet splitting and clustering are performed, the image segmentation result is obtained according to the clustering result, the image segmentation result is more accurate, and the method is more suitable for complex image segmentation.

Description

Image segmentation method and device, electronic equipment and storage medium
Technical Field
The invention belongs to the field of computer vision, and particularly relates to an image segmentation method and device, electronic equipment and a storage medium.
Background
Image segmentation is an important task in the field of computer vision, which aims at dividing an image into different regions with semantic information. Image segmentation is a key step from image processing to image analysis, and mainly involves: the image is divided into a plurality of mutually disjoint areas according to the characteristics of gray scale, color, space texture, geometric shape and the like, so that the characteristics show consistency or similarity in the same area, and obviously different areas divide the image into a plurality of specific areas with unique properties. The following are some prior art techniques for image segmentation:
Semantic segmentation: each pixel in the image is assigned to a predefined category to obtain semantic information for each region in the image.
Example segmentation: in addition to semantic segmentation of images, it is also necessary to identify boundaries of different instances (objects).
Edge detection: the edges or contours of the object in the image are extracted.
The threshold segmentation method comprises the following steps: the image is segmented into different regions based on the threshold of pixel gray values. This includes global thresholding and local thresholding.
The graph cutting method comprises the following steps: pixels in an image are divided into a plurality of regions using a graph cut algorithm in graph theory. This approach typically requires the user to provide some a priori information, such as a marker.
The deep learning method comprises the following steps: the deep learning method is excellent in image segmentation tasks. In addition to the aforementioned FCNs and Mask R-CNNs, there are many other network structures, such as DeepLab, segNet, etc., that capture local and global features in an image through convolution operations.
An unsupervised segmentation method: in an image segmentation task, a clustering algorithm may divide an image into different regions or clusters by similarity measurement and grouping of image pixels or features.
The clustering algorithm belongs to the category of unsupervised learning, and aims to group similar data points into the same cluster, so that the similarity of the data points in the clusters is high, and the similarity among the clusters is low. The application of clustering algorithms in image segmentation helps to find potential structures in the image, grouping similar parts together. Such grouping can help identify areas in the image that have similar properties without explicit labels or a priori information. Common clustering algorithms include K-means clustering, density clustering, spectral clustering, hierarchical clustering, and the like. Because the image data is generally distributed in a complex manner, the conventional clustering algorithm is difficult to effectively identify the distribution with complex shape and large density level difference, and the problem that parameters need to be set in advance exists, the image segmentation is performed by using the conventional clustering algorithm, and the image segmentation result is inaccurate.
Disclosure of Invention
In order to overcome the problems, the invention combines the pellet calculation with the natural neighbor to form the natural pellet, uses the natural pellet to cover the image data, adaptively obtains the image data distribution condition, clusters the image data distribution, and obtains the image segmentation result.
The first aspect of the present invention provides an image segmentation method, comprising:
s1: acquiring a target image, and taking each pixel of the target image as a data object;
S2: performing natural neighbor search on all data objects of the target image to obtain a natural neighbor NaN (x i) of each data object x i;
S3: the natural neighbor NaN (x i) forms natural pellet NGB (x i) to obtain an initial natural pellet group NGBG init of the target image;
S4: calculating to obtain a splitting threshold beta according to the average value and standard deviation of the radiuses of all natural pellets in the initial natural pellet group NGBG init;
S5: natural pellets with the radius larger than a splitting threshold value beta are selected for splitting, and a final stable natural pellet group is obtained through iteration;
S6: and arbitrarily selecting two natural pellets from the final stable natural pellet group to be combined and clustered, iterating to obtain a clustering result, and obtaining an image segmentation result of the target image according to the clustering result.
A second aspect of the present invention provides an image segmentation apparatus, comprising:
an image acquisition module: the method comprises the steps of acquiring a target image to be segmented;
Natural neighbor search module: the method comprises the steps of performing natural neighbor searching on all data objects of a target image to obtain natural neighbors of each data object x i;
a splitting threshold calculation module: the method comprises the steps of calculating a splitting threshold, forming natural pellets by natural neighbors to obtain an initial natural pellet group of a target image, and calculating the splitting threshold according to the average value of the radiuses of all natural pellets in the initial natural pellet group and the standard deviation of the average value;
natural pellet splitting module: the method comprises the steps of (1) performing natural pellet splitting, selecting natural pellets with radius larger than a splitting threshold value for splitting, and performing iteration to obtain a final stable natural pellet group;
Natural pellet clustering module: the method comprises the steps of performing natural pellet clustering, wherein two natural pellets are arbitrarily selected from the final stable natural pellet group to perform merging clustering, and a clustering result is obtained through iteration;
And a result output module: and outputting an image segmentation result of the target image according to the clustering result.
A third aspect of the present invention provides an electronic apparatus, comprising:
A memory for storing a computer program;
a processor for implementing the steps of an image segmentation method as described above when executing the computer program.
A fourth aspect of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of an image segmentation method as described above.
The invention has the beneficial effects that: the method takes pixels of an image as data objects, and natural neighbors of each data object are obtained through natural neighbor searching; each natural neighbor forms a natural pellet, and an initial natural pellet group of the target image is obtained, namely, the full coverage of the image pixels by the natural pellets is realized; calculating to obtain a splitting threshold, selecting natural pellets with radius larger than the splitting threshold for splitting, and obtaining a final stable natural pellet group through iteration; and arbitrarily selecting two natural pellets from the final stable natural pellet group to be combined and clustered, iterating to obtain a clustering result, and obtaining an image segmentation result of the target image according to the clustering result. Firstly, the image segmentation result obtained by the method is more accurate. Secondly, the invention fully covers the image pixels through the natural grain balls, and parameters do not need to be set in advance when the image segmentation is carried out, so that the invention can adapt to more complex image data distribution. Finally, because the abnormal natural pellet (the natural pellet with the radius larger than the splitting threshold) is processed in the natural pellet stabilization iteration process, the method has certain robustness to noise.
Drawings
FIG. 1 is a flow chart showing the steps of embodiment 1 of the present invention;
FIG. 2 is a schematic diagram showing the process of splitting natural pellet in example 1 of the present invention;
fig. 3 is a schematic structural diagram of embodiment 2 of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
An embodiment 1 of the present invention provides an image segmentation method, referring to fig. 1, including:
S1: a target image D is acquired, and each pixel of the target image D is taken as a data object.
In the experimental stage, the selected target image D is selected from an open-source urban scene segmentation dataset CITYSCAPES, which contains high-resolution images from various urban streets, each image having a pixel-level tag for identifying different objects and scene categories.
S2: and (3) carrying out natural neighbor search on all the data objects of the target image to obtain a natural neighbor NaN (x i) of each data object x i.
The key point of natural neighbor formation is to establish a neighbor search range which is continuously expanded from 1 and is denoted as R, the reverse nearest neighbor number of each object is calculated, and the whole process does not need any parameter participation. Taking the data object x 1,x2 as an example, if x 1 is contained in the k neighbors of x 2, then x 2 is the reverse nearest neighbor of x 1.
Basic idea of natural neighbor search algorithm: in each iteration, a number of nearest neighbors (increasing from 1, i.e., adding 1 after one iteration) of each data object x i in the dataset are searched first, i is a subscript of the data object, and the reverse nearest neighbor number of the data object x i is calculated. The natural neighbor search process is iteratively terminated if the following conditions are satisfied: (1) The number of data objects without reverse nearest neighbors is zero; (2) In the process of two continuous iterations, the number of data objects without reverse nearest neighbors is unchanged.
Specifically, a natural neighbor search is performed on each data object x i of the target image, so as to obtain nearest neighbor NN (x i) and reverse nearest neighbor RNN (x i) of each data object x i.
Further, in the step S2, the natural neighbor NaN (x i) of each data object x i includes the data objects located in the intersection of the nearest neighbor NN (x i) of each data object x i and its reverse nearest neighbor RNN (x i), and each data object x i itself, and the natural neighbor NaN (x i) is specifically expressed as:
NaN(xi)=NN(xi)∩RNN(xi)∪xi
Where NN (x i) represents the nearest neighbor of each data object x i, RNN (x i) represents the reverse nearest neighbor of each data object x i, and n represents the intersection of the two data sets and the collection of the two data sets.
S3: and forming natural pellet NGB (x i) by the natural neighbor NaN (x i) to obtain an initial natural pellet group NGBG init of the target image.
The core idea of pellet calculation is: the particle ball is used for covering or partially covering the sample space, and is used as input of a learning method or used for representing the sample space, so that multi-granularity learning characteristics and accurate depiction of the sample space are realized.
And (2) obtaining natural neighbors of each data object through the step (S2), combining the natural neighbors with the pellet, and logically virtually forming a natural pellet by the natural neighbors, wherein the natural pellet has a center and a radius. Each natural pellet is a sphere that contains a plurality of data objects, each data object corresponding to a pixel of the target image. According to the natural pellet NGB (x i) of each data object, the initial natural pellet group NGBG init of the target image is obtained in the same way.
The natural pellet group is expressed as:
NGBG={NGB(xi)|xi∈D}
Wherein NGBG represents a natural pellet group corresponding to the target image D, x i represents an ith data object in the target image D, and i is a positive integer.
Further, the center c i of each natural pellet is calculated, and the specific calculation formula is as follows:
where x i denotes the ith data object in the target image, x j denotes the jth data object in the target image, i, j are positive integers, NGB (x i) denotes a natural pellet containing data object x i, x j∈NGB(xi) denotes that data object x j belongs to natural pellet NGB (x i),|NGB(xi) | denotes the number of all data objects contained within natural pellet NGB (x i), Representing summing each data object in the natural pellet.
Further, the radius r i of each natural pellet is calculated, and the specific calculation formula is as follows:
Where x i represents the ith data object of the target image, x j represents the jth data object of the target image, i, j are positive integers, NGB (x i) represents natural pellets containing data object x i, x j∈NGB(xi) represents that data object x j belongs to natural pellets NGB (x i),ci represents the center of each natural pellet).
Due to the nature of the pellets and natural neighbors, for objects in the same cluster, the natural pellets formed by their natural neighbors should be of uniform size. Natural pellets with an excessively large pellet radius (i.e., abnormal natural pellets) exist for three reasons: (1) The objects at the cluster edges are sparsely distributed, and the objects at the edges are included in the natural pellet; (2) The edge object of another cluster is included in the natural pellet; (3) noise objects are included in the natural pellet. Thus, to adjust all natural beads in the natural bead set NGBG to ensure a tight connection between points within the natural beads, the present invention uses β as the split threshold.
S4: and calculating to obtain a splitting threshold beta according to the average value of the radius of all natural pellets in the initial natural pellet group NGBG init and the standard deviation thereof.
The radius of natural globules formed by clusters of very low density can be very large due to the significant differences in density levels in the image dataset. Thus when the fragmentation threshold is set improperly, it may result in erroneous fragmentation of the natural pellet. The standard deviation is used for reflecting the degree of dispersion of the data set, and when the average radius plus the standard deviation is set, natural pellets with overlarge radius can be split better, so that the natural pellet group tends to be in a stable state.
Further, the calculation formula of the splitting threshold β is specifically shown as follows:
β=avg_radius+std_radius
Wherein,
Where avg_radius represents the average value of the radii of all the natural beads in the initial natural bead set NGBG init, std_radius represents the standard deviation of the radii of all the natural beads in the initial natural bead set NGBG init, r i represents the radius of the ith natural bead, and NGBG init is the number of natural beads contained in the initial natural bead set NGBG init.
S5: and selecting natural pellets with radius larger than a splitting threshold value for splitting, and iterating to obtain a final stable natural pellet group.
Since the sparse area has fewer natural neighbors and the dense area has more natural neighbors, for a sphere to be split, the smaller the natural neighbors searched by the data object in the sphere, the more the data object is far from the center of the cluster, the more the number of natural neighbors is, the more the data object is close to the center of the cluster, which means that the data object is possibly positioned at the edge of the cluster or is a noise object. Therefore, as shown in fig. 2, for a natural pellet having a radius larger than the splitting threshold β, the data object having the largest number of natural neighbors is selected as the representative point Rep dense of the dense area DA i, and the data object having the smallest number of natural neighbors is selected as the representative point Rep sparse of the dense area DA i, respectively. And distributing the rest points to the nearest representative points according to the Euclidean distance between the two points, forming two new pellets, namely splitting the natural pellets, and obtaining the final stable natural pellet group after multiple iterations.
Further, referring to fig. 2, the step S5 specifically includes:
S501: in the initial natural pellet group NGBG init, selecting a data object with the largest natural neighbor number as a dense representative point Rep dense, wherein a calculation formula of the dense representative point Rep dense specifically comprises:
wherein x λ is represented as a data object in natural pellet NGB (x i), λ is represented as a subscript of the data object; the expression x λ is expressed as the formula/> The meaning of the formula is to select the data object with the largest number of natural neighbors in the natural pellet NGB (x i).
S502: in the initial natural pellet group NGBG init, selecting data objects with the minimum natural neighbor number as sparse representation points Rep sparse respectively, wherein a calculation formula of the sparse representation points Rep sparse specifically comprises:
wherein x λ is represented as a data object in natural pellet NGB (x i), λ is represented as a subscript of the data object; the expression x λ is expressed as the formula/> The meaning of the formula is to select the data object in the natural pellet NGB (x i) that contains the least number of natural neighbors.
S503: according to the dense representative points Rep dense and the sparse representative points Rep sparse, the dense area DA i and the sparse area SA i are divided in the natural pellet group, specifically:
the calculation formula of the dense area DA i specifically includes:
Where x j is denoted as other data objects in NGB (x i) except x i, j is a positive integer, and the meaning of the formula is: in the dense representative point Rep dense and the sparse representative point Rep sparse. If a data object closer to the dense representative point Rep dense among other data objects except x i in NGB (x i), it will be contained in the dense area DA i.
The calculation formula of the sparse region SA i is:
Where x j is denoted as other data objects in NGB (x i) except x i, j is a positive integer, and the meaning of the formula is: in the dense representative point Rep dense and the sparse representative point Rep sparse, if a data object closer to the representative point Rep sparse among other data objects except for x i in NGB (x i) is included in the sparse region SA i.
S504: the data objects in the dense area DA i and the sparse area SA i form new natural pellets, the new natural pellets cover the original split natural pellets, two new pellets are formed, namely the splitting of the natural pellets is performed, and after multiple iterations, the final stable natural pellet group is obtained.
After distribution, two areas containing a plurality of data objects are respectively a dense area DA i and a sparse area SA i, points of the two areas form new two natural pellets to cover the pellets which are split originally, but natural pellets with radius larger than beta can exist after splitting, so that splitting needs to be continued until the radius of all the natural pellets is smaller than beta, or iteration stops when the number of the natural pellets is unchanged. And (3) splitting the natural pellet until the radius r of all the natural pellets in the natural pellet group NGBG is smaller than beta, or ending the splitting process when the number of the natural pellets in NGBG is kept unchanged in the continuous two iterative processes, so as to obtain the final stable natural pellet group.
S6: and arbitrarily selecting two natural pellets from the final stable natural pellet group to perform merging and clustering, and performing iteration to obtain a clustering result, and obtaining an image segmentation result of the image dataset D according to the clustering result.
For any two natural pellets NGB (x i) and NGB (x j), if the number of data overlaps in the two pellets is greater than 0, they are iteratively combined into a new natural pellet.
The stop condition for the iteration is that all natural pellets have no common data object in NGBG. Will be greater than(N is the number of data objects in data set D) the spheres are considered as one cluster, the number is less than/>The data objects within the pellet are assigned to the nearest cluster by distance.
Each cluster is a clustering result.
After the clustering is completed, the data objects in the same cluster are marked as the same color, and finally the segmentation result images with different color blocks are obtained.
Embodiment 2 of the present invention provides an image segmentation apparatus, as shown with reference to fig. 3, including:
an image acquisition module: the method comprises the steps of acquiring a target image to be segmented;
Natural neighbor search module: the method comprises the steps of performing natural neighbor searching on all data objects of a target image to obtain natural neighbors of each data object x i;
a splitting threshold calculation module: the method comprises the steps of calculating a splitting threshold, forming natural pellets by natural neighbors to obtain an initial natural pellet group of a target image, and calculating the splitting threshold according to the average value of the radiuses of all natural pellets in the initial natural pellet group and the standard deviation of the average value;
natural pellet splitting module: the method comprises the steps of (1) performing natural pellet splitting, selecting natural pellets with radius larger than a splitting threshold value for splitting, and performing iteration to obtain a final stable natural pellet group;
Natural pellet clustering module: the method comprises the steps of performing natural pellet clustering, wherein two natural pellets are arbitrarily selected from the final stable natural pellet group to perform merging clustering, and a clustering result is obtained through iteration;
And a result output module: and outputting an image segmentation result of the target image according to the clustering result.
Embodiment 3 of the present invention provides an electronic device, including:
A memory for storing a computer program;
a processor for implementing the steps of an image segmentation method as described above when executing the computer program.
Embodiment 4 of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of an image segmentation method as described above.
The invention has the beneficial effects that: the method takes pixels of an image as data objects, and natural neighbors of each data object are obtained through natural neighbor searching; each natural neighbor forms a natural pellet, and an initial natural pellet group of the target image is obtained, namely, the full coverage of the image pixels by the natural pellets is realized; calculating to obtain a splitting threshold, selecting natural pellets with radius larger than the splitting threshold for splitting, and obtaining a final stable natural pellet group through iteration; and arbitrarily selecting two natural pellets from the final stable natural pellet group to be combined and clustered, iterating to obtain a clustering result, and obtaining an image segmentation result of the target image according to the clustering result. Firstly, the image segmentation result obtained by the method is more accurate. Secondly, the invention fully covers the image pixels through the natural grain balls, and parameters do not need to be set in advance when the image segmentation is carried out, so that the invention can adapt to more complex image data distribution. Finally, because the abnormal natural pellet (the natural pellet with the radius larger than the splitting threshold) is processed in the natural pellet stabilization iteration process, the method has certain robustness to noise.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, etc.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (9)

1. An image segmentation method, comprising:
s1: acquiring a target image, and taking each pixel of the target image as a data object;
S2: performing natural neighbor search on all data objects of the target image to obtain natural neighbors of each data object x i;
S3: forming natural pellets by the natural neighbors to obtain an initial natural pellet group of the target image;
S4: calculating to obtain a splitting threshold according to the average value of the radius of all natural pellets in the initial natural pellet group and the standard deviation thereof;
s5: natural pellets with the radius larger than a splitting threshold value are selected for splitting, and a final stable natural pellet group is obtained through iteration;
S6: and arbitrarily selecting two natural pellets from the final stable natural pellet group to be combined and clustered, iterating to obtain a clustering result, and obtaining an image segmentation result of the target image according to the clustering result.
2. The image segmentation method according to claim 1, wherein in the step S2, the natural neighbor NaN (x i) of each data object x i includes the data objects located in the intersection of the nearest neighbor NN (x i) of each data object x i and its reverse nearest neighbor RNN (x i) and each data object x i itself.
3. The image segmentation method based on the adaptive clustering algorithm according to claim 1, wherein the center c i of each natural pellet is calculated according to the specific calculation formula:
Where x i denotes the ith data object of the target image, x j denotes the jth data object of the target image, i, j are positive integers, NGB (x i) denotes a natural pellet containing data object x i, x j∈NGB(xi) denotes that data object x j belongs to natural pellet NGB (x i),|NGB(xi) | denotes the number of all data objects contained within natural pellet NGB (x i), Representing summing each data object in the natural pellet.
4. The image segmentation method based on the adaptive clustering algorithm according to claim 1, wherein the radius r i of each natural pellet is calculated according to the following specific calculation formula:
Where x i represents the ith data object of the target image, x j represents the jth data object of the target image, i, j are positive integers, NGB (x i) represents natural pellets containing data object x i, x j∈NGB(xi) represents that data object x j belongs to natural pellets NGB (x i),ci represents the center of each natural pellet).
5. The image segmentation method according to claim 1, wherein in the step S4, the calculation formula of the splitting threshold β is specifically:
β=avg_radius+std_radius
Wherein,
Where avg_radius represents the average value of the radii of all the natural beads in the initial natural bead set NGBG init, std_radius represents the standard deviation of the radii of all the natural beads in the initial natural bead set NGBG init, r i represents the radius of the ith natural bead, and NGBG init is the number of natural beads contained in the initial natural bead set NGBG init.
6. The image segmentation method based on the adaptive clustering algorithm according to claim 1, wherein in step S5, specifically, the method comprises:
S501: selecting a data object with the largest natural neighbor number as a dense representative point Rep dense in the initial natural pellet group NGBG init;
s502: in the initial natural pellet group NGBG init, selecting data objects with the minimum natural neighbor number as sparse representation points Rep sparse respectively;
S503: according to the dense representative points Rep dense and the sparse representative points Rep sparse, distributing the rest data objects except the representative points in the split spheres to the nearest representative points according to Euclidean distance to form a dense area DA i and a sparse area SA i respectively;
s504: the data objects in the dense area DA i and the sparse area SA i form new natural pellets, the new natural pellets cover the original split natural pellets, two new pellets are formed, namely the splitting of the natural pellets is performed, and after multiple iterations, the final stable natural pellet group is obtained.
7. An image dividing apparatus, comprising:
an image acquisition module: the method comprises the steps of acquiring a target image to be segmented;
Natural neighbor search module: the method comprises the steps of performing natural neighbor searching on all data objects of a target image to obtain natural neighbors of each data object x i;
a splitting threshold calculation module: the method comprises the steps of calculating a splitting threshold, forming natural pellets by natural neighbors to obtain an initial natural pellet group of a target image, and calculating the splitting threshold according to the average value of the radiuses of all natural pellets in the initial natural pellet group and the standard deviation of the average value;
natural pellet splitting module: the method comprises the steps of (1) performing natural pellet splitting, selecting natural pellets with radius larger than a splitting threshold value for splitting, and performing iteration to obtain a final stable natural pellet group;
Natural pellet clustering module: the method comprises the steps of performing natural pellet clustering, wherein two natural pellets are arbitrarily selected from the final stable natural pellet group to perform merging clustering, and a clustering result is obtained through iteration;
And a result output module: and outputting an image segmentation result of the target image according to the clustering result.
8. An electronic device, comprising:
A memory for storing a computer program;
a processor for implementing the steps of an image segmentation method as claimed in any one of claims 1 to 6 when executing said computer program.
9. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of an image segmentation method according to any one of claims 1 to 6.
CN202410220723.6A 2024-02-28 2024-02-28 Image segmentation method and device, electronic equipment and storage medium Pending CN118172374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410220723.6A CN118172374A (en) 2024-02-28 2024-02-28 Image segmentation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410220723.6A CN118172374A (en) 2024-02-28 2024-02-28 Image segmentation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118172374A true CN118172374A (en) 2024-06-11

Family

ID=91355750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410220723.6A Pending CN118172374A (en) 2024-02-28 2024-02-28 Image segmentation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118172374A (en)

Similar Documents

Publication Publication Date Title
CN107424159B (en) Image semantic segmentation method based on super-pixel edge and full convolution network
CN110930454B (en) Six-degree-of-freedom pose estimation algorithm based on boundary box outer key point positioning
CN107016677B (en) Cloud picture segmentation method based on FCN and CNN
US7792382B2 (en) Method and apparatus for filtering, clustering, and region fitting by mean shift of images using kernel function values
JP2008217706A (en) Labeling device, labeling method and program
CN108401565B (en) Remote sensing image registration method based on improved KAZE features and Pseudo-RANSAC algorithms
CN114241388A (en) Video instance segmentation method and segmentation device based on space-time memory information
CN111223128A (en) Target tracking method, device, equipment and storage medium
CN111783722B (en) Lane line extraction method of laser point cloud and electronic equipment
CN107423771B (en) Two-time-phase remote sensing image change detection method
CN112926592A (en) Trademark retrieval method and device based on improved Fast algorithm
CN111222546A (en) Multi-scale fusion food image classification model training and image classification method
CN118115868A (en) Remote sensing image target detection method, remote sensing image target detection device, computer equipment and storage medium
Xie et al. 3D surface segmentation from point clouds via quadric fits based on DBSCAN clustering
Kumar et al. UEQMS: UMAP embedded quick mean shift algorithm for high dimensional clustering
CN114511862B (en) Form identification method and device and electronic equipment
CN118172374A (en) Image segmentation method and device, electronic equipment and storage medium
Ge et al. Type-based outlier removal framework for point clouds
Wang et al. Image matching via the local neighborhood for low inlier ratio
CN114328920A (en) Text clustering method and system based on consistent manifold approximation and projection
Zhu et al. Sparse graph connectivity for image segmentation
Hu et al. GMC_FM: a grid and multi-density-based method for matching ancient Chinese architectural images
CN117710235B (en) Image target enhancement method, device, computer equipment and storage medium
Lv et al. Segmentation optimization simulation of water remote congestion image of the ship
CN116468960B (en) Video image analysis and retrieval method and system

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