We will then use the same procedure as in earlier chapters to train a normal Bayes classifier. Wait, why not a Naive Bayes classifier? Well, it turns out OpenCV doesn't really provide a true Naive Bayes classifier. Instead, it comes with a Bayesian classifier that doesn't necessarily expect features to be independent, but rather expects the data to be clustered into Gaussian blobs. This is exactly the kind of dataset we created earlier!
By following these steps, you will learn how to build a classifier with a normal Bayes classifier:
- We can create a new classifier using the following function:
In : import cv2... model_norm = cv2.ml.NormalBayesClassifier_create()
- Then, training is done ...