1. Introduction
Plastic waste is present almost all over the planet and poses serious problems to living organisms and the environment. Such types of waste have decomposition periods in the environment of more than 100 years [
1]. Therefore, they should be introduced into the environment as little as possible. Waste plastic decomposes into fragments under five millimeters in size. Such particles are microplastics and are ubiquitous in marine and terrestrial environments, and even in the water we drink [
2]. They are also present in other organisms, particularly in marines, which is undesirable. Therefore, plastic waste must be managed correctly to prevent it from reaching the environment [
3].
Recycling and reuse are more effective ways to reduce the accumulation of plastic waste, including plastic products that have lost their functionality or have defects from their manufacture. Such products could be of different colors or have some patterns on them, but they can also be transparent. When reusing transparent plastic products, all of the impurities must be removed. Potential impurities have a strong impact on recycled products. They affect their mechanical and visual properties. To this end, sorting machines are used to remove impurities from the mix of used ground plastic [
4]. The classification of plastics is essential in the recycling industry, because only in this way can different plastics be separated from one another [
5,
6]. The sorting machines are of many configurations and operate on different principles for the detection of recycled materials.
There are various techniques for identifying and sorting polymers. Some of these techniques include manual sorting, density separation, electrostatic processes, and various optical systems, including optical inspection using photodiodes or charge-coupled device (CCD) machine vision, near infrared (NIR), ultraviolet (UV), X-ray analysis, and fluorescent light or laser radiation [
7].
The most basic non-automated sorting is manual sorting. Manual sorting is prone to error, expensive, tedious, and can be unsafe [
7].
Density separation systems are used to separate particles with higher densities than water from buoyant ones. Here, the density of particles must significantly differ [
7,
8].
Electrostatic separation systems are used to separate a mixture of plastics that can acquire different charges through triboelectrification. It is not suitable for sorting complex mixtures and the particles must be clean and dry [
7,
9].
Optical systems, which are based on color imaging (Visible light—VIS) sensors can separate different plastics, primarily by color [
10]. Problems only arise when the difference between the different colors is very small [
11]. In that case, more advanced methods should be used.
Spectrometer and Hyperspectral Imaging are used with a wavelength above a visible range. The former only captures the point and the latter captures the entire line [
4]. The most used ranges are VNIR (Visible and near infrared light; 400–1000 nm) and NIR (Near infrared; 800–2500 nm) [
10,
12]. The purity of the material in reuse is related to the quality of the product. A lot of research has been done to separate the various types of plastics, such as acrylonitrile butadiene styrene (ABS), polystyrene (PS), polypropylene (PP), polyethylene (PE), polyethylene terephthalate (PET), and polyvinyl chloride (PVC). These plastics can be separated from each other completely by spectrography [
12,
13]. Information on the composition of the material can also be obtained by using spectrometry [
14,
15]. For better performance, NIR hyperspectral methods are integrated with artificial intelligence methods [
16]. These methods are very effective in separating different materials from one another. When looking for differences in the same material with different colors, these methods are less accurate.
X-ray is suitable for the identification of polyvinyl chloride (PVC) from polyethylene terephthalate (PET). X-ray may involve higher system complexity and also health risk [
10].
Laser technique offers less-than-a-microsecond fast identification of plastic based on atomic emission spectroscopy. A laser is used to release excited ions and atoms from the material surface, and these can then be identified through spectral analysis to provide polymer type and additives present [
7,
17,
18].
Sorters based on CCD cameras and machine vision occur mainly in sorters of various objects. Support vector machines and artificial neural networks are popular choices for classifiers. Thus, a sorter was developed that separates various objects, such as gears, coins, and connectors [
19].
Methods of machine vision, such as deep learning, are emerging in waste sorting. With such methods it is possible to classify and detect various objects, such as glass bottles, paper boxes, paper cups, ceramic plates, and so on [
20].
Most of the methods of machine vision in sorting occur in food production. Thus, various defects on crops, such as tomatoes, oranges, lemons, eggs, seeds, and almonds, are inspected with deep learning [
21,
22,
23], support vector machines [
24], neural networks [
25], and
k-Nearest Neighbors [
26].
These methods are also used in the processing of foods, such as fish and chicken. The quality is checked or certain parts of the animal are identified [
27,
28].
There are also simpler methods for checking seed coloration by counting pixels of a particular color [
29].
Researching the sorting machines, it was found that there were different manipulators for the physical separation of particles. These are various pneumatic, electrical, and hydraulic manipulators for sorting larger objects. Ejecting with compressed air and pneumatic nozzles for smaller objects is also widely used [
30,
31,
32]. There are also advanced algorithms for tracking and simulating single particle excretion. These algorithms are able to track objects on the conveyor belt and separate them from other objects with great precision [
33,
34,
35].
In this research, the development of a real-time sorting machine for sorting transparent plastic granulate with a lot of different defects was presented. These defects are different black dots, blurs, burns, etc. These products are unusable. This can be done by turning the product into base material for new plastics. In the recycling process, defects caused by product injection molding must be eliminated. For this purpose, a polycarbonate (PC) granulate sorting machine was developed, which removes particles with these defects.
The developed sorting machine made an optical control of the granules with the help of a camera operating in the visible range of light. The particles needed to be inspected, so machine vision was used. Machine vision searched for each individual granule in the image and classified it using the k-Nearest Neighbors (k-NN) method. This method was chosen based on the datatype and application requirements. The images to be processed were of size (40 × 40 pixels), which is very small in comparison to images used in conventional machine vision applications. Granule classification requires real-time processing, so a fast and efficient algorithm is needed. The physical sorting of the granules was performed with air nozzles.
Existing sorters offer the sorting of particles by color and size, and some can even determine the composition of the material the particle is made of. The developed prototype sorter uses machine vision and artificial intelligence methods. With these methods, each individual transparent particle can be classified according to the training database so one can determine whether they are to be ejected. The sorting machine can check their color and any irregularities that may appear in a particle.
4. Conclusions
A prototype sorting machine for the rejection of defective plastic granulates has been developed. Research started with capturing images of samples and preparing a training–testing database. There were nine classes in the database. Each class had 850 images to teach and 150 images to test the k-NN classifier. The classification performance in nine grades was 90.52%.
The classification of only two classes was initially carried out. These were defective granules (NOK) and clean granules (OK). Only clear transparent granules were in the OK class. In the NOK class was a mix of defective granules. The classification accuracy, using a k-NN classifier of backlit optical images for the two classes, was 100%. This means that the sorting machine was capable of at least separating the granules theoretically with 100% accuracy.
Particle localization was performed using the Modified Sauvola threshold algorithm. The location of the granulate is important for the operation of the sorting machine, as it is used to send individual granules to the classifier and possibly to eject the granules with air nozzles.
A classifier on a sorting machine was used in the second part. The testing of sorting accuracy was performed on the test samples. The highest purity of the accepted material (defect free) class contained 99.81% pure material (contamination by defective materials was 0.19%).
Classification OK/NOK worked with 100% accuracy, so the conclusion is that all sorting errors are possible due to other influences. These influences can be inaccurate air nozzles separation, error on the determination of granulate location, granule migration on conveyor during moving between camera, and air nozzles and possible software bugs.
The illumination could be more even using better lighting. Better lighting could only improve already good results. The lighting must be very intensive so that the exposure time of the camera can be very short. The speed of the conveyor affects the image quality in the case of too dim lighting and if the camera is rolling the shutter.
Further work could be performed to improve separate ejecting. As the results show, the classification works well, and all errors resulted from the physical manipulation of the granules. Ejecting logic software and hardware could be improved as it could eject the individual granules more accurately. To this end, the possible effects affecting sorting errors should be improved. The main influences are determining the location of the granule and transporting the granules from the feeder to the air nozzles.
Later, the classifier could be adapted for other materials in similar forms. The regrind polycarbonate, which has a very undefined shape, could be also sorted. With this material, the color of the material depends on the particle thickness, which further complicates the classification. The quality of the captured image can also be improved, by improving the illumination and using a telecentric lens. In this way, the images will be of better quality and can determine the location of the granule more precisely. The classification of granules, which is already good, could also be improved.
Other methods of artificial intelligence could be used to classify the granules. These are, for example, neural networks and deep learning. Since a large database for training and testing was made, these methods could be of use, but only major changes to the sorting machine software should be made.
The use of a sorting machine in an industrial environment would be possible. The capacity needs to be increased largely, while maintaining the sorting efficiency. The increase in capacity should follow the example of larger industrial sorting machines, which adjust the sorting capacity with the help of several cameras installed in parallel on the conveyor. So, a wider conveyor should be used and more cameras in parallel should be installed. Depending on the width of the conveyor, the air nozzles should also be adjusted.
Another way to increase the capacity of the sorting machine is the faster movement of the conveyor. However, then the camera must also capture images with more images per second, which also need to be processed. Thus, the speed of image processing must also be increased.