Microbiology has an important role in solving human problems that are complex in many fields, such as environment, medical, and biotechnology. One of the important researches in microbiology fields is the counting of the number of bacterial colonies. This research is very important to estimate the number of bacterial cells in each millilitre or gram sample. However, the manual counting of bacterial colonies is a time-consuming task and is also very tedious. To help microbiologists, an automatic counting method of bacterial colonies based on bacterial colonies images is needed to be developed. However, the bacterial colonies images taking by the phones camera has low-quality. They are noise presence and lack of contrast, so the pre-processing method is necessary to be developed. This paper proposes the pre-processing method by using modified Perona-Malik Diffusion (PMD) and Contrast Limited Adaptive Histogram Equalization (CLAHE). The modified PMD filter is used to reduce noise, while the CLAHE method is used to enhance the contrast. Moreover, the morphology operators are used for the petri dish extraction and bacterial colonies counting process. The experimental results show that the proposed method has better performance than the original PMD based on the average values of precision, recall, and F-measure.