The purpose of this study is to use image analysis and processing techniques to analyze the SEM and OM photos of ceramic materials to determine the grain size and phase distribution. The key processing is to modify the brightness of objects and background in image, to uniform the image objects or background, in order to distinguish them easily. We used the necessary procedures and analysis method such as variance operator. This lets us extract the phase from which we select for analysis; this will also automatically count phase ration to speed the analysis and improve the accuracy.