title: OpenCV HOGDescriptor OCR
body: <p>I am converting digits.py into a c++ sample from OpenCV. Digits.py is found under the python2 samples folder.  It is an application that uses SVMs to recognize characters.</p>
  
  <p>During a preprocessing step, HOG (histogram of gradients is calculated).  In order to do this with C++ it is more convenient to use cv::HOGDescriptor::compute() to get a HOG value for each image bin.</p>
  
  <p><a href="https://github.com/Itseez/opencv/blob/5f590ebed084a5002c9013e11c519dcb139d47e9/samples/python2/digits.py" rel="nofollow">https://github.com/Itseez/opencv/blob/5f590ebed084a5002c9013e11c519dcb139d47e9/samples/python2/digits.py</a></p>
  
  <p>Line 126.</p>
  
  <p>In python, they use the Hellinger Kernel that improves sample discrimination. However, i cannot see this occurring in HOG.cpp under compute(). </p>
  
  <p><a href="https://github.com/Itseez/opencv/blob/5f590ebed084a5002c9013e11c519dcb139d47e9/modules/objdetect/src/hog.cpp" rel="nofollow">https://github.com/Itseez/opencv/blob/5f590ebed084a5002c9013e11c519dcb139d47e9/modules/objdetect/src/hog.cpp</a></p>
  
  <p>How do we apply this to a cv::Mat recovered from cv::HOGDescriptor.compute? </p>