Histogram of Oriented Gradients (HOG) features
npm install hog-featuressh
npm install hog-features -S
`
Usage
$3
Generate a vector which corresponds to the HOG descriptor of an image.
Returns an array of float.
__arguments__
* image - an Image
* options - an optional object
__options__
* cellSize: length of cell in px (default: 4).
* blockSize: length of block in number of cells (default: 2).
* blockStride: number of cells to slide block window by (default: block-size / 2).
* bins: bins per histogram (default: 6).
* norm: norm block normalization method (default: "L2". Other possibilities : "L1" and "L1-sqrt").
Example
`js
'use strict';
const {Image} = require('image-js');
const hog = require('hog-features');
const file = __dirname + '/__test__/beachball.png';
Image.load(file).then(function (image) {
var descriptor = hog.extractHOG(image);
console.log(descriptor);
});
``