Somatic cell count of raw milk is an important index to determine the quality of raw milk and whether a cow is infected by mastitis. The major purpose of this study was to provide a criterion for identifying the somatic cell of raw milk with the area of cell. The raw milk was firstly stained on a slice, magnified as 400 under microscopy, acquired as color images with image processing board. Finally, digital image processing approaches such as segmentation and mathematical morphology were applied to identify the correct somatic. Experimental results revealed that the average of relative errors within 95% confidence interval between image processing and manual counting were 7.52~8.82%. Therefore, the proposed method greatly reduced manual inspection error and time in the somatic cell counting of raw milk.