A method for precise face detection and segmentation is presented combining with the particle swarm optimization. In order to extract face feature precisely, the method uses two key technologies: skin color segmentation and particle swarm search. The experimental results show that this method can eliminate the interference factor, and improve the accuracy of expression recognition, especially well for some single expression recognition.