The article presents an image-processing system using a combined ant colony optimization algorithm andK-means. We have developed the possibility of working directly with «raw» medical images and integrationinto the segmentation algorithm of K-Means and ant colonies. We have implemented and analyzed amixed segmentation algorithm of K-means and ant colony optimization. The software system has beenimplemented to visualize and test the developed algorithm. We have tested the algorithm using data fromthe Ossiriss system. We have also compared the obtained data of the developed method with automaticalgorithms (C-Means) and interactive methods (the algorithm Magic Wand). The article shows the outputimages and values of heuristic coefficients of the algorithm.