machine learning image pixel analyzer based on K-means algorithm