I suspect you are interested in optical separators which are used to classify materials based on their material type and colour. See this diagram. read more
Other types of detection are available which act on plastics such as x-rays, lasers and induction sensors. They mostly work in the same principal but detect different spectra. The main ones used for plastics are near infra red ccd type though. read more
There are sensors exist which can sense or detect glass and plastic and it is capacitive sensors. This sensor can sense many materials like wood , polymer , plastic ,glass etc . It works on the principle of changing capacitive voltage between two plates by changing die electric medium between them . read more