Please see the following blog post for more details about this code
Minified OpenCV Haar and LBP Cascades