Next Article in Journal
Utility of the BioFire® FilmArray® Pneumonia Panel Using Bronchial Washing Specimens: A Comparative Study with Conventional Culture
Previous Article in Journal
Evaluation of CD3 and CD20 Lymphocytes and Mast Cells in the Microenvironment of Central Giant Cell Granuloma, Peripheral Giant Cell Granuloma, and Giant Cell Tumor of Bone
Previous Article in Special Issue
Clinical TNM Lung Cancer Staging: A Diagnostic Algorithm with a Pictorial Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Adaptive Hybrid Metaheuristic Algorithm for Lung Cancer in Pathological Image Segmentation

by
Muhammed Faruk Şahin
1,2,* and
Ferzat Anka
2
1
Department of Computer Engineering, Istanbul Atlas University, 34408 Istanbul, Türkiye
2
Data Science Application and Research Center (VEBIM), Fatih Sultan Mehmet Vakif University, 34445 Istanbul, Türkiye
*
Author to whom correspondence should be addressed.
Diagnostics 2026, 16(1), 84; https://doi.org/10.3390/diagnostics16010084 (registering DOI)
Submission received: 28 August 2025 / Revised: 20 September 2025 / Accepted: 8 October 2025 / Published: 26 December 2025
(This article belongs to the Special Issue Advances in Lung Cancer Diagnosis)

Abstract

Background/Objectives: Histopathological images are fundamental for the morphological diagnosis and subtyping of lung cancer. However, their high resolution, color diversity, and structural complexity make automated segmentation highly challenging. This study aims to address these challenges by developing a novel hybrid metaheuristic approach for multilevel image thresholding to enhance segmentation accuracy and computational efficiency. Methods: An adaptive hybrid metaheuristic algorithm, termed SCSOWOA, is proposed by integrating the Sand Cat Swarm Optimization (SCSO) algorithm with the Whale Optimization Algorithm (WOA). The algorithm combines the exploration capacity of SCSO with the exploitation strength of WOA in a sequential and adaptive manner. The model was evaluated on histopathological images of lung cancer from the LC25000 dataset with threshold levels ranging from 2 to 12, using PSNR, SSIM, and FSIM as performance metrics. Results: The proposed algorithm achieved stable and high-quality segmentation results, with average values of 27.9453 dB in PSNR, 0.8048 in SSIM, and 0.8361 in FSIM. At the threshold level of T = 12, SCSOWOA obtained the highest performance, with SSIM and FSIM scores of 0.9340 and 0.9542, respectively. Furthermore, it demonstrated the lowest average execution time of 1.3221 s, offering up to a 40% improvement in computational efficiency compared with other metaheuristic methods. Conclusions: The SCSOWOA algorithm effectively balances exploration and exploitation processes, providing high-accuracy, low-variance, and computationally efficient segmentation. These findings highlight its potential as a robust and practical solution for AI-assisted histopathological image analysis and lung cancer diagnosis systems.

Graphical Abstract

1. Introduction

Lung cancer remains one of the most prevalent and deadly cancer types worldwide, and its early detection and accurate classification significantly improve survival rates [1,2]. Medical imaging techniques, particularly computed tomography (CT), are widely employed to visualize pulmonary nodules and form the basis of clinical decision support systems [3,4]. Segmentation of these images plays a critical role in delineating tumor boundaries, measuring tumor volume, and conducting diagnostic analyses [5,6]. In this context, multi-level thresholding techniques have recently been widely used to enhance segmentation quality by effectively separating different intensity levels within the image [7,8,9]. However, such thresholding methods often impose a high computational burden, especially in high-resolution and structurally complex CT images, and determining the optimal threshold values becomes a challenging optimization problem [10,11]. In cases where conventional methods fall short, metaheuristic algorithms provide promising alternatives for solving multi-level thresholding problems [12,13].
Metaheuristic algorithms, inspired by nature-based heuristic search strategies, are capable of generating near-global optimum solutions in high-dimensional search spaces [14]. Thus, they are effectively and efficiently used in the automatic determination of threshold values in medical image segmentation tasks [15,16]. These methods not only improve segmentation accuracy but also contribute to advanced tasks such as classification, volume estimation, and structural analysis [17,18]. Numerous studies in the literature have demonstrated the effectiveness of metaheuristic-based multi-level thresholding techniques in CT-based lung cancer imaging [19,20,21,22]. However, the existing literature largely focuses on CT images, whereas segmentation studies on histopathological images which are of critical importance for the diagnosis and classification of lung cancer remain relatively limited. Histopathological images provide detailed information at the cellular level, forming the morphological foundation of diagnosis and enabling the distinction of pathological subtypes [23,24,25]. Nonetheless, the structural characteristics of these images, such as high resolution, color diversity, and textural complexity, make segmentation tasks particularly challenging [26,27]. Therefore, applying multi-level thresholding in combination with metaheuristic algorithms to histopathological images not only aims to enhance diagnostic accuracy but also seeks to address a significant gap in the current body of literature. Such segmentation approaches offer direct benefits beyond research applications, extending into clinical practice as well. In particular, accurate and rapid segmentation of histopathological images enables pathologists to more reliably differentiate tumor cells, identify subtypes, and make earlier treatment decisions. The clinical implementation of the proposed model aspires to reduce observer variability, thereby providing more objective and reproducible outcomes.

Motivation and Contribution

Lung cancer presents a multilayered problem that awaits resolution not only from a clinical standpoint but also in terms of computer-aided medical imaging and artificial intelligence-based analytical methods. In recent years, significant advances have been achieved in the field of image segmentation with the development of computer-aided diagnostic systems. However, most studies in the literature predominantly focus on Computed Tomography (CT) images, while histopathological images which offer vital microscopic-level information have been largely overlooked. This oversight represents not only a technical gap but also a missed opportunity to explore an area with substantial clinical diagnostic potential. Segmentation of histopathological images can play a decisive role in the morphological differentiation of tumor cells, the discrimination of subtypes, and the enhancement of early-stage diagnosis. In this context, our study aims to both address this gap and offer a novel perspective to the existing literature.
The primary motivation of this study is to develop a more accurate, flexible, and clinically applicable segmentation model by integrating multi-level thresholding approaches with advanced metaheuristic optimization algorithms in histopathological lung cancer images. The complex tissue structures, dense color information, and multi-scale structural variations in high-resolution histopathological data pose significant challenges for classical segmentation methods. Therefore, automated thresholding systems based on metaheuristic algorithms are of critical importance to enhance segmentation performance. In this regard, due to the limitations of single algorithms in balancing exploration and exploitation capabilities, a hybrid metaheuristic approach is proposed. The hybrid framework introduced in this study offers a dynamic strategy that adaptively and sequentially manages exploration and exploitation phases to overcome such limitations. The selected algorithms for hybridization are Sand Cat Swarm Optimization (SCSO) and Whale Optimization Algorithm (WOA). SCSO is a numerically stable algorithm with high exploration capacity and has been effectively utilized across various application domains. Its ability to maintain population diversity over extended iterations makes it particularly suitable for high-dimensional optimization problems such as multi-level thresholding. On the other hand, WOA is an algorithm with strong convergence ability, utilizing spiral and linear movement strategies to ensure focused exploitation. The complementary nature of these two algorithms forms the core rationale behind the proposed adaptive hybrid design. In the first phase, SCSO efficiently explores the broader solution space, while in the second phase, WOA intensively searches around the best solutions obtained, effectively approaching local optima. Furthermore, although the hybridization of metaheuristic methods for exploration and exploitation (e.g., PSOGWO, GWOWOA, DEWOA) has been examined in previous studies, these combinations typically suffer from various issues such as premature convergence, high variance in independent runs, and computational inefficiency in high-dimensional problems. In contrast to these approaches, the proposed SCSOWOA introduces an adaptive transition mechanism that dynamically balances the trade-off between exploration and exploitation. Moreover, while most previous hybridization strategies have been validated solely on CT images, the present study addresses histopathological lung cancer segmentation, which, despite its significant clinical relevance, has received limited attention in the literature. The integration of an adaptive phase transition with histopathological thresholding represents the core novelty of our work. The novel contributions of this study are summarized as follows:
  • A new hybrid Sand Cat Swarm Optimization and Whale Optimization algorithm (SCSOWOA) is designed, which manages exploration and exploitation phases through an adaptive sequential transition mechanism. Thus, the broad search capability of SCSO is dynamically integrated with the precise convergence power of WOA.
  • Unlike similar studies in the literature, the proposed method aims to optimize both segmentation accuracy and computational efficiency.
  • While preserving PSNR metrics in the multi-level thresholding problem, the method significantly improves SSIM and FSIM performance.
  • The findings are statistically validated in detail, and the real-world applicability of the method is demonstrated through verification on histopathological lung cancer images.
  • The proposed adaptive hybrid SCSOWOA method fills a notable gap in the literature where metaheuristic-based segmentation of histopathological images remains limited, thereby contributing algorithmic novelty to both medical imaging and optimization research.
The remainder of this paper is organized as follows: Section 2 reviews related work. Section 3 details the proposed method’s framework. Section 4 presents experimental results. Section 5 and Section 6 discuss the findings and the strongest side of the study and its limitations. Finally, Section 7 concludes the paper by summarizing key outcomes and highlighting potential directions for future research.

2. Related Studies

This section provides a comprehensive review of the current literature on image thresholding techniques, with relevant methods categorized under dedicated subheadings. Through this classification, the current state of the problem domain and the core characteristics of existing approaches are systematically presented.

2.1. Deep Learning-Based Lung Segmentation Approaches

Accurate segmentation of pulmonary nodules is critical for the early detection and diagnosis of lung cancer. However, small nodules often exhibit low contrast and are difficult to distinguish from surrounding structures, making their segmentation particularly challenging. To address this issue, a Wavelet U-Net++ approach has been proposed for CT images [28]. This method enhances segmentation accuracy by integrating wavelet pooling with the U-Net++ architecture to capture both high- and low-frequency components of the image. On the LIDC-IDRI dataset, it achieves an average Dice coefficient of 0.936 and an average IoU of 0.878. In another study, the RAD-UNet method is proposed to improve the feature extraction process in CT images, where target pixels often resemble surrounding tissues [29]. The classical U-Net architecture is enhanced with several structural modifications. Specifically, the encoder is replaced with a ResNet residual module to obtain deeper representations, along with the inclusion of a spatial pyramid pooling module. The decoder is enriched with channel and spatial attention mechanisms and supported by a cross-fusion feature module. On the LIDC dataset, the model achieves a mean IoU of 87.76% and an F1-score of 93.56%. Similarly, the UNETR method has been proposed for lung cancer segmentation in CT scans, yielding a segmentation accuracy of 97.83% on the Decathlon dataset [30]. However, all of these methods require high-performance GPUs due to their computational cost, presenting practical limitations. To mitigate this issue, UNet 3+ has been introduced, aiming to reduce network parameters and improve feature extraction efficiency [31]. This method prunes full-scale skip connections and incorporates the Convolutional Block Attention Module (CBAM) to capture essential features more effectively. As a result, it achieves up to a 36% reduction in architectural parameters while maintaining high segmentation performance. To further address the computational cost of more complex architectures, DeepLabV3+ has been proposed [32]. This method utilizes the Atrous Spatial Pyramid Pooling (ASPP) module and offers improved computational efficiency compared to architecture such as Xception, ResNet-18, Inception-ResNet-v2, MobileNet-v2, and ResNet-50. In addition to segmentation approaches focused on CT scans, analyses based on histopathological images are gaining increasing importance in lung cancer diagnosis. Accordingly, the CUNet3+ method has been proposed for lung cancer segmentation in histopathological images [33]. Unlike UNet, this method uses small-scale encoder layers to transfer low-level semantic information through max pooling operations, while large-scale encoder layers use linear interpolation to convey high-level semantic features. This architecture achieves segmentation results with a Dice coefficient of 0.9150 and an IoU of 0.8893. However, the ability to distinguish between different tissue components under varying conditions remains limited. Beyond these deep learning-based methods, recent years have witnessed growing interest in approaches that integrate metaheuristic algorithms particularly to enhance segmentation accuracy and improve optimization processes.

2.2. Lung Cancer Segmentation Using Metaheuristic Algorithms

Despite the notable advancements achieved by deep learning-based methods in segmentation performance, challenges such as model complexity, computational costs, and hyperparameter optimization remain significant obstacles. In this context, metaheuristic algorithms have gained prominence in the literature, particularly as auxiliary tools for feature selection, parameter tuning, and enhancement of segmentation quality. This section systematically examines how metaheuristic algorithms have been integrated into lung cancer segmentation and their impact on overall performance. To support the early diagnosis of lung cancer, the Whale with Tri-Level Enhanced Encircling Behavior (WTEEB) method has been proposed [34]. The method begins with a preprocessing phase, where the input image is subjected to several operations. Subsequently, the Otsu thresholding model is employed to segment the preprocessed images. In the third phase, LBP (Local Binary Pattern) features are extracted and classified using an optimized Convolutional Neural Network (CNN). The CNN’s hyperparameters such as filter size, the number of hidden units in the fully connected layer, and the activation function are fine-tuned using an improved Whale Optimization Algorithm. However, the model’s generalizability in real-world clinical settings and its robustness across different datasets have not yet been validated. To address these limitations, the Improved Moth Flame Optimization (IMFO) method has been proposed [35]. This approach optimally adjusts the CNN’s activation function and the number of convolutional layers using IMFO. The method demonstrated improved accuracy compared to existing SVM [36], KNN, CNN, MFO, WTEEB, and GWO+FRVM approaches, outperforming them by 6.85%, 2.91%, 1.75%, 0.73%, 1.83%, and 4.05%, respectively. In another study, the Group Theoretic Particle Swarm Optimization (GT-PSO) method has been proposed to optimize segmentation [37]. This approach employs Kapur entropy as the objective function and restructures four core components particle encoding, solution landscape, neighborhood motion, and swarm topology based on group theory. Compared to classical metaheuristics, GT-PSO achieves higher accuracy, improving Kapur entropy to 9.07, which represents a 16% enhancement over previous methods. Kappa, IoU, and F1 scores exceeded 90%, and stable results were obtained within 700 iterations. However, the method’s computational cost is a major drawback. To mitigate this, an unsupervised segmentation method based on an evolutionary algorithm-driven metaheuristic clustering approach has been proposed [38]. This method was tested on the LIDC-IDRI dataset, yielding average Dice scores of 82.35% (705 nodules) and 71.05% (59 challenging nodules). A high correlation (R ≥ 92.16%) was also achieved when compared with ellipsoid-based volume measurements. Although these segmentation methods based on CT scans have led to considerable advances in lung cancer diagnosis, the diagnostic value of histopathological images has significantly increased in recent years, offering more detailed tissue-level analysis. Therefore, to further improve segmentation accuracy and granularity, metaheuristic algorithms have begun to be intensively studied for pathological images of lung cancer. In this regard, the WDRIME method, based on the Whale Optimization Algorithm, has been proposed for lung detection using histopathological imaging [39]. This approach integrates the whale’s hunting strategy with random mutation to enhance segmentation accuracy and convergence speed. It is designed for multilevel thresholding segmentation and achieves PSNR and SSIM values of 24.69 and 0.8109, respectively. However, the complexity of the algorithm significantly increases computational time and resource demands. Traditional metaheuristic segmentation approaches often suffer from slow convergence, limited exploration capacity, and sub-optimal results. These limitations hinder high-accuracy segmentation, particularly in pathological lung cancer images. To address this, the ASG-HMO method is a refined version of the HMO algorithm has been proposed [40]. This model incorporates four innovative strategies: an adaptive mutualism phase, spiral movement strategy, Gaussian mutation, and t-distribution perturbation. Additionally, 2D Renyi entropy and histogram-based techniques are utilized in the segmentation process. ASG-HMO achieves high performance in terms of PSNR (31.924), SSIM (0.919), FSIM (0.990), and PRI (0.924). It ensures precise tumor delineation during segmentation while also reducing convergence time.

3. Methodology

In this study, a novel adaptive hybrid metaheuristic algorithm is proposed by integrating the SCSO algorithm with the WOA for multi-level thresholding in medical images. The selection of SCSO and WOA is based on their complementary strengths. SCSO demonstrates a robust exploration capability through its orientation-based hunting strategy, which helps maintain population diversity and effectively searches for high-dimensional solution spaces. In contrast, WOA offers a strong exploitation capacity by improving solutions around promising regions using spiral and encircling behaviors. This hybrid structure enables the algorithm to converge more rapidly toward the global optimum while enhancing its ability to avoid local minimal traps. The integration of these two approaches provides a balanced search strategy well-suited for the multilevel thresholding process of histopathological images, where both global exploration and local refinement are essential. This section details the objective function, hybrid methodology, and time complexity of the proposed approach.

3.1. Definition of the Objective Function

In this study, the proposed adaptive hybrid algorithm aims to solve the multi-level thresholding problem by presenting an optimization framework designed to maximize the accuracy of image segmentation. Accordingly, the objective function employed is based on the Otsu-based variance maximization principle. The aim is to maximize the between-class variance while minimizing the total within-class variance in the image. Following this principle, the total variance among classes defined by the threshold set T = { t 1 , t 2 , , t k } is given in Equation (1):
max T J T = i = 1 k + 1 ω i μ i μ T 2
Here, ω i , denotes the probability of the i-th class, μ i represents the mean of that class, and μ T is the global mean of the entire image. The class probability ω i and mean μ i are defined as shown in Equation (2):
ω i = j = t i 1 + 1 t i p j ,   μ i = 1 ω i j = t i 1 + 1 t i j p j
Here, p j denotes the normalized histogram value corresponding to the j-th gray level. The global mean is given in Equation (3):
μ T = j = 0 L 1 j p j
Thus, the function J T seeks to identify the optimal set of thresholds for multi-level thresholding. This function is optimized by the proposed hybrid algorithm. In this approach, the search space is defined over continuous real numbers within the interval [1, 255] which is consistent with the non-discrete nature of the algorithm. Therefore, unlike the classical Otsu method, the threshold values can be precisely optimized without being restricted to fixed grid points. As a result, this objective function is integrated into metaheuristic optimization algorithms to efficiently find the threshold set that provides the best class separation among all possible combinations in the solution space. This enables the algorithm to reach the global optimum on complex and multi-modal fitness surfaces commonly encountered in multi-level image thresholding problems. Consequently, the proposed approach offers superior segmentation accuracy, and a more flexible analytical capability compared to traditional deterministic methods.

3.2. Proposed SCSOWOA Methodology

The proposed adaptive hybrid methodology is constructed by adaptively combining the SCSO [41] and WOA within a hybrid framework. This two-phase structure ensures a balanced performance between the exploration and exploitation capabilities of the algorithm. In the first phase, the SCSO algorithm is applied for T SCSO = λ T m a x iterations, where T m a x denotes the total number of iterations and λ 0 , 1 controls the ratio between the two phases. Consequently, the iteration counts for the SCSO and WOA phases are expressed as in Equation (4):
T SCSO = λ T m a x , T w o a = T m a x T S C S O
Here, T S C S O , represents the exploration phase at the beginning of the algorithm, while T w o a corresponds to the exploitation phase. This structure first explores different regions of the global search space and subsequently performs intensive local searches around promising areas. The initial phase, SCSO, is inspired by the highly sensitive hunting behavior of sand cats. In this phase, individual positions are updated stochastically to ensure broad dispersion across the solution space. For each individual x i in the population X = { X 1 , X 2 , , X N } , where X i R d , the position update is performed based on the directional hunting behavior, as shown in Equation (5):
X i t + 1 = X i t + r 1 X * r 2 X i t
In this equation, X i t , is the position of the i-th individual at iteration t, and X * denotes the best solution found so far. The parameters r 1 and r 2 are random numbers drawn from the uniform distribution U 0 , 1 , enhancing the algorithm’s chaotic behavior. The update simultaneously considers the individual’s past position and its distance from the best-known solution, thereby promoting diversity and effective exploration. Additionally, an alternative update strategy based on directional difference is implemented, as expressed in Equation (6):
X i t + 1 = X i t + r 3 D
Here, D = X * X i t represents the difference vector between the best solution and the current individual, while r 3 ϵ 0 , 1 is a random parameter. This strategy encourages movement toward the best solution while maintaining randomness to mitigate premature convergence. The orientation of individuals during exploration is expressed by θ , with directional changes defined in Equation (7):
θ i t + 1 = θ i t + α sin ω t + ϕ
where α , ω , and ϕ represent amplitude, angular frequency, and phase shift parameters, respectively. These parameters introduce temporal variability in individual orientations, enhancing dynamism and encouraging the exploration of new solutions. The best solution obtained at the end of the SCSO phase is denoted in Equation (8):
T * = arg min i N   f X i T SCSO
The solution T * is then passed to the second phase, where the remaining T W O A = T m a x T S C S O iterations are dedicated to the WOA phase. WOA mimics the bubble-net hunting strategy of humpback whales to perform localized searches around the best solution. The core movement behavior, enabling circular convergence toward the best solution, is defined in Equation (9):
X t + 1 = X * t A C X * t X t
where A = 2 a r a v e C = 2 r , and r 0 , 1 while a decreases linearly with iteration count. X t is the current position, and X * t denotes the best-known position at iteration t . This formulation supports global exploration in early stages and gradually shifts toward local exploitation. The linear decrement of aaa is given in Equation (10):
a = a 0 t . a 0 T m a x
This dynamic allows for a smooth and adaptive transition between exploration and exploitation. Furthermore, WOA employs a spiral update mechanism that simulates the whales’ circular motion, defined in Equation (11):
X t + 1 = D e b l cos 2 π l + X * t
where D = X * t X t is the Euclidean distance between the best and current positions, b is a constant controlling the spiral shape, and l 1,1 is a random parameter. This strategy enables individuals to perform fine-grained searches around the best solution. WOA probabilistically alternates between these two update strategies using a uniform probability p U 0 , 1 , as shown in Equation (12):
X t + 1 = X * t A C X * t X t ,       p < 0.5 D e b l cos 2 π l + X * t ,                     p   0.5
This adaptive switching enhances the exploitation capacity during convergence toward the local optimum. In summary, the proposed adaptive hybrid algorithm leverages the broad exploration capability of SCSO in the first phase, followed by WOA’s intensive exploitation in the second phase to refine the solution. This two-phase hybrid approach ensures a balanced exploration–exploitation trade-off, enabling the algorithm to effectively locate both global and local optima. The chaotic and dynamic nature of SCSO facilitates exploration of diverse regions, while WOA’s solution-focused strategy ensures refined search in promising areas. The adaptive λ parameter controls phase transitions and allows the algorithm to be flexibly adapted to different problem types. This structure reduces the risk of local entrapment and enhances overall solution quality. In addition to all these, the proposed SCSOWOA performs optimization solely on the threshold values over the image histogram, without reconstructing the pixel values. Therefore, the diagnostic content of the original image is preserved, and segmentation is conducted in a manner that enhances class separability. This approach enables the generation of reliable outputs for pathologists by preserving microscopic morphological features without compromising diagnostic information.

3.3. Complexity Analysis and Pseudo-Code Representation of the Proposed Method

In the proposed hybrid method, the position updates of agents with population size N are computed at each iteration. The position update operation is proportional to the problem dimension d and incurs a computational cost of O(d) for each agent. Additionally, the fitness value of each individual is calculated based on an Otsu-based objective function. Since the Otsu function operates on the grayscale histogram, it introduces an additional computational burden of O(L) per evaluation, where L represents the number of grayscale levels in the image and is typically L = 256. Therefore, the total computational complexity per iteration is expressed as O(N × (d + L)) ≈ O(N × d × L) Over all iterations (T), the overall asymptotic complexity of the algorithm is obtained as O(N × T × d × L). Here, the adaptive phase transition mechanism only adds a constant-time decision process with a cost of O(1), which does not significantly increase the total complexity. This analysis indicates that the proposed SCSOWOA has an asymptotic complexity comparable to classical metaheuristic methods, while the hybrid phase structure provides additional advantages in terms of solution quality and convergence speed. The pseudo-code describing the general procedural steps of the proposed algorithm is presented in Algorithm 1, and its flowchart is shown in Figure 1.
Algorithm 1. Adaptive Hybrid SCSO-WOA Algorithm
Input: Total iterations Tmax, population size N, dimension d, switch ratio λ
Output: Optimal solution T*
1. Set Tscso = ⌊λ × Tmax⌋ and Twoa = Tmax − Tscso
2. if Tscso > 0 then   // SCSO Exploration Phase
3.    Initialize population X = {x1, x2, …, xn} randomly in search space
4.    for t = 1 to Tscso do
5.      for each individual xi ∈ X do
6.        Update xi using SCSO movement:
           xi(t + 1) = xi(t) + r1·(μ − xi(t)) + r2;·(x_best(t) − xi(t))
           where r1, r2 ~ U(0, 1) and μ is mean position
7.      end for
8.      Evaluate fitness f(xi) for all xi
9.      Update global best T* ← arg min f(xi)
10.    end for
11. else
12.    Randomly initialize best solution T* within bounds
13.    Evaluate fitness f(T*)
14. end if
15. if Twoa > 0 then       // WOA Exploitation Phase
16.    Initialize population Y = {y1, y2, …, yn} randomly
17.    Set y1 = T*       // Carry over best from SCSO phase
18.    for t = 1 to Twoa do
19.       for each yi ∈ Y do
20.         Compute A = 2a·r − a, C = 2r, where a = 2 − 2t/Twoa, r ~ U(0, 1)
21.         if |A| < 1 then   // Encircling prey (exploitation)
22.           D = |C·T* − yi|, yi = T* − A·D
23.         else      // Search for prey (exploration)
24.           Select random y_rand, D = |C·y_rand − yi|
25.           yi = y_rand − A·D
26.         end if
27.       end for
28.       Evaluate fitness f(yi) and update T* if better found
29.    end for
30. end if
31. return T*

4. Experiments and Results

This section presents the experimental evaluation of the proposed adaptive hybrid SCSOWOA for lung cancer segmentation in histopathological imaging. The performance of the method is compared against several well-established metaheuristic algorithms, namely PSO, GWO, WOA, SCSO, as well as WDRIME [39], which has recently demonstrated high efficiency in the literature. For the experiments, the LC25000 dataset [42], which contains 25,000 histopathological images of lung and colon cancers. The dataset provides image-level class labels (e.g., lung adenocarcinoma, lung squamous cell carcinoma, benign lung tissue), but does not include pixel-level segmentation masks. For this reason, our segmentation experiments were conducted by applying Otsu-based multi-level thresholding to the grayscale histograms of the images, where the optimal thresholds were determined by the proposed metaheuristic algorithms. Thus, the “ground truth” in this context refers to threshold-based class separability rather than manual pixel-wise annotations. To reduce computational complexity and standardize histogram analysis, all images were resized to 256 × 256 pixels and their intensity values were normalized to [0, 1]. In addition, horizontal/vertical flipping (50% probability) and random rotations within ±25° were applied to balance the dataset distribution. From the complete set, 100 images were reserved for testing, while the remainder were used in the optimization process. This preprocessing strategy ensures consistency across experiments while reflecting the structural and color diversity of histopathological images.

4.1. Experiment Setup

In this study, the use of the threshold range T = 2–12, which is the most commonly employed interval in the literature for multilevel thresholding problems, is based on reports indicating that this range provides sufficient discrimination in practical segmentation applications. Lower threshold numbers (T < 2) reduce the discriminative information in segmentation, while much higher threshold numbers (T > 12) neither produce meaningful subregions nor do they justify the increased computational cost. Therefore, the selected range of 2–12 is both consistent with the literature and representative of realistic segmentation scenarios. For all these threshold values, the number of iterations was fixed at 100 to ensure a fair comparison among algorithms and to control computational costs. Each experiment was conducted with 10 independent runs to evaluate the variance arising from the stochastic nature of the algorithms. The population size was set to 30 for all algorithms. Although it is acknowledged that the performance of metaheuristic algorithms is highly sensitive to parameter tuning, all baseline algorithms were run under default settings commonly used in the literature to maintain comparability. More comprehensive hyperparameter optimization or adaptive parameter control has been left as a direction for future research. Detailed parameters and configurations of the related algorithms are presented in Table 1, while hardware and software specifications are provided in Table 2. In GWO and WOA algorithms, the parameter ‘a’ is gradually decreased from 2 to 0 following a linearly decreasing strategy supported by previous studies, thereby ensuring a proper exploration-exploitation balance. For PSO, the inertia weight ‘w’ ranges within, and the cognitive and social coefficients c1 and c2 are set within. The parameter ‘r’ used in the SCSO algorithm acts as a control coefficient that determines the directional movements of agents during the search process, regulating the exploration-exploitation balance. Initially, it starts from a high value to allow broader exploration of the solution space and gradually decreases to a lower value as iterations proceed, enabling intensive exploitation in narrower regions during later stages. In the WDRIME model, the parameter β is selected within the range [0.2–0.8] in accordance with fine-tuning efforts aimed at enhancing performance. In the proposed hybrid SCSOWOA, one of the key parameters, the transition rate λ, was determined as 0.6 following preliminary sensitivity tests conducted within the range [0.4, 0.7]; these tests demonstrated that λ = 0.6 yielded the most consistent and stable results across different threshold levels. Consequently, the proposed hybrid framework combines the exploratory capacity of SCSO with the exploitative strength of WOA, while careful parameter selection maximizes both comparability and computational efficiency. All computations were performed in a sequential processing manner, enabling a realistic comparison of the computational loads across different algorithms.

4.2. Results

In this section, the performance of the proposed SCSOWOA is thoroughly analyzed and compared with several widely adopted metaheuristic algorithms in the literature, including PSO, GWO, WOA, SCSO, and the adaptive hybrid WDRIME algorithm. To this end, quantitative performance metrics such as Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index Measure (SSIM), and Feature Similarity Index (FSIM) are reported, and the statistical differences among the algorithms are evaluated accordingly. PSNR serves as a fundamental quality metric that quantifies the closeness of the segmented image to the original data after multi-level thresholding, indicating the extent of information loss or noise influence. Higher PSNR values reflect better image quality and thereby demonstrate the effectiveness of the optimization strategy. Accordingly, the average PSNR values and their corresponding standard deviations across various threshold levels are summarized in Table 3, while a comparative graphical representation is provided in Figure 2. At lower threshold levels (T = 2 and T = 4), no significant differences are observed among the algorithms. All methods yield PSNR values around 27.60 dB, indicating similar segmentation performance at low complexity. For instance, the proposed SCSOWOA achieves a result of 27.6058 ± 0.0336 dB at T = 2, which is nearly identical to PSO, GWO, and WOA. However, as the threshold level increases (T ≥ 6), the differences among the methods become more pronounced. At T = 6, the PSNR value obtained by SCSOWOA is 27.6235 ± 0.1002 dB, which, while close to that of WOA (27.6534 ± 0.1659) and SCSO (27.7327 ± 0.1753), exhibits a notably lower variance. This outcome suggests that the proposed hybrid algorithm delivers more stable segmentation results. At medium and high threshold levels (T = 8 and T = 10), the proposed method demonstrates a substantial performance improvement. Specifically, at T = 10, SCSOWOA yields a PSNR of 28.6396 ± 0.5454 dB, placing it among the top-performing methods. Although SCSO achieves the highest average value of 28.698 ± 1.0292 dB at this level, the proposed hybrid algorithm outperforms in terms of robustness, presenting less than half the standard deviation, thereby indicating more consistent outcomes. At the highest threshold level evaluated (T = 12), SCSOWOA achieves a PSNR of 28.3346 ± 0.6541 dB, outperforming all other methods except for WOA (28.4913 ± 0.6677). Once again, its lower variance underlines the algorithm’s stable and efficient segmentation capability. In summary, the proposed method exhibits superior performance in segmentation tasks with higher complexity, both in terms of accuracy and consistency. Overall, SCSOWOA delivers more efficient and stable PSNR results across all threshold levels, particularly excelling at higher segmentation complexities (T = 8, 10, and 12). By leveraging the exploration capabilities of SCSO and the exploitation strength of WOA, this hybrid structure achieves an effective balance preserving image quality while minimizing result variability.
To assess the performance of image segmentation in terms of structural similarity, the Structural Similarity Index Measure (SSIM) metric is utilized. SSIM provides a more holistic quality assessment by accounting not only for pixel-level similarity but also for structural, contrast, and luminance components. The SSIM values and corresponding standard deviations for each method are presented in detail in Table 4, with a comparative visualization shown in Figure 2. Within this framework, a systematic comparison is conducted across all algorithms for threshold levels ranging from 2 to 12. At lower threshold levels (T = 2 and T = 4), many algorithms including the proposed SCSOWOA exhibit comparable performance. Specifically, at T = 2, all algorithms achieve approximately 0.5185 SSIM, indicating that structural integrity is only moderately preserved in low-level segmentation outcomes. However, at T = 4, the SCSOWOA method demonstrates a value of 0.7234 ± 0.0635, closely matching the performance of classical approaches such as PSO (0.7226) and GWO (0.7227), while maintaining stability. As the threshold level increases to medium levels (T = 6 and T = 8), differences in structural similarity become more pronounced. At T = 6, SCSOWOA yields a value of 0.8177 ± 0.0444, producing results that are very close to those of PSO (0.8177) and SCSO (0.8259), while clearly outperforming less efficient methods such as WDRIME (0.7742). At T = 8, the SSIM value of SCSOWOA reaches 0.8790 ± 0.0340, reflecting competitive and stable segmentation performance when compared with strong alternatives like SCSO (0.8800) and GWO (0.8755). At higher threshold levels (T = 10 and T = 12), the proposed method demonstrates a distinct efficiency advantage. For T = 10, SCSOWOA achieves a value of 0.9202 ± 0.0275, outperforming other methods such as SCSO (0.9066) and WOA (0.8910) both in terms of mean value and variance. Notably, at T = 12, SCSOWOA reaches the highest structural similarity value among all compared methods, with 0.9340 ± 0.0156. This result not only reflects superior accuracy but also highlights the method’s ability to deliver highly stable and reliable segmentation outputs, as indicated by the low standard deviation. In general, SCSOWOA maintains consistently high and stable SSIM performance across all threshold levels. In particular, at higher thresholds (T = 10 and T = 12), it significantly outperforms other methods in terms of both efficiency and reliability. Therefore, the proposed hybrid approach proves capable of producing high-quality segmentation results not only in pixel-level accuracy but also in terms of structural integrity.
Another key metric used to assess segmentation quality is the Feature Similarity Index Measure (FSIM), which is specifically designed to align with the characteristics of the human visual system. FSIM provides sensitivity to image details by taking into account both phase and magnitude information. In this context, a comprehensive comparison is conducted between the proposed SCSOWOA method and the PSO, GWO, WOA, SCSO, and WDRIME algorithms within the scope of multi-level threshold-based segmentation. The detailed results are presented in Table 5, with a comparative visualization shown in Figure 3. At low threshold levels (T = 2 and T = 4), all algorithms yield FSIM values that are quite similar. For instance, at T = 2, all algorithms achieve values around 0.52, and the proposed SCSOWOA method continues this trend with a result of 0.5295 ± 0.0662. At T = 4, the FSIM performance of SCSOWOA reaches 0.7598 ± 0.0470, closely aligning with PSO (0.7596) and SCSO (0.7599). At these levels, the differences between methods are not yet visually distinguishable. At moderate threshold levels (T = 6 and T = 8), SCSOWOA demonstrates a competitive yet consistent performance. At T = 6, it achieves a value of 0.8605 ± 0.0282, which is very close to PSO (0.8603) and SCSO (0.8616). These results suggest that the hybrid approach successfully integrates the strengths of its constituent algorithms. Notably, at T = 8, SCSOWOA attains the highest average FSIM value of 0.9138 ± 0.0196 and performs on par with strong contenders such as PSO (0.9137) and GWO (0.9138). However, it stands out for having a lower standard deviation, indicating more consistent outputs. At higher threshold levels (T = 10 and T = 12), SCSOWOA exhibits clearly superior FSIM performance. At T = 10, it surpasses all other algorithms with a score of 0.9445 ± 0.0113. Compared to methods like GWO (0.9250) and WDRIME (0.9105), it offers both a higher average and lower variance. The most remarkable result is observed at T = 12, where SCSOWOA achieves the highest average FSIM value of 0.9542 ± 0.0070 and demonstrates exceptional stability with the lowest standard deviation. This value surpasses those of leading methods such as PSO (0.9475), SCSO (0.9459), and WOA (0.9381), indicating superior segmentation efficiency. Based on these findings, the SCSOWOA hybrid algorithm provides the most effective segmentation quality in terms of preserving structural and content-based details. Its outstanding performance at higher threshold levels further confirms the method’s capability to minimize detail loss and maintain visual integrity, particularly in histopathological image segmentation tasks.
To objectively evaluate the performance of multi-level thresholding methods, the overall mean and standard deviation (std.) values for the PSNR, SSIM, and FSIM metrics are computed and presented in Table 6. These metrics, respectively, represent the accuracy, structural similarity, and perceptual quality of the reconstructed images. The proposed SCSOWOA hybrid algorithm consistently yields the most stable and effective results across all metrics, characterized by both high average values and low variances. Notably, the high mean scores and low standard deviations recorded for FSIM and SSIM demonstrate the method’s superior ability to preserve structural and perceptual information. Although the SCSO algorithm achieves the highest average PSNR value of 28.0297 dB, this is accompanied by a relatively high standard deviation of 0.4222, indicating inconsistent performance across different runs. In contrast, the proposed SCSOWOA method ranks second in terms of mean PSNR (27.9453 dB) but achieves a more reliable performance due to its significantly lower standard deviation (0.2840). The PSO, GWO, and WOA algorithms yield comparable results within the 27.75–27.87 dB range, while WDRIME records the lowest mean PSNR at 27.6230 dB. In terms of structural similarity, SCSOWOA achieves the highest average SSIM value of 0.8048, outperforming both SCSO (0.8027) and PSO (0.7989), which suggests that the proposed method preserves structural integrity more effectively. Furthermore, the standard deviations of SCSOWOA (0.0431) and PSO (0.0447) demonstrate the stability of their SSIM outputs. With respect to perceptual quality, measured by FSIM, the highest average value is again obtained by SCSOWOA (0.8361), followed closely by PSO (0.8349) and SCSO (0.8346). The low standard deviations for SCSOWOA (0.0298) and SCSO (0.0301) reinforce the consistency of their results, reflecting robust and reliable performance. On the other hand, the WDRIME algorithm performs the poorest across all metrics, with particularly low results in structural similarity (0.7553) and perceptual quality (0.8137), highlighting its statistical inefficiency. These findings clearly demonstrate the superior performance of the proposed SCSOWOA hybrid algorithm, both in terms of average metric values and result stability. The significant advantages observed in the SSIM and FSIM metrics underline the method’s exceptional capability to preserve both structural and perceptual quality. While PSO and SCSO also emerge as competitive alternatives, WDRIME is statistically shown to be the least effective. Overall, the results validate the efficacy of metaheuristic algorithms in image segmentation tasks and establish the proposed method as a strong and promising solution in this domain.
The computational times of the algorithms are compared in Table 7. The proposed SCSOWOA hybrid algorithm demonstrates the most efficient average execution time of 1.3221 s, outperforming the other methods. This result highlights the advantage of the hybrid structure not only in terms of solution quality but also computational efficiency. In particular, classical algorithms such as PSO and GWO exhibit average execution times of 2.2134 s and 2.0204 s, respectively, indicating up to a 40% increase in speed when compared to them. This efficiency provides a significant advantage for real-time or large-scale data processing tasks in practical applications. The multilevel thresholding performance of the proposed SCSOWOA on lung histopathological images is illustrated in Figure 4. The results reveal that the algorithm generates a clear contrast between cellular structures and the background and successfully isolates the nuclei of the cells. The presence of sharp boundaries in the color distribution indicates that the algorithm effectively achieves discrete class representations. These findings support the capability of SCSOWOA to perform detail-preserving and effective segmentation on histopathological data.
Additionally, pixel-based and spatial-level statistical analyses are conducted to evaluate the diagnostic information preservation capability of the proposed SCSOWOA after segmentation, and the results are presented in Figure 5. The Pearson correlation (r = 0.9872) and Spearman correlation (ρ = 0.9923) between the original and segmented images are obtained. These results indicate that the linear and ordinal relationships between pixel intensities are almost fully preserved, suggesting that the proposed algorithm does not distort critical image features such as global contrast, brightness, and color distribution. The neighbor pixel analysis, conducted to assess the spatial dependency between neighboring pixels, also demonstrates that the proposed method maintains the structural integrity. In this context, Pearson (r = 0.8659) and Spearman (ρ = 0.8653) correlation coefficients reveal a strong positive relationship. These findings clearly show that SCSOWOA not only efficiently thresholds pixel intensities but also preserves textural continuity and cellular morphology. The obtained correlation coefficients further validate the reliability of the segmentation process in terms of diagnostic content. Particularly in histopathological images, the preservation of the nucleus-cytoplasm boundaries and intra-tissue structural relationships is of critical importance for pathologists to make accurate interpretations. These analyses strengthen the clinical applicability of the proposed method by demonstrating the segmentation quality of SCSOWOA not only through traditional metrics such as PSNR, SSIM, and FSIM but also via statistical correlation measures.

4.3. Additional Experiment: Comparative Analysis on the LiTS17 Dataset

To further evaluate the competitiveness of the proposed hybrid SCSO-WOA algorithm, additional experiments were conducted on the Liver Tumor Segmentation Challenge (LiTS17) dataset [43], which provides pixel-level ground truth annotations. This famous data set has recently attracted the attention of many researchers [44,45,46]. In these experiments, the hybrid approach was compared against a state-of-the-art deep learning–based model, namely U-Net. The U-Net model used for comparison was trained with the Adam optimizer, an initial learning rate of 1 × 10−3, a batch size of 8, and 100 epochs. The loss function combined binary cross-entropy and Dice loss. The results, summarized in Table 8, report not only image quality measures such as PSNR, SSIM, and FSIM, but also widely adopted medical image segmentation metrics including the Dice coefficient, Jaccard index, and Hausdorff distance. The findings clearly demonstrate that the hybrid SCSO-WOA algorithm outperforms U-Net. Specifically, the proposed method achieved 28.72 dB PSNR, 0.7011 SSIM, and 0.7292 FSIM, which substantially exceed the values reported for U-Net (9.02 dB, 0.1670, and 0.0004, respectively). Similarly, for overlap-based metrics, the hybrid approach yielded superior results with a Dice coefficient of 0.7210 and a Jaccard index of 0.5667, while U-Net achieved only 0.3428 and 0.2089, respectively. Moreover, in terms of Hausdorff distance, the hybrid algorithm produced a lower value (103.20) compared to U-Net (152.49), indicating more stable boundary convergence. These findings confirm that the hybrid SCSO-WOA approach exhibits strong performance not only on histogram-based quality measures but also on pixel-level segmentation metrics, thereby demonstrating its competitiveness with deep learning–based methods. The improvements observed in clinically critical metrics such as Dice and Jaccard further support the practical applicability of the proposed method.

4.4. Ablation Study: Component Analysis of Proposed Method

The ablation study aims to evaluate the contributions of the fundamental components of the proposed hybrid algorithm, namely the SCSO and WOA algorithms. Within this scope, the SCSO, WOA, and SCSOWOA algorithms were compared using PSNR, SSIM, and FSIM metrics to demonstrate the advantages of the hybrid approach. In terms of PSNR, at lower threshold levels (T = 2, 4), the SCSO, WOA, and SCSOWOA algorithms exhibit similar performance, approximately around 27.60 dB. This indicates that all three algorithms provide sufficient accuracy in low-complexity segmentation tasks. At medium threshold levels (T = 6, 8), however, the SCSOWOA produces consistent PSNR values with lower standard deviations compared to its component algorithms. For example, at the T = 6 level, the PSNR value for SCSOWOA is 27.6235 ± 0.1002 dB, whereas it is 27.7327 ± 0.1753 dB for SCSO and 27.6534 ± 0.1659 dB for WOA. These results suggest that the hybrid approach achieves more stable segmentation outputs by effectively balancing the exploration capabilities of SCSO and the exploitation strength of WOA. A similar trend is also observed concerning SSIM and FSIM metrics. At higher threshold levels (T = 10 and T = 12), SCSOWOA outperforms the component algorithms both in terms of mean values and variance, particularly demonstrating superior performance in preserving structural and perceptual quality. For instance, at T = 12, the SSIM and FSIM values are measured as 0.9340 ± 0.0156 and 0.9542 ± 0.0070, respectively, which are more efficient compared to the respective values of SCSO (0.9085 and 0.9459) and WOA (0.9144 and 0.9381). This analysis reveals that the SCSOWOA hybrid algorithm not only combines the performances of its components but also integrates their strengths in a complementary manner. The broad exploration capacity of SCSO together with the local search and exploitation abilities of WOA enables the hybrid framework to produce more stable and higher-quality segmentation results. Therefore, the ablation study clearly validates the effectiveness of the proposed hybrid approach’s design.

5. Discussion

In this study, the hybrid optimization algorithm based on Sand Cat Swarm Optimization and Whale Optimization Algorithm (SCSOWOA), developed for the multilevel image thresholding problem in lung cancer histopathological images, is compared against metaheuristic methods including PSO, GWO, WOA, SCSO, and WDRIME. The comparisons are performed using three distinct metrics (PSNR, SSIM, and FSIM) which assess image quality at both numerical and structural levels, accompanied by statistical analyses. Overall, the proposed SCSOWOA demonstrates superior performance across multiple metrics and achieves statistically significant improvements in SSIM and FSIM values (p < 0.05). While the SCSO algorithm provides the highest mean PSNR, the hybrid approach achieves more stable results due to its lower standard deviation. This suggests that hybrid structures combining exploration and exploitation processes may offer an effective approach to enhancing segmentation quality. In terms of computational efficiency, SCSOWOA exhibits a clear speed advantage over other metaheuristic methods, reinforcing its applicability to complex histopathological image segmentation tasks. Interestingly, at T = 10 and T = 12, SCSO achieves marginally higher mean PSNR values than the hybrid approach. This can be attributed to SCSO’s aggressive exploration behavior, which occasionally finds sharper pixel-level intensity separations. However, this comes at the cost of higher variance and reduced structural similarity. In contrast, the hybrid SCSOWOA achieves more stable outputs, and its superiority in SSIM and FSIM confirms that it preserves structural and perceptual fidelity better, which is more clinically relevant for histopathological segmentation. The proposed hybrid algorithm also presents lower computational complexity than the compared techniques. This efficiency stems from its balanced design between exploration and exploitation and the incorporation of optimized search mechanisms. Reduced computational complexity increases the practicality of the algorithm for processing large-scale, high-resolution histopathological images. This reduction is particularly beneficial for real-time clinical decision support systems, where a balance between speed and accuracy is crucial. However, these findings do not indicate absolute superiority but rather reflect the algorithm’s relative performance under the specific dataset and parameter settings used. The performance of metaheuristic algorithms is known to be highly sensitive to parameter choices and initial conditions. For example, hyperparameters such as population size, number of iterations, and control parameters can significantly influence outcomes. Therefore, further experimental analyses are necessary to determine whether similar performance can be achieved under alternative configurations or datasets. Moreover, as image characteristics and threshold levels vary, the behavior of the algorithms may also change, which may pose a challenge to generalizability. Additionally, since each evaluation metric measures a different aspect of image quality, relying on a single metric for performance assessment may be methodologically insufficient. For instance, PSNR assesses only pixel-level similarity, while SSIM also incorporates structural information, potentially leading to contradictory results. This observation is corroborated by the relatively strong performance of the proposed hybrid method, where the higher Pearson and Spearman correlation values between the original and segmented pixels (0.9872 and 0.9923, respectively) suggest that the algorithm captures the overall image structure and pixel-level intensity distributions accurately. However, the moderate performance in Neighbor Pixel Pearson Correlation (0.8659) and Neighbor Pixel Spearman Correlation (0.8653) indicates that while the algorithm effectively preserves global structure, there may still be room for improvement in capturing finer, local details, particularly at the pixel neighborhood level. This could potentially lead to further improvements in segmentation, particularly in more complex image regions or where subtle variations in intensity exist. Despite this, the hybrid approach still outperforms others in terms of structural similarity as measured by SSIM and FSIM, which are more clinically relevant for histopathological applications, emphasizing the robustness and perceptual fidelity of the method. The relatively strong performance of the proposed hybrid method suggests that its adaptability and integration strategy have been effectively designed. However, this observation holds limited generalizability unless validated across different problem domains (e.g., medical image classification, denoising) and a wide variety of datasets. In addition to all these aspects, the clinical significance of the study lies not only in improving segmentation performance through numerical metrics but also in its potential use as a tool that can enhance diagnostic accuracy and reliability in the daily workflow of pathology experts. In this regard, SCSOWOA-based segmentation offers a viable approach that can be implemented as a decision support system in clinical practice.

6. Limitation

Although the proposed SCSOWOA-based hybrid optimization algorithm produces efficient results for the multilevel image thresholding problem in histopathological images, several limitations should not be overlooked. First, the performance evaluation is limited to a specific dataset involving lung cancer histopathological images. Variations in image structure, noise levels, and resolution may directly affect the optimization process and the output metrics. Second, the well-known parameter sensitivity issue associated with metaheuristic algorithms is only partially addressed in this study. The control parameters of the SCSO and WOA algorithms are kept constant, and no hyperparameter optimization is conducted. Consequently, the reported results are potentially contingent on these fixed parameter configurations. A more systematic parameter search or the adoption of adaptive control mechanisms could yield more robust performance in future studies. Another limitation lies in the reliance on only three objective image quality metrics—PSNR, SSIM, and FSIM—for performance evaluation. While these metrics capture different dimensions of image quality, subjective criteria such as human visual assessment are not included. These limitations should be carefully considered when interpreting and generalizing the findings, and future work should aim to address them through more comprehensive and diversified evaluations.

7. Conclusions and Future Works

Research on lung cancer segmentation using histopathological images remains limited in the literature, and existing approaches primarily rely on traditional image processing or deep learning-based techniques. This highlights the need for alternative methods capable of meaningfully processing high-resolution and structurally complex histopathological data. In this study, a novel adaptive optimization method is proposed by hybridizing the SCSO and WOA to solve the multilevel image thresholding problem in lung cancer histopathology. The proposed SCSOWOA optimizes threshold values over the image histogram, performing content-aware tissue separation rather than artificial partitioning. Experimental results show that the proposed method achieves notably high performance, particularly in structural similarity-based metrics such as SSIM and FSIM, indicating superior visual quality and structural preservation. The proposed SCSOWOA achieved 0.9340 SSIM and 0.9542 FSIM at T = 12, representing the most efficient structural and perceptual quality among all compared methods. The algorithm also reached 27.9453 dB average PSNR with low variance, and achieved an average execution time of 1.3221 s, which is up to 40% faster than conventional metaheuristic. These results confirm that the proposed hybrid approach provides a compelling balance of accuracy, stability, and efficiency for lung cancer histopathological image segmentation. This enables accurate segmentation of cancerous regions, offering a promising tool for early diagnosis and clinical decision support systems. The integration of the proposed model into the clinical workflow can be implemented as a decision support module integrated with digital pathology systems. For instance, following the digitization of histopathological slides during the scanning process, the algorithm can provide automatic segmentation, thereby reducing the workload of pathologists and highlighting suspicious regions. This approach may enhance clinical accuracy and time efficiency by supporting early diagnosis. In future studies, the integration of the algorithm with hospital information systems and image management platforms is planned. Nevertheless, due to parameter sensitivity and potential lack of generalizability across different datasets, further in-depth analyses are required. Future research directions include:
  • Expanding test coverage by applying the method to diverse histopathological image sets and cancer types from various organs.
  • Reducing parameter sensitivity through automated parameter tuning or the integration of adaptive control mechanisms.
  • Enhancing computational efficiency via GPU-based acceleration and parallel processing techniques.
  • Developing more advanced segmentation models by integrating with deep learning-based frameworks to construct hybrid systems.

Author Contributions

Conceptualization, M.F.Ş. and F.A.; methodology, M.F.Ş. and F.A.; software, M.F.Ş.; validation, M.F.Ş.; formal analysis, M.F.Ş.; investigation, M.F.Ş. and F.A.; resources, M.F.Ş. and F.A.; data curation, M.F.Ş.; writing—original draft preparation, M.F.Ş. and F.A.; writing—review and editing, M.F.Ş. and F.A.; visualization, M.F.Ş.; supervision, F.A.; project administration, F.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data is presented by the corresponding author based on request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Mridha, M.F.; Prodeep, A.R.; Hoque, A.M.; Islam, M.R.; Lima, A.A.; Kabir, M.M.; Hamid, M.A.; Watanobe, Y. A Comprehensive Survey on the Progress, Process, and Challenges of Lung Cancer Detection and Classification. J. Healthc. Eng. 2022, 2022, 5905230. [Google Scholar] [CrossRef]
  2. Nooreldeen, R.; Bach, H. Current and Future Development in Lung Cancer Diagnosis. Int. J. Mol. Sci. 2021, 22, 8661. [Google Scholar] [CrossRef]
  3. Xiao, H.; Li, Y.; Jiang, B.; Xia, Q.; Wei, Y.; Li, H. The Progress on Lung Computed Tomography Imaging Signs: A Review. Appl. Sci. 2022, 12, 9367. [Google Scholar] [CrossRef]
  4. Shafi, I.; Din, S.; Khan, A.; Díez, I.D.L.T.; Casanova, R.D.J.P.; Pifarre, K.T.; Ashraf, I. An Effective Method for Lung Cancer Diagnosis from CT Scan Using Deep Learning-Based Support Vector Network. Cancers 2022, 14, 5457. [Google Scholar] [CrossRef] [PubMed]
  5. Cellina, M.; Cacioppa, L.M.; Ce, M.; Chiarpenello, V.; Costa, M.; Vincenzo, Z.; Pais, D.; Bausano, M.V.; Rossini, N.; Bruno, A.; et al. Artificial Intelligence in Lung Cancer Screening: The Future Is Now. Cancers 2023, 15, 4344. [Google Scholar] [CrossRef] [PubMed]
  6. Sudha, R.; Uma Maheswari, K.M. Analysis on grading of lung nodule images with segmentation using u-net and classification with Convolutional Neural Network Fish Swarm Optimization. Biocybern. Biomed. Eng. 2025, 45, 90–104. [Google Scholar] [CrossRef]
  7. Kumar, A.; Choudhry, M.S. Optimum thresholding for nodule segmentation of lung CT images. In Proceedings of the 2022 IEEE World Conference on Applied Intelligence and Computing (AIC), Sonbhadra, India, 17–19 June 2022; pp. 272–276. [Google Scholar] [CrossRef]
  8. Amiriebrahimabadi, M.; Rouhi, Z.; Mansouri, N. A Comprehensive Survey of Multi-Level Thresholding Segmentation Methods for Image Processing. Arch. Comput. Methods Eng. 2024, 31, 3647–3697. [Google Scholar] [CrossRef]
  9. Osadebey, M.; Andersen, H.K.; Waaler, D.; Fossaa, K.; Martinsen, A.C.; Pedersen, M. Three-stage segmentation of lung region from CT images using deep neural networks. BMC Med. Imaging 2021, 21, 112. [Google Scholar] [CrossRef] [PubMed]
  10. Abualigah, L.; Almotairi, K.H.; Elaziz, M.A. Multilevel thresholding image segmentation using meta-heuristic optimization algorithms: Comparative analysis, open challenges and new trends. Appl. Intell. 2023, 53, 11654–11704. [Google Scholar] [CrossRef]
  11. Jiang, Y.; Zhang, D.; Zhu, W.; Wang, L. Multi-Level Thresholding Image Segmentation Based on Improved Slime Mould Algorithm and Symmetric Cross-Entropy. Entropy 2023, 25, 178. [Google Scholar] [CrossRef]
  12. Abdel-Basset, M.; Mohamed, R.; Abouhawwash, M.; Askar, S.S.; Tantawy, A.A. An Efficient Multilevel Threshold Segmentation Method for Breast Cancer Imaging Based on Metaheuristics Algorithms: Analysis and Validations. Int. J. Comput. Intell. Syst. 2023, 16, 101. [Google Scholar] [CrossRef]
  13. Houssein, E.H.; Helmy, E.D.; Oliva, D.; Elngar, A.A.; Shaban, H. Multi-level Thresholding Image Segmentation Based on Nature-Inspired Optimization Algorithms: A Comprehensive Review. In Metaheuristics in Machine Learning: Theory and Applications; Springer International Publishing: Cham, Switzerland, 2021; pp. 239–265. [Google Scholar] [CrossRef]
  14. Ibrahim, M.Q.; Hussein, N.K.; Guinovart, D.; Qaraad, M. Optimizing Convolutional Neural Networks: A Comprehensive Review of Hyperparameter Tuning Through Metaheuristic Algorithms. Arch. Comput. Methods Eng. 2025, 1–38. [Google Scholar] [CrossRef]
  15. Mousavirad, S.J.; Schaefer, G.; Zhou, H.; Moghadam, M.H. How effective are current population-based metaheuristic algorithms for variance-based multi-level image thresholding? Knowl.-Based Syst. 2023, 272, 110587. [Google Scholar] [CrossRef]
  16. Houssein, E.H.; Abdalkarim, N.; Hussain, K.; Mohamed, E. Accurate multilevel thresholding image segmentation via oppositional Snake Optimization algorithm: Real cases with liver disease. Comput. Biol. Med. 2024, 169, 107922. [Google Scholar] [CrossRef]
  17. Boga, Z.; Sándor, C.; Kovács, P. A Multidimensional Particle Swarm Optimization-Based Algorithm for Brain MRI Tumor Segmentation. Sensors 2025, 25, 2800. [Google Scholar] [CrossRef]
  18. Ait Mehdi, M.; Belattar, K.; Souami, F. Recent metaheuristic algorithms for medical object localization using MSER detector in computer-aided diagnosis system. Multimed. Tools Appl. 2024, 84, 14433–14487. [Google Scholar] [CrossRef]
  19. Shyamala Bharathi, P.; Shalini, C. Advanced hybrid attention-based deep learning network with heuristic algorithm for adaptive CT and PET image fusion in lung cancer detection. Med. Eng. Phys. 2024, 126, 104138. [Google Scholar] [CrossRef] [PubMed]
  20. Pethuraj, M.S.; Aboobaider, B.B.M.; Salahuddin, L.B. Analyzing CT images for detecting lung cancer by applying the computational intelligence--based optimization techniques. Comput. Intell. 2023, 39, 930–949. [Google Scholar] [CrossRef]
  21. Vijh, S.; Gaurav, P.; Pandey, H.M. Hybrid bio-inspired algorithm and convolutional neural network for automatic lung tumor detection. Neural Comput. Appl. 2023, 35, 23711–23724. [Google Scholar] [CrossRef]
  22. Prasad, U.; Chakravarty, S.; Mahto, G. Lung cancer detection and classification using deep neural network based on hybrid metaheuristic algorithm. Soft Comput. 2024, 28, 8579–8602. [Google Scholar] [CrossRef]
  23. Krithiga, R.; Geetha, P. Breast Cancer Detection, Segmentation and Classification on Histopathology Images Analysis: A Systematic Review. Arch. Comput. Methods Eng. 2021, 28, 2607–2619. [Google Scholar] [CrossRef]
  24. Rakha, E.A.; Tse, G.M.; Quinn, C.M. An update on the pathological classification of breast cancer. Histopathology 2023, 82, 5–16. [Google Scholar] [CrossRef]
  25. Mezei, T.; Kolcsár, M.; Joó, A.; Gurzu, S. Image Analysis in Histopathology and Cytopathology: From Early Days to Current Perspectives. J. Imaging 2024, 10, 252. [Google Scholar] [CrossRef]
  26. Abdelsamea, M.M.; Zidan, U.; Senousy, Z.; Gaber, M.M.; Rakha, E.; Ilyas, M. A survey on artificial intelligence in histopathology image analysis. Wiley Interdiscip. Rev. Data Min. Knowl. Discov. 2022, 12, e1474. [Google Scholar] [CrossRef]
  27. Lin, W.; Hu, Y.; Zhu, R.; Wang, B.; Wang, L. Virtual staining for pathology: Challenges, limitations and perspectives. Intell. Oncol. 2025, 1, 105–119. [Google Scholar] [CrossRef]
  28. Akila Agnes, S.; Arun Solomon, A.; Karthick, K. Wavelet U-Net++ for accurate lung nodule segmentation in CT scans: Improving early detection and diagnosis of lung cancer. Biomed. Signal Process. Control 2024, 87, 105509. [Google Scholar] [CrossRef]
  29. Wu, Z.; Li, X.; Zuo, J. RAD-UNet: Research on an improved lung nodule semantic segmentation algorithm based on deep learning. Front. Oncol. 2023, 13, 1084096. [Google Scholar] [CrossRef]
  30. Said, Y.; Alsheikhy, A.A.; Shawly, T.; Lahza, H. Medical Images Segmentation for Lung Cancer Diagnosis Based on Deep Learning Architectures. Diagnostics 2023, 13, 546. [Google Scholar] [CrossRef] [PubMed]
  31. Xu, Y.; Hou, S.; Wang, X.; Li, D.; Lu, L. A Medical Image Segmentation Method Based on Improved UNet 3+ Network. Diagnostics 2023, 13, 576. [Google Scholar] [CrossRef] [PubMed]
  32. Murugappan, M.; Bourisly, A.K.; Prakash, N.B.; Sumithra, M.G.; Acharya, U.R. Automated semantic lung segmentation in chest CT images using deep neural network. Neural Comput. Appl. 2023, 35, 15343–15364. [Google Scholar] [CrossRef]
  33. Lan, H.; Chen, P.; Wang, C.; Chen, C.; Yao, C.; Jin, F.; Wan, T.; Lv, X.; Wang, J. A Multiscale Connected UNet for the Segmentation of Lung Cancer Cells in Pathology Sections Stained Using Rapid On-Site Cytopathological Evaluation. Am. J. Pathol. 2024, 194, 1712–1723. [Google Scholar] [CrossRef]
  34. Kumar, M.K.; Amalanathan, A. Automated Lung Nodule Detection in CT Images by Optimized CNN: Impact of Improved Whale Optimization Algorithm. Comput. Assist. Methods Eng. Sci. 2022, 29, 7–31. [Google Scholar] [CrossRef]
  35. Sebastian, A.E.; Dua, D. Lung Nodule Detection via Optimized Convolutional Neural Network: Impact of Improved Moth Flame Algorithm. Sens. Imaging 2023, 24, 11. [Google Scholar] [CrossRef] [PubMed]
  36. Kuo, C.F.J.; Huang, C.C.; Siao, J.J.; Hsieh, C.W.; Huy, V.Q.; Ko, K.H.; Hsu, H.H. Automatic lung nodule detection system using image processing techniques in computed tomography. Biomed. Signal Process. Control 2020, 56, 101659. [Google Scholar] [CrossRef]
  37. Lan, K.; Zhou, J.; Jiang, X.; Wang, J.; Huang, S.; Yang, J.; Song, Q.; Tang, R.; Gong, X.; Liu, K.; et al. Group theoretic particle swarm optimization for multi-level threshold lung cancer image segmentation. Quant. Imaging Med. Surg. 2023, 13, 1312–1322. [Google Scholar] [CrossRef]
  38. Shakibapour, E.; Cunha, A.; Aresta, G.; Mendonça, A.M.; Campilho, A. An unsupervised metaheuristic search approach for segmentation and volume measurement of pulmonary nodules in lung CT scans. Expert. Syst. Appl. 2019, 119, 415–428. [Google Scholar] [CrossRef]
  39. Guo, L.; Liu, L.; Zhao, Z.; Xia, X. An improved RIME optimization algorithm for lung cancer image segmentation. Comput. Biol. Med. 2024, 174, 108219. [Google Scholar] [CrossRef] [PubMed]
  40. Abdel-Salam, M.; Houssein, E.H.; Emam, M.M.; Samee, N.A.; Jamjoom, M.M.; Hu, G. An adaptive enhanced human memory algorithm for multi-level image segmentation for pathological lung cancer images. Comput. Biol. Med. 2024, 183, 109272. [Google Scholar] [CrossRef]
  41. Anka, F.; Aghayev, N. Advances in Sand Cat Swarm Optimization: A Comprehensive Study. Arch. Comput. Methods Eng. 2025, 32, 2669–2712. [Google Scholar] [CrossRef]
  42. Borkowski, A.A.; Bui, M.M.; Thomas, L.B.; Wilson, C.P.; DeLand, L.A.; Mastorides, S.M. Lung and Colon Cancer Histopathological Image Dataset (LC25000). arXiv 2019, arXiv:1912.12142. [Google Scholar] [CrossRef]
  43. Bilic, P.; Christ, P.; Li, H.B.; Vorontsov, E.; Ben-Cohen, A.; Kaissis, G.; Szeskin, A.; Jacobs, C.; Mamani, G.E.H.; Chartrand, G.; et al. The Liver Tumor Segmentation Benchmark (LiTS). arXiv 2019, arXiv:1901.04056. [Google Scholar] [CrossRef] [PubMed]
  44. Alawneh, K.; Alquran, H.; Alsalatie, M.; Mustafa, W.A.; Al-Issa, Y.; Alqudah, A.; Badarneh, A. LiverNet: Diagnosis of liver tumors in human CT images. Appl. Sci. 2022, 12, 5501. [Google Scholar] [CrossRef]
  45. Gul, S.; Khan, M.S.; Hossain, M.S.A.; Chowdhury, M.E.; Sumon, M.S.I. A Comparative Study of Decoders for Liver and Tumor Segmentation Using a Self-ONN-Based Cascaded Framework. Diagnostics 2024, 14, 2761. [Google Scholar] [CrossRef] [PubMed]
  46. Brunese, M.C.; Rocca, A.; Santone, A.; Cesarelli, M.; Brunese, L.; Mercaldo, F. Explainable and robust deep learning for liver segmentation through U-net network. Diagnostics 2025, 15, 878. [Google Scholar] [CrossRef]
Figure 1. Flowchart of the proposed method.
Figure 1. Flowchart of the proposed method.
Diagnostics 16 00084 g001
Figure 2. SSIM performance according to algorithms.
Figure 2. SSIM performance according to algorithms.
Diagnostics 16 00084 g002
Figure 3. FSIM performance according to algorithms.
Figure 3. FSIM performance according to algorithms.
Diagnostics 16 00084 g003
Figure 4. Visual outputs of test images.
Figure 4. Visual outputs of test images.
Diagnostics 16 00084 g004
Figure 5. Spatial correlation and neighbor pixel analysis on test images.
Figure 5. Spatial correlation and neighbor pixel analysis on test images.
Diagnostics 16 00084 g005aDiagnostics 16 00084 g005b
Table 1. Parameter settings of the algorithms used.
Table 1. Parameter settings of the algorithms used.
AlgorithmParameter
GWOa: 2 → 0 (linear decreasing)
PSOw: 0.5, c1: 2, c2: 2
WOAa: 2 → 0 (linear decreasing)
SCSOr: rmax → rmin
WDRIMEWOARatio = 0.4, RimeRatio = 0.4, DERatio = 0.2, wf = 0.8, cr = 0.9
SCSOWOA (Proposed)SwitchRatio = 0.6
Table 2. Specifications of used software versions, hardware.
Table 2. Specifications of used software versions, hardware.
SpecificationDetails
Operating SystemWindows 10—64 bit
Python Version3.10
GPUNVIDIA Tesla T4 GPU
CPUi5-7300HQ CPU 2.50 GHz
Table 3. Summary statistics of PSNR according to algorithm and threshold level.
Table 3. Summary statistics of PSNR according to algorithm and threshold level.
AlgorithmThresholdPSNR
MeanStandard Deviation
PSO227.60580.0336
427.54980.1203
627.6350.1630
827.80110.0890
1027.76990.0932
1227.9720.4338
GWO227.61330.0428
427.56420.1032
627.57260.1083
827.82290.0843
1028.25970.8699
1228.1240.8018
WOA227.60850.0336
427.54140.0757
627.65340.1659
827.840.2200
1027.97090.3585
1228.49130.6677
SCSO227.60580.0336
427.55050.1183
627.73270.1753
828.11250.5049
1028.6981.0292
1227.95610.6724
WDRIME227.59320.0605
427.57960.0837
627.60630.0706
827.58580.0568
1027.73940.4100
1227.72910.4013
SCSOWOA (Proposed)227.60580.0336
427.55490.1181
627.62350.1002
827.99770.2531
1028.63960.5454
1228.33460.6541
Table 4. Summary statistics of SSIM according to algorithm and threshold level.
Table 4. Summary statistics of SSIM according to algorithm and threshold level.
AlgorithmThresholdSSIM
MeanStandard Deviation
PSO20.51850.0739
40.72260.0635
60.81770.0463
80.87400.0312
100.90020.0259
120.91310.0279
GWO20.51940.0755
40.72270.0631
60.80120.0340
80.87550.0365
100.89160.0299
120.89330.0551
WOA20.51850.0739
40.71790.0580
60.80900.0328
80.87040.0331
100.89100.0323
120.91440.0269
SCSO20.51850.0739
40.72360.0629
60.82590.0395
80.88000.0293
100.90660.0389
120.90850.0319
Hybrid WDRIME20.47890.0783
40.67710.0706
60.77420.0587
80.81730.0513
100.85310.0502
120.87830.0621
SCSOWOA (Proposed)20.51850.0739
40.72340.0635
60.81770.0444
80.87900.0340
100.92020.0275
120.93400.0156
Table 5. Summary statistics of FSIM according to algorithm and threshold level.
Table 5. Summary statistics of FSIM according to algorithm and threshold level.
AlgorithmThresholdFSIM
MeanStandard Deviation
PSO20.52950.0662
40.75960.0470
60.86030.0293
80.91370.0181
100.93880.0144
120.94750.0091
GWO20.52990.0668
40.75930.0463
60.85190.0221
80.91380.0197
100.92500.0210
120.93600.0291
WOA20.52950.0662
40.75810.0450
60.85350.0221
80.90950.0199
100.92940.0191
120.93810.0130
SCSO20.52950.0662
40.75990.0466
60.86160.0283
80.91220.0170
100.93310.0123
120.94590.0102
Hybrid WDRIME20.51590.0641
40.74010.0512
60.83840.0362
80.88700.0264
100.91050.0274
120.92930.0302
SCSOWOA (Proposed)20.52950.0662
40.75980.0470
60.86050.0282
80.91380.0196
100.94450.0113
120.95420.0070
Table 6. Summary of overall algorithm performance.
Table 6. Summary of overall algorithm performance.
AlgorithmPSNRSSIMFSIM
MeanStd.MeanStd.MeanStd.
PSO27.75910.15540.79890.04470.83490.0306
GWO27.8650.3350.79500.04900.83100.0341
WOA27.82730.25350.79460.04280.82950.0308
SCSO28.02970.42220.80270.04600.83460.0301
WDRIME27.62300.18040.75530.06180.81370.0392
SCSOWOA27.94530.28400.80480.04310.83610.0298
Table 7. Comparison of average execution time of algorithms.
Table 7. Comparison of average execution time of algorithms.
AlgorithmExecution Time Mean (s)
PSO2.2134
GWO2.0204
WOA1.8831
SCSO1.9132
Hybrid WDRIME [39]1.9949
SCSOWOA (Proposed)1.3221
Table 8. Performance comparison of the hybrid SCSO-WOA algorithm and U-Net on the LiTS17 dataset.
Table 8. Performance comparison of the hybrid SCSO-WOA algorithm and U-Net on the LiTS17 dataset.
AlgorithmPSNRSSIMFSIMDice CoefficientJaccard IndexHausdorff Measure
U-Net9.020.16700.00040.34280.2089152.49
SCSO-WOA28.720.70110.72920.72110.5667103.20
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.

Share and Cite

MDPI and ACS Style

Şahin, M.F.; Anka, F. An Adaptive Hybrid Metaheuristic Algorithm for Lung Cancer in Pathological Image Segmentation. Diagnostics 2026, 16, 84. https://doi.org/10.3390/diagnostics16010084

AMA Style

Şahin MF, Anka F. An Adaptive Hybrid Metaheuristic Algorithm for Lung Cancer in Pathological Image Segmentation. Diagnostics. 2026; 16(1):84. https://doi.org/10.3390/diagnostics16010084

Chicago/Turabian Style

Şahin, Muhammed Faruk, and Ferzat Anka. 2026. "An Adaptive Hybrid Metaheuristic Algorithm for Lung Cancer in Pathological Image Segmentation" Diagnostics 16, no. 1: 84. https://doi.org/10.3390/diagnostics16010084

APA Style

Şahin, M. F., & Anka, F. (2026). An Adaptive Hybrid Metaheuristic Algorithm for Lung Cancer in Pathological Image Segmentation. Diagnostics, 16(1), 84. https://doi.org/10.3390/diagnostics16010084

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop