Summary
In this chapter, we have covered two advanced modules of OpenCV: machine learning and GPU. Machine learning has the capability to learn computers to make decisions. For this, a classifier is trained and validated. This chapter provides three classification samples: KNN classifier, Random Forest using a .cvs
database, and SVM using an image database. The chapter also addresses the use of OpenCV with CUDA. GPUs have a growing role in intensive tasks because they can offload the CPU and run parallel tasks such as those encountered in computer vision algorithms. Several GPU examples have been provided: GPU module installation, a basic first GPU program, and real-time template matching.