An image clustering segmentation method based on bat algorithm

By combining the improved bat algorithm and K-means algorithm, dynamically adjusting the search speed of the bat algorithm and generating clustering centers, the problem of the influence of the initial center of the K-means algorithm in image segmentation is solved, the segmentation accuracy and stability are improved, and the realization of the realization of the More efficient clustering and segmentation effect.

CN114782726BActive Publication Date: 2024-11-15GUILIN UNIVERSITY OF TECHNOLOGY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210273477.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2024-11-15
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

The K-means algorithm is susceptible to the initial clustering center in image segmentation, resulting in unstable separation results and requires artificial selection of K values, which affects the calculation efficiency.

Method used

The improved bat algorithm is combined with the K-means algorithm, and the search capability of the bat algorithm is optimized through dynamically changing nonlinear velocity weighting factors, and the initial clustering center of the K-means algorithm is automatically found, and the bat optimization algorithm is used to generate the clustering center to Improve clustering effect.

Benefits of technology

It improves the accuracy and stability of image segmentation, reduces the phenomenon of missegment, enhances the global and local search capabilities, gets rid of the dependence of artificial selection of cluster centers, and achieves more efficient clustering segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782726B_ABST
    Figure CN114782726B_ABST
Patent Text Reader

Abstract

The present invention relates to an image clustering segmentation method based on a bat algorithm, which is mainly used to optimize the selection of cluster centers when using a K-means clustering method to segment images, thereby improving the global and local search capabilities of the bat algorithm and improving the accuracy of image segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image clustering segmentation method based on a bat algorithm, which is mainly used to optimize the selection of cluster centers when using a K-means clustering method to segment images, thereby improving the global and local search capabilities of the bat algorithm and improving the accuracy of image segmentation. Background Art

[0002] Image segmentation is an important preprocessing method for image processing and the basis for subsequent image analysis and understanding. Clustering method is also one of the common methods in the field of image segmentation. Its principle is to divide pixels with similarity in the image space into the same class, and make pixels in different classes have lower similarity. Common image clustering methods mainly include K-Means algorithm, Mean Shift algorithm and superpixel method. K-means clustering has a wide range of applications in image segmentation due to its advantages such as simple calculation efficiency and no need to set additional labels. Since K-means algorithm is an unsupervised machine learning method, it can discover mutual relationships from some characteristics in the data. In the actual application of image segmentation, K-means algorithm can correspond the pixels in the image to feature vectors, and then subdivide the feature space by comparing the similarity of their feature spaces, and then map it to the original image space, so as to draw a separation conclusion. However, because the K value often needs to be manually selected before the K-means calculation begins, and the initial cluster analysis center is arbitrarily defined, the calculation can easily rely too much on the selection of clusters, resulting in unsatisfactory final results. To address this problem, an improved bat algorithm and K-means algorithm are proposed. The bat algorithm searches for the optimal position as the initial clustering center to further improve the clustering effect and optimize the segmentation efficiency. Summary of the invention

[0003] The present invention aims at the problem that the K-means system clustering algorithm is easily affected by the center of the original clustering analysis method during the image separation process, which leads to unstable separation results. A K-means image clustering segmentation scheme based on bat computing is provided. The method can iteratively optimize by intelligent optimization calculation to obtain the original clustering center of the K-means algorithm, and then use the center of the K-means clustering algorithm to segment the image.

[0004] (1) Improved bat algorithm: Based on the different behavior patterns of bats in the process of searching for the optimal solution, a method of dynamically changing the rate of change of bat flight speed is proposed, and a nonlinear speed weight factor w is designed, so that the speed update formula becomes the following formula:

[0005]

[0006] The weight factor w obeys the following formula:

[0007]

[0008] In the proposed improved bat algorithm model, the weight factor w obeys a decreasing convex function, so the bat's speed will change dynamically from large to small during the search process. At the beginning, it is in global exploration with a large initial speed. When it enters the local mining stage, the speed change rate decreases and the speed update slows down, which is conducive to local optimization.

[0009] (2) BA K-means algorithm: Based on the defect that the traditional K-means algorithm is too dependent on the initial cluster center, resulting in unstable clustering effect, a method of using the bat optimization algorithm to generate cluster centers is proposed. The bat algorithm determines the optimal position based on the fitness value, and then sets the optimal position as the initial cluster center of the K-means algorithm to perform K-means clustering.

[0010] The image segmentation algorithm based on BA K-means algorithm is as follows:

[0011]

[0012]

[0013] The advantages of the present invention are:

[0014] The present invention can optimize the search and optimization capability of the bat algorithm, enhance the global optimization capability to a certain extent, automatically find the initial clustering center of K-means, free the K-means algorithm from the dependence on artificial selection of clustering centers, and intelligently obtain the best initial center. When applied to image segmentation, it can effectively improve the segmentation accuracy and reduce the phenomenon of mis-segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 Bat algorithm flow chart

[0016] Figure 2 Speed ​​inertia weight function diagram

[0017] Figure 3 BA K-means image segmentation effect diagram, where the left image is the original image and the right image is the BA K-means algorithm segmentation image. DETAILED DESCRIPTION

[0018] Example 1: Clustering and segmentation of remote sensing images

[0019] The proposed clustering method is used to segment the remote sensing image, and the RGB difference between pixels is used as the similarity metric, and the Euclidean distance is used as the distance metric to calculate the similarity between pixels. The optimal original clustering center is found through the improved BA algorithm, and the K-means clustering operation is performed on the image to obtain the segmentation result of the remote sensing image;

[0020] Example 2: Color Image Threshold Segmentation

[0021] When performing threshold-based image segmentation on color images, the segmentation effect is greatly affected by the selected threshold. Combining the proposed improved bat algorithm with the traditional threshold method to find the most appropriate threshold to determine the extreme value of the objective function can effectively improve the segmentation efficiency and accuracy.

Claims

1. A K-means image segmentation method based on bat algorithm , Its main features are: (1) The improved bat algorithm proposes a method to dynamically change the bat flight speed change rate according to the different behavior patterns of bats in the process of searching for the optimal solution. The speed update is shown in formula (1), and the weight factor w is a decreasing convex function as shown in formula (2); (2) Based on the BA K-means image segmentation algorithm, the improved bat algorithm is used to determine the optimal position according to the fitness value, and then the optimal position is set as the initial clustering center of the K-means algorithm to perform K-means clustering. The specific algorithm is as follows: 1) Input: image I to be segmented; 2) Execution: ① Set the algorithm parameters, the number of bats is m, the maximum number of iterations is T, the sound wave frequency is f, and the range is [f min ,f max ], loudness A, range is [A min ,A max ], pulse frequency r, inertia weight factor w, number of clusters K; ② Initialize the population and randomly generate the initial positions of bats; ③ Calculate the fitness value of each bat, and take the bat with the best fitness value as the optimal individual; ④ According to the speed inertia weight formula of formula (2), substitute it into the speed calculation of formula (1), calculate the speed and position of the bat respectively, evaluate the current position, and end the calculation if the conditions are met, otherwise randomly perturb the current position to generate a new solution; ⑤ Determine whether the fitness of the new solution is better than the current optimal solution. If so, accept the new solution and go to the next step, otherwise discard the solution; ⑥ Find the optimal K individual bat positions and use them as the initial clustering center of the K-means algorithm. Perform clustering once, adjust the new clustering center, and update the fitness value of the bat. If the conditions are not met or the maximum number of iterations is not reached, go to step ③ to continue updating the population, otherwise go to the next step. ⑦The algorithm ends and cluster segmentation is completed; 3) Output: clustering results.

Citation Information

Patent Citations

  • Image segmentation method based on bat optimal fuzzy clustering

    CN103824285A

  • Image segmentation method based on FCM fusion improved bat algorithm

    CN110782460A

  • BP classification algorithm based on improved bat algorithm

    CN113221954A

  • Medical image segmenting method

    WO2018086433A1