Qt 5 and OpenCV 4 Computer Vision Projects by Zhuo Qingliang

Qt 5 and OpenCV 4 Computer Vision Projects by Zhuo Qingliang

Author:Zhuo Qingliang
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2019-06-19T12:55:38+00:00


In our code, when we created the cascade classifier, we used the haarcascade_frontalface_default.xml file. But you may notice that when we list the data directory of the OpenCV installation, there is more than one file whose name indicates it is for front face detection, such as haarcascade_frontalface_alt.xml, haarcascade_frontalface_alt2.xml, or haarcascade_frontalface_alt_tree.xml. Why do we choose haarcascade_frontalface.xml but not others? This pretrained model data is trained on different datasets or with a different configuration. The details are documented in these XML files as comments at the beginning of each file, so you can refer to the document there if you want. Another straightforward way to choose the model file is to try all of them, test them on your dataset, calculate the precision and the recall rate, and then choose the best one for your case.

Except for the Haar cascade classifier, there is also another cascade classifier named the local binary pattern (LBP) cascade classifier, which is shipped with the OpenCV release by default. You can find its trained model data under the lbpcascades directory in the data path of the OpenCV installation. The LBP cascade classifier is faster then Haar, but also has less precision. We can compare them with the following table:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.