title: How to calculate Local Binary Pattern Histograms with OpenCV?
body: <p>I have already seen that OpenCV provides a classifier based on LBP <a href="http://docs.opencv.org/trunk/modules/contrib/doc/facerec/facerec_tutorial.html#local-binary-patterns-histograms">histograms</a>:</p>
  
  <p>But I want to have access to the LBP histogram itself. For instance:</p>
  
  <pre><code>histogram = calculate_LBP_Histogram( image )
  </code></pre>
  
  <p>Is there any function that performs this in OpenCV?</p>