rgb model automatic clustering