This paper focuses on the study of multilevel COVID-19 X-ray image segmentation based on swarm intelligence optimization to improve the diagnostic level of COVID-19. We present a new ant colony optimization with the Cauchy mutation and the greedy Levy mutation, termed CLACO, for continuous domains. Specifically, the Cauchy mutation is applied to the end phase of ant foraging in CLACO to enhance its searchability and to boost its convergence rate. The greedy Levy mutation is applied to the optimal ant individuals to confer an improved ability to jump out of the local optimum. Furthermore, this paper develops a novel CLACO-based multilevel image segmentation method, termed CLACO-MIS. Using 2D Kapur's entropy as the CLACO fitness function based on 2D histograms consisting of non-local mean filtered images and grayscale images, CLACO-MIS was successfully applied to the segmentation of COVID-19 X-ray images. A comparison of CLACO with some relevant variants and other excellent peers on 30 benchmark functions from IEEE CEC2014 demonstrates the superior performance of CLACO in terms of search capability, and convergence speed as well as ability to jump out of the local optimum. Moreover, CLACO-MIS was shown to have a better segmentation effect and a stronger adaptability at different threshold levels than other methods in performing segmentation experiments of COVID-19 X-ray images. Therefore, CLACO-MIS has great potential to be used for improving the diagnostic level of COVID-19. This research will host a webservice for any question at https://aliasgharheidari.com.