In this paper, optimal multi-level image segmentation is proposed using the Firefly Algorithm (FA). In this work, RGB histogram of the image is considered for bi-level and multi-level segmentation. Optimal thresholds for each colour component are attained by maximizing Otsu’s between-class variance function. The proposed segmentation procedure is demonstrated using standard RGB dataset and validated using the existing FA in the literature combined with three randomization search strategies, such as Brownian Distribution, Lévy Flight and the Gaussian distribution related random variable. The performance assessment between FAs is carried out using parameters, such as objective value, PSNR, SSIM and CPU time.
Image segmentation is an essential procedure, being extensively considered to extract meaningful information from grey scale or colour (RGB) images. During the segmentation process, a digital image is separated into multiple regions, or objects, in order to extract and interpret the relevant information. In recent years, this procedure has been widely considered in many key fields, such as remote sensing3,4,5 medical imaging16, and pattern recognition9 .Determining the exact threshold level to separate an image into desirable objects (foreground) from background remains an extremely significant step in imaging science.
In the literature, a considerable number of parametric and nonparametric bi-level and multi-level thresholding procedures have been proposed and implemented mainly for grey scale images1,2,4,11. Among them, global thresholding is considered as the most preferred image segmentation technique because of its simplicity, robustness, accuracy, and competence14. In general, existing parametric thresholding approaches are computationally costly, time consuming, and some times the performance degrades depending on the image quality6,9. Nonparametric traditional approaches, on the other hand, methods such as Otsu, Kapur, Tsai, and Kittler are simpler and successful for bi-level thresholding11. When the number of threshold level increases, the complexity of thethresholding problem also increases and the traditional method requires more computational time. Therefore, to overcome the computational complexity of most traditional methods, heuristic based bi-level and multi-level image thresholding procedures have been widely proposed by researchers for grey scale1,2 , RGB10, multi-spectral and hyperspectral images3,5. Recent meta-heuristic algorithms, such as cuckoo search1 , bee colony2 , and firefly14, are also employed to solve the m-level image thresholding problem. Most of the above discussed methods are applied and validated on a class of grey scaled images.
In recent years, the segmentation of RGB images, or more generally multi-spectral images, is also getting the attention of researchers. The authors from Ghamisi et al. proposed a heuristic-based segmentation technique for a class of hyperspectral colour images3,5. Su and Hu discussed a colour image quantization technique using selfadaptive differential evolution algorithm and the technique was validated using standard test images10. Sarkar and Das proposed a colour image segmentation procedure using Tsallis entropy and differential evolution. The authors validated the proposed method using a class of RGB images using 2D histogram technique12.
In the proposed work, the RGB histogram of the colour image is considered to solve the m-level thresholding problem. The maximization of Otsu’s between-class variance function is chosen as the objective function. The proposed segmentation procedure is a nonparametric approach, thus employing heuristic methods, such as Brownian search based Firefly Algorithm (BFA), Lévy Flight based Firefly Algorithm (LFA) and FA with Gaussian distribution related random variable (ε). The proposed method is implemented and validated on standard colour images.
2. Problem formulation
Otsu’s based image thresholding was initially proposed back in 19798 . This method returns the optimal threshold of a given image by maximizing the between-class variance function. This procedure already proved its efficiency on grey scale 2,4,7,11,14 and colour images 3,5.
In this paper, Otsu’s approach is considered for colour image segmentation with the aid of the RGB histogram. In RGB space, each colour pixel of the image is a mixture of Red, Green, and Blue (RGB) and for that same image, the data space size is [0, L-1]3 (R = [0, L-1], G = [0, L-1], and B = [0, L-1]). In spite of this, one can formalize the heuristic based segmentation procedure as it follows5 .
Solving this optimization problem for an RGB image may require a much larger computational effort for both bilevel and multi-level thresholds. Many methods have been proposed in the literature to solve the image thresholding problem6,9,13. Compared to traditional analytical techniques, heuristic-based segmentation techniques are used as alternatives due to their computational efficiency. Next section briefly describes some of these.