# Vision-Based Sorting Systems for Transparent Plastic Granulate
## 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. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Data** & **Test 1** & **Test 2** & **Test 3** & **Test 4** & **Test 5** \\ \hline \(t\) & 236.7 & 43 & 65.7 & 234 & 222.7 \\ \(m\_D_1\) & 57.5 & 51.6 & 55.2 & 57.6 & 57.2 \\ \(S_1\) & 6.3 & 11.7 & 45.7 & 49.7 & 42 \\ \(\lambda\) & 90.8 & 22.7 & 32.2 & 51.3 & 61.5 \\ \(S_0\) & 408.7 & 403.3 & 369.3 & 365.3 & 373 \\ \(D_1\) & 3324 & 2983 & 3191 & 3330 & 3307 \\ \(D_0\) & 203 & 544 & 336 & 197 & 220 \\ \(m\_\) & 1.011 & 5.567 & 3.644 & 1.023 & 1.075 \\ \(ni\_0\) & 66.81 & 42.57 & 52.36 & 64.97 & 62.9 \\ \(ni\_1\) & 99.81 & 99.61 & 98.59 & 98.53 & 98.75 \\ \hline \end{tabular}
\end{table} 
Table 7: Sorting results on sorting machine. 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.