fast_dsift

menpo.feature.fast_dsift()

Computes a 2-dimensional dense SIFT features image with C number of channels, where C = num_bins_horizontal * num_bins_vertical * num_or_bins. The dense SIFT [2] implementation is taken from Vlfeat [1].

Parameters:
  • pixels (Image or subclass or (C, Y, X) ndarray) – Either the image object itself or an array with the pixels. The first dimension is interpreted as channels.
  • window_step_horizontal (int, optional) – Defines the horizontal step by which the window is moved, thus it controls the features density. The metric unit is pixels.
  • window_step_vertical (int, optional) – Defines the vertical step by which the window is moved, thus it controls the features density. The metric unit is pixels.
  • num_bins_horizontal (int, optional) – Defines the number of histogram bins in the X direction.
  • num_bins_vertical (int, optional) – Defines the number of histogram bins in the Y direction.
  • num_or_bins (int, optional) – Defines the number of orientation histogram bins.
  • cell_size_horizontal (int, optional) – Defines cell width in pixels. The cell is the region that is covered by a spatial bin.
  • cell_size_vertical (int, optional) – Defines cell height in pixels. The cell is the region that is covered by a spatial bin.
  • fast (bool, optional) – If True, then the windowing function is a piecewise-flat, rather than Gaussian. While this breaks exact SIFT equivalence, in practice it is much faster to compute.
  • verbose (bool, optional) – Flag to print SIFT related information.
Raises:
  • ValueError – Only 2D arrays are supported
  • ValueError – Size must only contain positive integers.
  • ValueError – Step must only contain positive integers.
  • ValueError – Window size must be a positive integer.
  • ValueError – Geometry must only contain positive integers.

References

[1]Vedaldi, Andrea, and Brian Fulkerson. “VLFeat: An open and portable library of computer vision algorithms.” Proceedings of the international conference on Multimedia. ACM, 2010.
[2]Lowe, David G. “Distinctive image features from scale-invariant keypoints.” International journal of computer vision 60.2 (2004): 91-110.