title: OpenCV+Python+HOG proper location argument for "compute" function
body: <p>I'm running OpenCV 2.4.6 and Python 2.7, and I'm newly on Python programming.<br>
  I need to call the "compute" function of HoGDescriptor Class in my Python scripts.<br>
  One of the arguments are the location where the hog descriptors will be calculated (and returned).<br>
  In c++ this argument is vector&amp; type. But, in Python, I tried some array or mat combinations and it didn't work.<br>
  I copy below the code (it's very simple).  </p>
  
  <pre><code>import numpy as np  
  import cv2  
  
  # read INRIAPerson sample  
  i = cv2.imread('crop_000023a.png',0)  
  hog = cv2.HOGDescriptor()  
  
  # let say I want to caculate hog descriptors in the roi
  # being at (2,3) position of the image  
  r=[1,2]  
  descriptors = hog.compute(i,hog.blockStride,hog.cellSize,r)  
  </code></pre>
  
  <p>I obtain this error  </p>
  
  <blockquote>
    <p>TypeError                                 Traceback (most recent call last)<br>
     in ()<br>
    ----> 1 descriptors = hog.compute(i,hog.blockStride,hog.cellSize,r)<br>
    TypeError: locations</p>
  </blockquote>
  
  <p>If I make something like  </p>
  
  <pre><code>r=mat([1,2]) or r=array([1,2]) or r=array([1,2],ndmin=2)  
  </code></pre>
  
  <p>It crashed.</p>
  
  <p>Does any one know how to pass the correct arguments to this function in Python?  </p>
  
  <p>Thanks in advance,  </p>
  
  <p>Pablo Negri  </p>