glass sensor -plastic sensor

The density of glass is much higher than the others. There are several automated sorting methods that can take advantage of this. One is using a fan to blow the lower density material to one process path while the high density material goes to another.

Plastic is often transparent, while cardboard is always opaque. So you can have a section of the conveyor belt where light shines through the material to a light sensor, followed by an array of air jets that can be selectively turned on to blow opaque objects to a separate path.

There are a lot of great videos that show how these issues have already been solved in the industry. Spend some time doing research.