Image segmentation is one of the pivotal steps in image processing. Actually, it deals with the partitioning of the image into different classes based on pixel intensities. This work introduces a new image segmentation method based on the constriction coefficient-based particle swarm optimization and gravitational search algorithm (CPSOGSA). The random samples of the image act as searcher agents of the CPSOGSA algorithm. The optimal number of thresholds is determined using Kapur's entropy method. The effectiveness and applicability of CPSOGSA in image segmentation is accomplished by applying it to five standard images from the USC-SIPI image database, namely Aeroplane, Cameraman, Clock, Lena, and Pirate. Various performance metrics are employed to investigate the simulation outcomes, including optimal thresholds, standard deviation, MSE (mean square error), run time analysis, PSNR (peak signal to noise ratio), best fitness value calculation, convergence maps, segmented image graphs, and box plot analysis. Moreover, image accuracy is benchmarked by utilizing SSIM (structural similarity index measure) and FSIM (feature similarity index measure) metrics. Also, a pairwise non-parametric signed Wilcoxon rank-sum test is utilized for statistical verification of simulation results. In addition, the experimental outcomes of CPSOGSA are compared with eight different algorithms including standard PSO, classical GSA, PSOGSA, SCA (sine cosine algorithm), SSA (salp swarm algorithm), GWO (grey wolf optimizer), MFO (moth flame optimizer), and ABC (artificial bee colony). The simulation results clearly indicate that the hybrid CPSOGSA has successfully provided the best SSIM, FSIM, and threshold values to the benchmark images.