Class DescribeDenseSiftAlg<D extends ImageGray<D>>

java.lang.Object
boofcv.alg.feature.describe.DescribeSiftCommon
boofcv.alg.feature.dense.DescribeDenseSiftAlg<D>

public class DescribeDenseSiftAlg<D extends ImageGray<D>> extends DescribeSiftCommon

Computes SIFT features in a regular grid across an entire image at a single scale and orientation. This is more computationally efficient than the more generic DescribePointSift algorithm because it makes strong assumptions. If given the same center point, an orientation of 0, and sigmaToPixels is 1, they should produce the same descriptor.

Sampling is done in regular increments in a grid pattern. The example sampling points are computed such that entire area sampled starts and ends at the most extreme possible pixels. This most likely will require that the sampling period be adjusted. Multiple descriptors can overlap the same area, so pixel orientation and magnitude is just computed once and saved.

  • Constructor Details

    • DescribeDenseSiftAlg

      public DescribeDenseSiftAlg(int widthSubregion, int widthGrid, int numHistogramBins, double weightingSigmaFraction, double maxDescriptorElementValue, double periodColumns, double periodRows, Class<D> derivType)
      Specifies SIFT descriptor structure and sampling frequency.
      Parameters:
      widthSubregion - Width of sub-region in samples. Try 4
      widthGrid - Width of grid in subregions. Try 4.
      numHistogramBins - Number of bins in histogram. Try 8
      weightingSigmaFraction - Sigma for Gaussian weighting function is set to this value * region width. Try 0.5
      maxDescriptorElementValue - Helps with non-affine changes in lighting. See paper. Try 0.2
      periodColumns - Number of pixels between samples along x-axis
      periodRows - Number of pixels between samples along y-axis
      derivType - Type of input derivative image
  • Method Details

    • setImageGradient

      public void setImageGradient(D derivX, D derivY)
      Sets the gradient and precomputes pixel orientation and magnitude
      Parameters:
      derivX - image derivative x-axis
      derivY - image derivative y-axis
    • process

      public void process()
      Computes SIFT descriptors across the entire image
    • computeDescriptor

      public void computeDescriptor(int cx, int cy, TupleDesc_F64 desc)
      Computes the descriptor centered at the specified coordinate
      Parameters:
      cx - center of region x-axis
      cy - center of region y-axis
      desc - The descriptor
    • getPeriodRows

      public double getPeriodRows()
    • setPeriodRows

      public void setPeriodRows(double periodRows)
    • getPeriodColumns

      public double getPeriodColumns()
    • setPeriodColumns

      public void setPeriodColumns(double periodColumns)
    • getDescriptors

      public DogArray<TupleDesc_F64> getDescriptors()
    • getLocations

      public DogArray<Point2D_I32> getLocations()
      Returns where in the image it sampled the features
    • getDerivType

      public Class<D> getDerivType()