optical sort machine

i wanted to know what this process is called

Machine Vision
Image Processing

and what i would need to implement it for my purposes.

Well not an arduino that is for sure.
It is quite a complex task, you need a good processor and a camera and a language to implement it in. Then a lot of code or a library.