MATLAB File Help: cv.HOGDescriptor/compute Index
cv.HOGDescriptor/compute

Returns HOG block descriptors computed for the whole image

descs = hog.compute(im)
descs = hog.compute(im, 'Option', optionValue, ...)

Input

Output

Options

In case of "dense" descriptors (i.e Locations is not set), the number of rows is equal to the number of sliding windows over the image. Assuming zero padding, this is computed in the following way:

[h,w,~] = size(im);
% numel(hog.WinSize(1):hog.CellSize(1):w)
% numel(hog.WinSize(2):hog.CellSize(2):h)
windows_per_img = ([w,h] - hog.WinSize) ./ WinStride + 1
num_windows = prod(windows_per_img)

The windows cover the image in a top-to-bottom left-to-right order.

In case of "sparse" descriptors (i.e Locations is set), the number of rows is equal to the number of locations specified.

The function is mainly used to learn the classifier.

The computed feature vectors are compatible with the INRIA Object Detection and Localization Toolkit (http://pascal.inrialpes.fr/soft/olt/).

See also
Method Details
Access public
Sealed false
Static false