Finally, K-means algorithm and image postprocessing techniques are applied to the initial hair region so that the final hair region can be segmented precisely. 
K-means
This energy function is further optimized according to graph cuts technique and initial hair region is obtained. 
graph cuts