Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization
Abstract
:1. Introduction
2. The 2-D Otsu Threshold Segmentation Algorithm
3. Hybrid Fractional Butterfly Optimization Algorithm
3.1. Butterfly Optimization Algorithm
- •
- All of the butterflies can emit fragrance so that they can attract each other;
- •
- Each butterfly moves randomly or toward the best-flavored butterfly and emits more fragrance;
- •
- The stimulus intensity of the butterflies is influenced by the fitness function.
Algorithm 1. The BOA algorithm. | |
1 | Initialize the population, set butterflies , initialize the sensory modality c, fragrance factor θ, switch probability p, and number of iterations T; |
2 | Define fitness function and calculate the value of the fitness function for each butterfly; |
3 | Calculate stimulus intensity I using the fitness function; |
4 | while t < T |
5 | for i = 1 : n |
6 | Calculate perceived intensity of fragrance using Equation (10); |
7 | if |
8 | Update position using Equation (11); |
9 | else |
10 | Update position using Equation (12); |
11 | end if |
12 | Update the optimal position ; |
13 | end for |
14 | Update the value of sensory modality c; |
15 | end while |
16 | Output the global optimal solution. |
3.2. Fractional-Order Calculus
3.2.1. G-L-Type Definition
3.2.2. Caputo-Type Definition
3.3. Hybrid Fractional Butterfly Optimization Algorithm
3.3.1. Fractional-Order Differentiation Improves the Global Search
3.3.2. Fractional-Order Sine-Cosine Algorithm Improves Local Search
3.3.3. Dynamic Conversion Probability
3.4. Improved Algorithm Evaluation of Benchmark Functions
4. Hybrid Fractional Butterfly Optimization Algorithm for Otsu Image Segmentation
- Step 1
- Enter the image to be segmented, calculate the 2-D gray-gradient distribution histogram of the image, and choose the trace of the dispersion matrix as the fitness function.
- Step 2
- Initialize the parameters and the butterfly population. Set the population size to 80 and the total number of iterations to 100.
- Step 3
- Calculate the fitness function value of each butterfly according to Formula (9) and select the butterfly with the largest fitness value as the current global optimal value.
- Step 4
- Update the fragrance perception intensity fi and dynamic conversion probability pt according to Equations (25) and (30).
- Step 5
- When rand < pt , choose the global search and update the butterfly position according to Equation (22). When rand ≥ pt , choose the local search and update the butterfly location according to Equation (29).
- Step 6
- Determine whether the total number of iterations T is reached. If reached, output the global optimum; otherwise, return to Step 4.
- Step 7
- Output the butterfly position that will maximize the fitness function value, use it as the threshold to perform threshold segmentation on the image, and output the segmented image.
5. Experimental Results and Analysis
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Reddi, S.S.; Rudin, S.F.; Keshavan, H.R. An optimal multiple threshold scheme for image segmentation. IEEE Trans. Syst. Man Cybern. 1984, 14, 661–665. [Google Scholar] [CrossRef]
- Zhang, J.B.; Yang, H.X.; Zhou, T.T.; Tan, Z.H.; Li, M. Improved segmentation method of 2-D Otsu infrared image. Laser Technol. 2014, 38, 713–717. [Google Scholar]
- Huang, C.; Li, X.; Wen, Y. AN OTSU image segmentation based on fruitfly optimization algorithm. Alex. Eng. J. 2020, 60, 183–188. [Google Scholar] [CrossRef]
- Liu, X.J.; Liu, Y.L.; Xu, X.X. Optimization of multi-thresholding Otsu image segmentation by glowworm swarm algorithm with cell membrane mechanism. J. Chin. Comput. Syst. 2020, 41, 410–415. [Google Scholar]
- Ning, G.Y. Two-dimensional Otsu multi-threshold image segmentation based on hybrid whale optimization algorithm. Multimed. Tools Appl. 2022, 82, 15007–15026. [Google Scholar] [CrossRef]
- Ma, G.Y.; Yue, X.F. An improved whale optimization algorithm based on multilevel threshold image segmentation using the Otsu method. Eng. Appl. Artif. Intell. 2022, 113, 104960. [Google Scholar] [CrossRef]
- Arora, S.; Singh, S. Butterfly optimization algorithm: A novel approach for global optimization. Soft Comput. 2019, 23, 715–734. [Google Scholar] [CrossRef]
- Wu, L.; Du, L.B.; Tang, X.F. Multi-level threshold image segmentation based on an improved butterfly optimization algorithm. Chin. Sci. Technol. Pap. 2021, 16, 1174–1180. [Google Scholar]
- Pu, Y.F. Research on Application of Fractional Calculus to Latest Signal Analysis and Processing. Master’s Thesis, Sichuan University, Chengdu, China, 2006. [Google Scholar]
- Micael, C.; Seenith, S. Novel fractional order particle swarm optimization. Appl. Math. Comput. 2016, 283, 36–54. [Google Scholar]
- Wei, J.R.; Ma, Y.; Xia, R. Otsu image segmentation algorithm based on fractional particle swarm. Comput. Eng. Des. 2017, 38, 3284–3290. [Google Scholar]
- Dalia, Y.; Mohamed, A.E.; Seyedali, M. Fractional-order calculus-based flower pollination algorithm with local search for global optimization and image segmentation. Knowl.-Based Syst. 2020, 197, 105889. [Google Scholar]
- Chen, L.P.; Gao, J.H.; Lopes, A.M.; Zhang, Z.Q.; Chu, Z.B.; Wu, R.C. Adaptive fractional-order genetic-particle swarm optimization Otsu algorithm for image segmentation. Appl. Intell. 2023, 53, 26949–26966. [Google Scholar] [CrossRef]
- Wang, X.M.; Zhang, W.Y.; Xing, J.Y. Higher-order Caputo fractional order differential operators and its application in image enhancement. J. Comput. Res. Dev. 2023, 60, 448–464. [Google Scholar]
- Nguyen, P.T.; Nguyen, S.H.; Mai, T.V. Finite-time dissipative control design for one-sided Lipschitz nonlinear singular Caputo fractional order systems. Int. J. Syst. Sci. 2023, 54, 1694–1712. [Google Scholar]
- Minh, V.T.; Wei, W. Caputo fractional differential variational–hemivariational inequalities involving history-dependent operators: Global error bounds and convergence. Commun. Nonlinear Sci. 2024, 128, 107654. [Google Scholar]
- Fan, Y.Q.; Shao, J.P.; Sun, G.T. A Self-Adaption Butterfly Optimization Algorithm for Numerical Optimization Problems. IEEE Access. 2020, 2020, 88026–88041. [Google Scholar] [CrossRef]
- Singh, N.; Singh, S. A novel hybrid GWO-SCA approach for optimization problems. Eng. Sci. Technol. 2017, 20, 1586–1601. [Google Scholar] [CrossRef]
- Xia, Q.Y.; Ding, Y.M.; Zhang, R.; Liu, M.T.; Zhang, H.T. Blind Source Separation Based on Double-Mutant Butterfly Optimization Algorithm. Sensors 2022, 22, 3979. [Google Scholar] [CrossRef]
- Kong, C.Y. Research on Otsu Image Segmentation Algorithm Based on Firefly Algorithm Optimized by Fractional-Order. Master’s Thesis, Ningxia University, Yinchuan, China, 2019. [Google Scholar]
Function Expression | Dimension | Range | fmin |
---|---|---|---|
30 | [−100, 100] | 0 | |
30 | [−10, 10] | 0 | |
30 | [−100, 100] | 0 | |
30 | [−100, 100] | 0 | |
30 | [−5.15, 5.12] | 0 | |
30 | [−32, 32] | 0 | |
30 | [−600, 600] | 0 | |
30 | [−10, 10] | 0 | |
2 | [−65, 65] | 1 | |
2 | [−5, 5] | 3.075 × 10−4 | |
2 | [−5, 5] | −1.0316 | |
2 | [−2, 2] | 3 |
Function | Index | BOA | FFA | FPSO | PSO | HFBOA |
---|---|---|---|---|---|---|
F1 | BEST | 1.0888 × 10−11 | 5.2955 × 10−2 | 0 | 0.9744 | 0 |
MEAN | 1.2853 × 10−11 | 6.8202 × 10−2 | 18.0763 | 1.7449 | 0 | |
STD | 7.9268 × 10−13 | 6.2858 × 10−2 | 18.5856 | 0.5707 | 0 | |
F2 | BEST | 1.3086 × 10−9 | 10.9756 | 0 | 3.6652 | 0 |
MEAN | 4.4458 × 10−9 | 1.1082 | 19.3553 | 6.8920 | 0 | |
STD | 1.4377 × 10−9 | 5.6678 × 10−2 | 12.9518 | 1.2864 | 0 | |
F3 | BEST | 1.0335 × 10−11 | 5.8945 × 10−2 | 0 | 3.9691 | 0 |
MEAN | 1.2540 × 10−11 | 8.2000 × 10−2 | 50.7183 | 11.1283 | 0 | |
STD | 9.3301 × 10−13 | 1.0152 × 10−2 | 61.1040 | 4.0186 | 0 | |
F4 | BEST | 5.4100 × 10−9 | 8.1970 × 10−2 | 0 | 0.4859 | 0 |
MEAN | 6.1565 × 10−9 | 9.3128 × 10−2 | 1.5025 | 0.7659 | 0 | |
STD | 4.6739 × 10−10 | 4.8686 × 10−3 | 0.9839 | 0.1510 | 0 | |
F5 | BEST | 2.3357 × 10−10 | 4.6991 × 10−2 | 0 | 1.1007 | 0 |
MEAN | 8.2502 × 10−10 | 6.3942 × 10−2 | 10.1079 | 3.3182 | 0 | |
STD | 7.7165 × 10−10 | 5.9537 × 10−3 | 6.6926 | 1.6393 | 0 | |
F6 | BEST | 0 | 8.9905 | 0 | 53.2521 | 0 |
MEAN | 13.5721 | 12.8963 | 34.1000 | 85.0095 | 0 | |
STD | 51.6486 | 1.4408 | 52.6022 | 18.5541 | 0 | |
F7 | BEST | 4.9271 × 10−9 | 0.2543 | 8.8818 × 10−16 | 1.9942 | 8.8818 × 10−16 |
MEAN | 6.0044 × 10−9 | 0.3001 | 3.7122 | 2.5389 | 8.8818 × 10−16 | |
STD | 3.8142 × 10−10 | 0.0191 | 1.9064 | 0.2774 | 0 | |
F8 | BEST | 1.1319 × 10−12 | 2.0533 × 10−3 | 2.5146 × 10−2 | 4.7492 × 10−2 | 0 |
MEAN | 4.3214 × 10−12 | 2.9130 × 10−3 | 0.6818 | 8.4649 × 10−2 | 0 | |
STD | 2.2965 × 10−12 | 3.0735 × 10−4 | 0.2817 | 3.0695 × 10−2 | 0 | |
F9 | BEST | 0.9980 | 2.2026 | 12.6705 | 12.6705 | 0.9980 |
MEAN | 1.4449 | 11.2555 | 12.6735 | 12.6705 | 2.9673 | |
STD | 0.6096 | 3.2662 | 8.2600 × 10−2 | 1.4254 × 10−13 | 3.2104 | |
F10 | BEST | 3.2212 × 10−4 | 3.1048 × 10−4 | 8.6673 × 10−4 | 3.0749 × 10−4 | 3.1388 × 10−4 |
MEAN | 4.3588 × 10−4 | 3.2493 × 10−3 | 3.7876 × 10−2 | 1.1178 × 10−3 | 5.6483 × 10−4 | |
STD | 1.4855 × 10−4 | 7.2934 × 10−6 | 4.5871 × 10−2 | 3.6490 × 10−3 | 1.4503 × 10−3 | |
F11 | BEST | −1.0415 | −0.9507 | −1.0194 | −1.0316 | −1.0316 |
MEAN | −1.0864 | −0.8073 | −0.4961 | −1.0316 | −1.0309 | |
STD | 7.6611 × 10−2 | 4.1317 × 10−2 | 0.3563 | 6.4539 × 10−16 | 3.8581 × 10−4 | |
F12 | BEST | 3.0021 | 4.6238 | 3 | 3 | 3.0004 |
MEAN | 3.1861 | 59.0129 | 3 | 3.0027 | 3.043 | |
STD | 0.3929 | 32.7770 | 1.5139 × 10−15 | 4.1661 × 10−3 | 0.11328 |
Image | Segmentation Algorithm | Iterations | Fitness Value | PSNR | MSE | SSIM |
---|---|---|---|---|---|---|
Lena | BOA-Otsu | 30 | 2990.2579 | 8.8206 | 8470.0803 | 0.3489 |
FFA-Otsu | 19 | 2982.9960 | 8.8244 | 8401.1874 | 0.3502 | |
Im-FpsoOtsu | 48 | 2994.2793 | 8.6099 | 8667.3892 | 0.2176 | |
PSO-Otsu | 88 | 2994.2378 | 8.8816 | 8412.4531 | 0.1316 | |
HFBOA-Otsu | 10 | 2994.6627 | 8.8952 | 8386.1521 | 0.3676 | |
Pirate | BOA-Otsu | 33 | 3286.4006 | 8.8189 | 8534.6528 | 0.2631 |
FFA-Otsu | 18 | 3282.9542 | 8.8855 | 8448.7213 | 0.2809 | |
Im-FpsoOtsu | 27 | 3286.6442 | 8.7928 | 8632.6822 | 0.2629 | |
PSO-Otsu | 78 | 3286.8501 | 8.3563 | 9493.9568 | 0.1106 | |
HFBOA-Otsu | 5 | 3287.4031 | 8.8857 | 8404.2361 | 0.2811 | |
Woman-blonde | BOA-Otsu | 28 | 2520.2425 | 8.8446 | 8484.2954 | 0.3604 |
FFA-Otsu | 15 | 2492.5715 | 8.8632 | 8448.1738 | 0.3561 | |
Im-FpsoOtsu | 12 | 2520.5525 | 8.8616 | 8451.3193 | 0.3544 | |
PSO-Otsu | 29 | 2519.9378 | 8.8607 | 8453.0329 | 0.3550 | |
HFBOA-Otsu | 3 | 2521.4283 | 8.8767 | 8421.8425 | 0.3649 | |
Kodim | BOA-Otsu | 22 | 1626.2219 | 8.3051 | 9430.6818 | 0.1962 |
FFA-Otsu | 13 | 1624.8449 | 8.3093 | 9597.3716 | 0.1828 | |
Im-FpsoOtsu | 15 | 1627.0425 | 8.3586 | 9488.9288 | 0.1986 | |
PSO-Otsu | 29 | 1626.5371 | 8.3779 | 9446.9456 | 0.1968 | |
HFBOA-Otsu | 4 | 1627.1348 | 8.3868 | 9427.6422 | 0.1993 |
Image | Segmentation Algorithm | Iterations | Fitness Value | PSNR | MSE | SSIM |
---|---|---|---|---|---|---|
Wall | BOA-Otsu | 55 | 2004.3901 | 8.1399 | 9979.0455 | 0.2183 |
FFA-Otsu | 6 | 2013.9126 | 8.3209 | 9571.8541 | 0.2639 | |
Im-FpsoOtsu | 24 | 2016.4836 | 8.3222 | 9568.5428 | 0.2528 | |
PSO-Otsu | 74 | 2016.1782 | 8.3431 | 9522.9874 | 0.2103 | |
HFBOA-Otsu | 5 | 2016.5050 | 8.4214 | 9344.1992 | 0.2726 | |
Gorge | BOA-Otsu | 18 | 3854.2277 | 9.4975 | 7300.0599 | 0.1940 |
FFA-Otsu | 30 | 3851.2286 | 9.4697 | 7513.3970 | 0.1938 | |
Im-FpsoOtsu | 42 | 3868.6217 | 9.5107 | 7277.9782 | 0.2088 | |
PSO-Otsu | 67 | 3867.9821 | 9.4874 | 7317.1937 | 0.1511 | |
HFBOA-Otsu | 14 | 3868.8271 | 9.5209 | 7259.6398 | 0.2103 | |
Butterfly | BOA-Otsu | 35 | 5936.3788 | 10.8547 | 5340.8421 | 0.4591 |
FFA-Otsu | 18 | 5947.0194 | 10.8538 | 5341.9318 | 0.4579 | |
Im-FpsoOtsu | 58 | 5949.0871 | 10.8538 | 5341.3258 | 0.4579 | |
PSO-Otsu | 92 | 5948.8356 | 10.8532 | 5342.6722 | 0.3361 | |
HFBOA-Otsu | 35 | 5949.2934 | 10.8575 | 5337.3479 | 0.4594 | |
Mandril | BOA-Otsu | 18 | 1930.0532 | 8.4976 | 9190.1544 | 0.2482 |
FFA-Otsu | 14 | 1937.3952 | 8.5931 | 8996.6544 | 0.2664 | |
Im-FpsoOtsu | 45 | 1941.4290 | 8.5900 | 8996.6544 | 0.2664 | |
PSO-Otsu | 46 | 1941.3159 | 8.5813 | 9014.5957 | 0.1704 | |
HFBOA-Otsu | 13 | 1941.6848 | 8.5945 | 8987.7847 | 0.2691 |
Image | Segmentation Algorithm | Iterations | Fitness Value | PSNR | MSE | SSIM |
---|---|---|---|---|---|---|
Lung1 | BOA-Otsu | 30 | 5320.5188 | 13.3348 | 3017.1746 | 0.6448 |
FFA-Otsu | 13 | 5165.1512 | 13.1634 | 3138.6246 | 0.6389 | |
Im-FpsoOtsu | 12 | 5320.9561 | 13.0217 | 3242.7362 | 0.6433 | |
PSO-Otsu | 73 | 5320.2684 | 13.3231 | 3025.3380 | 0.3078 | |
HFBOA-Otsu | 4 | 5320.9911 | 13.3600 | 2999.7106 | 0.6507 | |
Lung2 | BOA-Otsu | 57 | 2975.5037 | 15.0425 | 2036.2553 | 0.7309 |
FFA-Otsu | 29 | 2855.9622 | 15.0298 | 2042.1971 | 0.7324 | |
Im-FpsoOtsu | 71 | 2975.5834 | 15.0674 | 2024.5906 | 0.7192 | |
PSO-Otsu | 80 | 2975.1216 | 15.0318 | 2041.2665 | 0.3484 | |
HFBOA-Otsu | 15 | 2975.6304 | 15.0794 | 2019.0304 | 0.7327 | |
Thorax | BOA-Otsu | 58 | 8731.5057 | 11.2223 | 4907.4865 | 0.4439 |
FFA-Otsu | 14 | 8729.7165 | 11.4004 | 4710.2191 | 0.4583 | |
Im-FpsoOtsu | 70 | 8731.8715 | 11.3341 | 4782.6472 | 0.4509 | |
PSO-Otsu | 96 | 8731.7093 | 11.3925 | 4718.7377 | 0.0558 | |
HFBOA-Otsu | 9 | 8731.9556 | 11.4158 | 4693.4567 | 0.4584 | |
Brain | BOA-Otsu | 72 | 8419.6296 | 10.0260 | 6463.7597 | 0.3173 |
FFA-Otsu | 14 | 8412.6832 | 10.3471 | 6003.0255 | 0.3236 | |
Im-FpsoOtsu | 46 | 8454.5139 | 10.2513 | 6136.9037 | 0.3213 | |
PSO-Otsu | 59 | 8453.829406 | 10.3836 | 5952.8460 | 0.1204 | |
HFBOA-Otsu | 9 | 8454.8034 | 10.3943 | 5938.1894 | 0.3239 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ma, Y.; Ding, Z.; Zhang, J.; Ma, Z. Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization. Fractal Fract. 2023, 7, 871. https://doi.org/10.3390/fractalfract7120871
Ma Y, Ding Z, Zhang J, Ma Z. Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization. Fractal and Fractional. 2023; 7(12):871. https://doi.org/10.3390/fractalfract7120871
Chicago/Turabian StyleMa, Yu, Ziqian Ding, Jing Zhang, and Zhiqiang Ma. 2023. "Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization" Fractal and Fractional 7, no. 12: 871. https://doi.org/10.3390/fractalfract7120871
APA StyleMa, Y., Ding, Z., Zhang, J., & Ma, Z. (2023). Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization. Fractal and Fractional, 7(12), 871. https://doi.org/10.3390/fractalfract7120871