title: OpenCV: L1 normalization of descriptor matrix
body: <p>I'm trying to implement SIFTRoot in C++ following <a href="http://www.pyimagesearch.com/2015/04/13/implementing-rootsift-in-python-and-opencv/" rel="nofollow">this</a> article.</p>
  
  <p>In particular:</p>
  
  <pre><code>    # apply the Hellinger kernel by first L1-normalizing and taking the
      # square-root
      descs /= (descs.sum(axis=1, keepdims=True) + eps)
      descs = np.sqrt(descs)
  </code></pre>
  
  <p>My question are:</p>
  
  <ol>
  <li>Is there any built-in C++ function to do this in OpenCV?</li>
  <li>Are all the descriptors value positive? Otherwise the L1 norm should use the abs of each element.</li>
  <li>The first line means "for each row vector, compute the sum of all its elements, then add eps (in order to avoid to divide by 0) and finally divide each vector element by this sum value".</li>
  </ol>