igo¶

menpo.feature.igo(pixels, double_angles=False, verbose=False)[source]

Extracts Image Gradient Orientation (IGO) features from the input image. The output image has N * C number of channels, where N is the number of channels of the original image and C = 2 or C = 4 depending on whether double angles are used.

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.

• double_angles (bool, optional) –

Assume that phi represents the gradient orientations.

If this flag is False, the features image is the concatenation of cos(phi) and sin(phi), thus 2 channels.

If True, the features image is the concatenation of cos(phi), sin(phi), cos(2 * phi), sin(2 * phi), thus 4 channels.

• verbose (bool, optional) – Flag to print IGO related information.

Returns

igo (Image or subclass or (X, Y, ..., Z, C) ndarray) – The IGO features image. It has the same type and shape as the input pixels. The output number of channels depends on the double_angles flag.

Raises

ValueError – Image has to be 2D in order to extract IGOs.

References

1

G. Tzimiropoulos, S. Zafeiriou and M. Pantic, “Subspace learning from image gradient orientations”, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, num. 12, p. 2454–2466, 2012.