Biomedical image analysis is one of the most challenging and inevitable part of the computer aided diagnostic systems. Automated analysis of the image can detect various diseases automatically without human intervention. Computer vision and artificial intelligence can sometimes defeat human diagnostic power and can reveal some hidden information from the biomedical images. In the field of health care, accurate results are highly required within stipulated amount of time. But to increase accuracy, proper preprocessing with sophisticated algorithms is required. Low quality image can affect processing algorithm which can leads to the poor result. Therefore, sophisticated preprocessing methods are required to get reliable results. Contrast is one of the most important parameter for any image. Poor contrast may cause several problems for computer vision algorithms. Conventional algorithms for contrast adjustment may not be suitable for many purposes. Sometimes, these methods can generate some images that may lose some critical information. In this work, a contrast optimization method based on well-known metaheuristic technique called genetic algorithm with elitism is used that can enhance the biomedical images for better analysis. A new kernel has been proposed to detect the edges. Obtained results illustrate the efficiency of the proposed algorithm. © 2019 IEEE.