3rdparty/OpenCV-2.3.0/modules/features2d/src/sift.cpp
static void smooth_ori_hist( double* hist, int n )
{
  double prev, tmp, h0 = hist[0];
  int i;

  prev = hist[n-1];
  for( i = 0; i < n; i++ )
    {
      tmp = hist[i];
      hist[i] = 0.25 * prev + 0.5 * hist[i] +
        0.25 * ( ( i+1 == n )? h0 : hist[i+1] );
      prev = tmp;
    }
}
/*
  Gaussian smooths an orientation histogram.

  @param hist an orientation histogram
  @param n number of bins
*/
Gaussian smooths an orientation histogram.
Gaussian smooths an orientation histogram .
static void smooth_ori_hist( double* hist, int n )
{
  double prev, tmp, h0 = hist[0];
  int i;
  prev = hist[n-1];
  for( i = 0; i < n; i++ )
    {
      tmp = hist[i];
      hist[i] = 0.25 * prev + 0.5 * hist[i] +
        0.25 * ( ( i+1 == n )? h0 : hist[i+1] );
      prev = tmp;
    }
}
static void smooth_ori_hist ( double * hist , int n ) { double prev , tmp , h0 = hist [ 0 ] ; int i ; prev = hist [ n - 1 ] ; for ( i = 0 ; i < n ; i ++ ) { tmp = hist [ i ] ; hist [ i ] = 0.25 * prev + 0.5 * hist [ i ] + 0.25 * ( ( i + 1 == n ) ? h0 : hist [ i + 1 ] ) ; prev = tmp ; } }
Gaussian smooths an orientation histogram.
Gaussian smooths an orientation histogram .