daisy¶
-
menpo.feature.
daisy
(image, *args, **kwargs)[source]¶ Extracts Daisy features from the input image. The output image has
N * C
number of channels, whereN
is the number of channels of the original image andC
is the feature channels determined by the input options. Specifically,C = (rings * histograms + 1) * orientations
.Parameters: - pixels (
Image
or subclass or(C, X, Y, ..., Z)
ndarray) – Either the image object itself or an array with the pixels. The first dimension is interpreted as channels. This means an N-dimensional image is represented by an N+1 dimensional array. - step (int, optional) – The sampling step that defines the density of the output image.
- radius (int, optional) – The radius (in pixels) of the outermost ring.
- rings (int, optional) – The number of rings to be used.
- histograms (int, optional) – The number of histograms sampled per ring.
- orientations (int, optional) – The number of orientations (bins) per histogram.
- normalization ([ ‘l1’, ‘l2’, ‘daisy’, None ], optional) – It defines how to normalize the descriptors If ‘l1’ then L1-normalization is applied at each descriptor. If ‘l2’ then L2-normalization is applied at each descriptor. If ‘daisy’ then L2-normalization is applied at individual histograms. If None then no normalization is employed.
- sigmas (list of float or
None
, optional) – Standard deviation of spatial Gaussian smoothing for the centre histogram and for each ring of histograms. The list of sigmas should be sorted from the centre and out. I.e. the first sigma value defines the spatial smoothing of the centre histogram and the last sigma value defines the spatial smoothing of the outermost ring. Specifying sigmas overrides the rings parameter by settingrings = len(sigmas) - 1
. - ring_radii (list of float or
None
, optional) –Radius (in pixels) for each ring. Specifying ring_radii overrides the rings and radius parameters by setting
rings = len(ring_radii)
andradius = ring_radii[-1]
.If both sigmas and ring_radii are given, they must satisfy
len(ring_radii) == len(sigmas) + 1
since no radius is needed for the centre histogram.
- verbose (bool) – Flag to print Daisy related information.
Returns: daisy (
Image
or subclass or(X, Y, ..., Z, C)
ndarray) – The ES features image. It has the same type and shape as the inputpixels
. The output number of channels isC = (rings * histograms + 1) * orientations
.Raises: ValueError
– len(sigmas)-1 != len(ring_radii)ValueError
– Invalid normalization method.
References
[1] E. Tola, V. Lepetit and P. Fua, “Daisy: An efficient dense descriptor applied to wide-baseline stereo”, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 32, num. 5, p. 815-830, 2010. - pixels (