3rdparty/OpenCV-2.3.0/modules/features2d/src/sift.cpp
static double dominant_ori( double* hist, int n )
{
  double omax;
  int maxbin, i;

  omax = hist[0];
  maxbin = 0;
  for( i = 1; i < n; i++ )
    if( hist[i] > omax )
      {
        omax = hist[i];
        maxbin = i;
      }
  return omax;
}
/*
  Finds the magnitude of the dominant orientation in a histogram

  @param hist an orientation histogram
  @param n number of bins

  @return Returns the value of the largest bin in hist
*/
Finds the magnitude of the dominant orientation in a histogram
Finds the magnitude of the dominant orientation in a histogram
static double dominant_ori( double* hist, int n )
{
  double omax;
  int maxbin, i;
  omax = hist[0];
  maxbin = 0;
  for( i = 1; i < n; i++ )
    if( hist[i] > omax )
      {
        omax = hist[i];
        maxbin = i;
      }
  return omax;
}
static double dominant_ori ( double * hist , int n ) { double omax ; int maxbin , i ; omax = hist [ 0 ] ; maxbin = 0 ; for ( i = 1 ; i < n ; i ++ ) if ( hist [ i ] > omax ) { omax = hist [ i ] ; maxbin = i ; } return omax ; }
Finds the magnitude of the dominant orientation in a histogram
Finds the magnitude of the dominant orientation in a histogram