3rdparty/OpenCV-2.3.0/modules/features2d/src/sift.cpp
static void normalize_descr( struct feature* feat )
{
  double cur, len_inv, len_sq = 0.0;
  int i, d = feat->d;

  for( i = 0; i < d; i++ )
    {
      cur = feat->descr[i];
      len_sq += cur*cur;
    }
  len_inv = 1.0 / sqrt( len_sq );
  for( i = 0; i < d; i++ )
    feat->descr[i] *= len_inv;
}
/*
  Normalizes a feature's descriptor vector to unitl length

  @param feat feature
*/
Normalizes a feature's descriptor vector to unitl length
Normalizes a feature ' s descriptor vector to unitl length
static void normalize_descr( struct feature* feat )
{
  double cur, len_inv, len_sq = 0.0;
  int i, d = feat->d;
  for( i = 0; i < d; i++ )
    {
      cur = feat->descr[i];
      len_sq += cur*cur;
    }
  len_inv = 1.0 / sqrt( len_sq );
  for( i = 0; i < d; i++ )
    feat->descr[i] *= len_inv;
}
static void normalize_descr ( struct feature * feat ) { double cur , len_inv , len_sq = 0.0 ; int i , d = feat -> d ; for ( i = 0 ; i < d ; i ++ ) { cur = feat -> descr [ i ] ; len_sq += cur * cur ; } len_inv = 1.0 / sqrt ( len_sq ) ; for ( i = 0 ; i < d ; i ++ ) feat -> descr [ i ] *= len_inv ; }
Normalizes a feature's descriptor vector to unitl length
Normalizes a feature ' s descriptor vector to unitl length