utilities.boofcv_extensions
Class DescribePointSiftNormalization

java.lang.Object
  extended by utilities.boofcv_extensions.DescribePointSiftNormalization

public class DescribePointSiftNormalization
extends java.lang.Object

Detects SIFT features inside the provided SIFT scale-space. SIFT features work by sampling the image in a grid. For each grid element, a histogram of the gradient's orientation is computed. From this histogram the descriptor is computed. See [1] for the details and below for algorithmic changes.

DESCRIPTOR INTERPOLATION: Instead of using trilinear interpolation a Gaussian weight is used instead. Both methods were tried and Gaussian weight produced slightly better results. Same results had been found by others with regard to SURF descriptors.

[1] Lowe, D. "Distinctive image features from scale-invariant keypoints". International Journal of Computer Vision, 60, 2 (2004), pp.91--110.

Author:
Peter Abeles

Field Summary
private  double angleStep
           
private  boofcv.struct.image.ImageFloat32 derivX
           
private  boofcv.struct.image.ImageFloat32 derivY
           
private  double[] gridWeights
           
private  int gridWidth
           
private  double[][] histograms
           
private  boofcv.struct.image.ImageFloat32 image
           
private  int numHistBins
           
private  int numSamples
           
private  double sigmaToRadius
           
private  boofcv.alg.feature.detect.interest.SiftImageScaleSpace ss
           
 
Constructor Summary
DescribePointSiftNormalization(int gridWidth, int numSamples, int numHistBins, double weightSigma, double sigmaToRadius)
          Configures detector
 
Method Summary
private  void addToHistograms(int gridX, int gridY, double locX, double locY, double gradX, double gradY)
           
private  void computeDescriptor(boofcv.struct.feature.SurfFeature desc)
           
private  void constructHistograms(double c_x, double c_y, double scale, double orientation)
           
 int getDescriptorLength()
           
 void process(double c_x, double c_y, double scale, double orientation, int imageIndex, double pixelScale, boofcv.struct.feature.SurfFeature desc)
          Compute the descriptor with information on which level in the scale-space to use.
 void process(double c_x, double c_y, double scale, double orientation, boofcv.struct.feature.SurfFeature desc)
           
 void setScaleSpace(boofcv.alg.feature.detect.interest.SiftImageScaleSpace ss)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ss

private boofcv.alg.feature.detect.interest.SiftImageScaleSpace ss

sigmaToRadius

private double sigmaToRadius

gridWidth

private int gridWidth

numSamples

private int numSamples

numHistBins

private int numHistBins

angleStep

private double angleStep

image

private boofcv.struct.image.ImageFloat32 image

derivX

private boofcv.struct.image.ImageFloat32 derivX

derivY

private boofcv.struct.image.ImageFloat32 derivY

histograms

private double[][] histograms

gridWeights

private double[] gridWeights
Constructor Detail

DescribePointSiftNormalization

public DescribePointSiftNormalization(int gridWidth,
                                      int numSamples,
                                      int numHistBins,
                                      double weightSigma,
                                      double sigmaToRadius)
Configures detector

Parameters:
gridWidth - Number of grid elements along a side. Typically 4
numSamples - Number of samples along a grid. Typically 8
numHistBins - Number of bins in the orientation histogram. Typically 8
weightSigma - Adjusts descriptor element's weighting from center. Typically 0.5
sigmaToRadius - Conversation from scale space to pixels. Typically 2.5
Method Detail

setScaleSpace

public void setScaleSpace(boofcv.alg.feature.detect.interest.SiftImageScaleSpace ss)

process

public void process(double c_x,
                    double c_y,
                    double scale,
                    double orientation,
                    boofcv.struct.feature.SurfFeature desc)

process

public void process(double c_x,
                    double c_y,
                    double scale,
                    double orientation,
                    int imageIndex,
                    double pixelScale,
                    boofcv.struct.feature.SurfFeature desc)
Compute the descriptor with information on which level in the scale-space to use.


constructHistograms

private void constructHistograms(double c_x,
                                 double c_y,
                                 double scale,
                                 double orientation)

addToHistograms

private void addToHistograms(int gridX,
                             int gridY,
                             double locX,
                             double locY,
                             double gradX,
                             double gradY)

computeDescriptor

private void computeDescriptor(boofcv.struct.feature.SurfFeature desc)

getDescriptorLength

public int getDescriptorLength()