Hi guyz need little help i am curruntly working on my project and need to know that how can i detect RGB colour recognization using matlab and how can i use it with arduino because i want to use camera to detect the colour and perform the other task but i have no idea about it how can i do this ?. kindly if any body knows that post it here THANKS..

My project is simple. three objects colour(R,G,B Colour objects) moving on conveyer belt detect by the camera using matlab then moves each object in different direction.