In the present study, we aim to propose an effective and robust ensemble-learning approach with stacked generalization for image segmentation. Initially, the input images are processed for feature extraction and edge detection using the Gabor filter and the Canny algorithms, respectively; our main goal is to determine the most feature descriptions. Subsequently, we applied the stacking generalization technique, which is generally built with two main learning levels. The first level is composed of two algorithms that give good results in the literature, namely: LightGBM (Light Gradient Boosting Machine) and SVM (support vector machine). The second level is the meta-model in which we use a predictor model that takes the base-level predictions to improve the accuracy of the final prediction. In the stacked generalization process, we use the Extreme Gradient Boosting (XGBoost); it takes as input the sub-models’ outputs to better classify each pixel of the image to give the final prediction. Today, several research works exist in the literature using different machine learning algorithms; in fact, instead of trying to find a single efficient and optimal learner, ensemble-based techniques take the advantage of each basic model; they integrate their outputs to obtain a more consistent and reliable learner. The result obtained from the models of individuals and our proposed approach is compared using a set of evaluation measures for image quality such as IoU, DSC, CC, SSIM, SAM, and UQI. The evaluation and a comparison of the results obtained showed more consistent predictions for the proposed model. Thus, we have made a comparison with some recent deep learning-based unsupervised segmentation methods. The evaluation and a comparison of the results obtained showed more coherent predictions for our stacked generalization in terms of precision, robustness, and consistency.