Skip to content

Commit

Permalink
default cell size to 4 pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
harthur committed May 31, 2012
1 parent fd53d0c commit b4a0ad5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -19,15 +19,15 @@ npm install hog-descriptor

# API

`extractHOG()` takes options for the cell size (default is `6` pixels), block size (default is `2` cells), block stride (default is `blockSize / 2`), number of bins per orientation histogram (default is `6`), and block normalization method (one of `"L1"`, `"L1-sqrt"`, and default `"L2"`):
`extractHOG()` takes options for the cell size (default is `4` pixels), block size (default is `2` cells), block stride (default is `blockSize / 2`), number of bins per orientation histogram (default is `6`), and block normalization method (one of `"L1"`, `"L1-sqrt"`, and default `"L2"`):

```javascript
var options = {
cellSize: 6, // length of cell in px
cellSize: 4, // length of cell in px
blockSize: 2, // length of block in number of cells
blockStride: 1, // number of cells to slide block window by (block overlap)
bins: 6, // bins per histogram
norm: 'L1' // block normalization method
norm: 'L2' // block normalization method
}

var descriptor = hog.extractHOG(canvas, options);
Expand Down
2 changes: 1 addition & 1 deletion hog.js
Expand Up @@ -8,7 +8,7 @@ for (var func in processing) {

exports.extractHOG = function(canvas, options) {
options = options || {};
var cellSize = options.cellSize || 6;
var cellSize = options.cellSize || 4;
var blockSize = options.blockSize || 2;
var bins = options.bins || 6;
var blockStride = options.blockStride || (blockSize / 2);
Expand Down

0 comments on commit b4a0ad5

Please sign in to comment.