MATLAB File Help: cv.HOGDescriptor/compute | Index |
Returns HOG block descriptors computed for the whole image
descs = hog.compute(im)
descs = hog.compute(im, 'Option', optionValue, ...)
hog.getDescriptorSize()
.[w,h]
. It must be a multiple of
block stride. Not set by default in which case it uses
CellSize
.[w,h]
. default [0,0]{[x,y],...}
at which
descriptors are computed. Not set by default (in which
case descriptors are computed for the whole image with a
sliding window).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/).
Access | public |
Sealed | false |
Static | false |