© 2021, The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland AG.Image enhancement, aimed at improving the image contrast and information quality, is one of the most critical steps in image processing. Due to insufficient enhancement and the mean shift problem of conventional image enhancement techniques, new artificial intelligence-based image enhancement approaches have become an inevitable need in image processing. This paper employs the krill herd algorithm (KHA) and particle swarm optimization (PSO) to suggest a novel hybrid approach, called (PSOKHA) for image enhancement. The suggested PSOKHA method is used in search of optimum transfer function parameters to increase the quality of the images. For comparative evaluation, the performance of the PSOKHA is compared with six latest successful enhancement methods: PSO, KHA, screened Poisson equation (SPE), histogram equalization (HE), brightness preserving dynamic fuzzy HE (BPDFHE), and adaptive gamma correction weighted distribution (AGCWD). Experiments results in testing images include a medical image, a satellite image, and a handwritten image, demonstrate that the suggested strategy can produce better enhanced images in terms of several measurement criteria such as contrast, PSNR, entropy, and structure similarity index (SSIM).